18 lines
2.3 KiB
Markdown
18 lines
2.3 KiB
Markdown
# Glossary
|
|
|
|
| Term | Meaning | Notes |
|
|
|---|---|---|
|
|
| 素材 / Material | Uploaded source content referenced in prompts as `@图片1`, `@视频1`, `@音频1`. | Uploads become assets under the authenticated owner. |
|
|
| Asset | Stored upload or generated result with metadata and owner scope. | Owner-scoped not-found behavior (404) is a compatibility contract. |
|
|
| Generation job / Task | Async unit of image or video generation: submit, claim, execute, poll provider, terminal transition, optional Webhook. | Claimed via `claim_generation_jobs`; idempotent per provider task id. |
|
|
| Wallet | Organization balance with immutable ledger entries. | Posted atomically via `billing_post_wallet_entry`; integer-fen arithmetic. |
|
|
| Ledger | Append-only record of wallet movements (charge, refund, settlement, adjustment). | Replayable for reconciliation. |
|
|
| Quote | Server-side estimate for a generation request using the matched billing rule and parameter tiers. | Preview is quote-only; submission is balance-gated. |
|
|
| Engine / Provider | External generation service: 即梦 (Jimeng), EvoLink GPT Image 2, Seedance 2.0, Bailian. | Adapters isolate provider payloads and status mapping. |
|
|
| Worker | Legacy Node process that polled an internal HTTP tick endpoint to claim and execute jobs. | No longer shipped or deployed in the accepted static Web + Go architecture. |
|
|
| WorkerLoop | Embedded async task loop inside the Go backend. | The production job-execution path; it uses Go application/module seams without a Web tick endpoint. |
|
|
| Static Web | Next.js static export (`out/`) served by unprivileged Nginx. | Has no SSR, Route Handlers, Middleware, runtime application configuration, database access, or session Secret. |
|
|
| Cutover | Historical migration from Next-owned runtime routes and the Node Worker to Go-owned routes and WorkerLoop. | The first production rollout now deploys the static Web and Go revisions directly; no legacy drain sequence is required. |
|
|
| Contract fixture | Language-neutral JSON contract under `contracts/` for HTTP, Cookie, auth, jobs, billing, storage, Webhook behavior. | Executable by both TypeScript and Go consumers. |
|
|
| `zhinian_session` | Signed (HMAC-SHA256), chunked (3000 chars, up to 20 chunks) session cookie. | `HttpOnly`, `SameSite=Lax`, `Path=/`, production `Secure`. |
|