// Code generated by swaggo/swag. DO NOT EDIT. package docs import "github.com/swaggo/swag" const docTemplate = `{ "schemes": {{ marshal .Schemes }}, "swagger": "2.0", "info": { "description": "{{escape .Description}}", "title": "{{.Title}}", "contact": {}, "version": "{{.Version}}" }, "host": "{{.Host}}", "basePath": "{{.BasePath}}", "paths": { "/": { "get": { "description": "返回服务描述、主要路径指引与版本(非 OpenAPI 详尽列表,完整契约见 /swagger)。", "produces": [ "application/json" ], "tags": [ "元信息" ], "summary": "API 根信息与端点索引", "responses": { "200": { "description": "OK", "schema": { "type": "object", "additionalProperties": true } } } } }, "/api/admin/chat": { "get": { "security": [ { "AdminToken": [] } ], "produces": [ "application/json" ], "tags": [ "管理端-聊天" ], "summary": "全部会话列表", "responses": { "200": { "description": "OK", "schema": { "type": "object", "additionalProperties": true } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/handlers.SwaggerErrorBody" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.SwaggerErrorBody" } } } } }, "/api/admin/chat/{account}": { "get": { "security": [ { "AdminToken": [] } ], "produces": [ "application/json" ], "tags": [ "管理端-聊天" ], "summary": "指定用户聊天记录", "parameters": [ { "type": "string", "description": "用户账号", "name": "account", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/handlers.SwaggerMessagesWrap" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/handlers.SwaggerErrorBody" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/handlers.SwaggerErrorBody" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.SwaggerErrorBody" } } } }, "post": { "security": [ { "AdminToken": [] } ], "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "管理端-聊天" ], "summary": "管理员回复", "parameters": [ { "type": "string", "description": "用户账号", "name": "account", "in": "path", "required": true }, { "description": "回复内容", "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/handlers.AdminChatPayload" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/handlers.SwaggerOneChatMsgWrap" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/handlers.SwaggerErrorBody" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/handlers.SwaggerErrorBody" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.SwaggerErrorBody" } } } }, "delete": { "security": [ { "AdminToken": [] } ], "produces": [ "application/json" ], "tags": [ "管理端-聊天" ], "summary": "清空会话", "parameters": [ { "type": "string", "description": "用户账号", "name": "account", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/handlers.SwaggerBoolOKWrap" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/handlers.SwaggerErrorBody" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/handlers.SwaggerErrorBody" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.SwaggerErrorBody" } } } } }, "/api/admin/orders": { "get": { "security": [ { "AdminToken": [] } ], "produces": [ "application/json" ], "tags": [ "管理端-订单" ], "summary": "全部订单(管理)", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/handlers.SwaggerOrdersBody" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/handlers.SwaggerErrorBody" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.SwaggerErrorBody" } } } } }, "/api/admin/orders/{id}": { "delete": { "security": [ { "AdminToken": [] } ], "produces": [ "application/json" ], "tags": [ "管理端-订单" ], "summary": "删除订单", "parameters": [ { "type": "string", "description": "订单 ID", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/handlers.SwaggerBoolOKWrap" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/handlers.SwaggerErrorBody" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/handlers.SwaggerErrorBody" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.SwaggerErrorBody" } } } } }, "/api/admin/products": { "get": { "security": [ { "AdminToken": [] } ], "produces": [ "application/json" ], "tags": [ "管理端-商品" ], "summary": "全部商品(管理)", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/handlers.SwaggerProductListBody" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/handlers.SwaggerErrorBody" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.SwaggerErrorBody" } } } }, "post": { "security": [ { "AdminToken": [] } ], "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "管理端-商品" ], "summary": "创建商品", "parameters": [ { "description": "商品字段", "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/handlers.ProductPayload" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/handlers.SwaggerProductOneBody" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/handlers.SwaggerErrorBody" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/handlers.SwaggerErrorBody" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.SwaggerErrorBody" } } } } }, "/api/admin/products/{id}": { "put": { "security": [ { "AdminToken": [] } ], "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "管理端-商品" ], "summary": "更新商品", "parameters": [ { "type": "string", "description": "商品 ID", "name": "id", "in": "path", "required": true }, { "description": "商品字段", "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/handlers.ProductPayload" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/handlers.SwaggerProductOneBody" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/handlers.SwaggerErrorBody" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/handlers.SwaggerErrorBody" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/handlers.SwaggerErrorBody" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.SwaggerErrorBody" } } } }, "delete": { "security": [ { "AdminToken": [] } ], "produces": [ "application/json" ], "tags": [ "管理端-商品" ], "summary": "删除商品", "parameters": [ { "type": "string", "description": "商品 ID", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/handlers.SwaggerBoolOKWrap" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/handlers.SwaggerErrorBody" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.SwaggerErrorBody" } } } } }, "/api/admin/products/{id}/status": { "patch": { "security": [ { "AdminToken": [] } ], "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "管理端-商品" ], "summary": "切换上架状态", "parameters": [ { "type": "string", "description": "商品 ID", "name": "id", "in": "path", "required": true }, { "description": "{active}", "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/handlers.TogglePayload" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/handlers.SwaggerProductOneBody" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/handlers.SwaggerErrorBody" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/handlers.SwaggerErrorBody" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/handlers.SwaggerErrorBody" } } } } }, "/api/admin/site/maintenance": { "post": { "security": [ { "AdminToken": [] } ], "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "管理端-站点" ], "summary": "设置维护模式", "parameters": [ { "description": "维护开关与原因", "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/handlers.MaintenancePayload" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/handlers.SwaggerMaintenanceWrap" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/handlers.SwaggerErrorBody" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/handlers.SwaggerErrorBody" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.SwaggerErrorBody" } } } } }, "/api/admin/site/smtp": { "get": { "security": [ { "AdminToken": [] } ], "produces": [ "application/json" ], "tags": [ "管理端-站点" ], "summary": "获取 SMTP 配置", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/handlers.SwaggerSMTPWrap" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/handlers.SwaggerErrorBody" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.SwaggerErrorBody" } } } }, "post": { "security": [ { "AdminToken": [] } ], "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "管理端-站点" ], "summary": "保存 SMTP 配置", "parameters": [ { "description": "SMTP 字段", "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/storage.SMTPConfig" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/handlers.SwaggerStringOKBody" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/handlers.SwaggerErrorBody" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/handlers.SwaggerErrorBody" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.SwaggerErrorBody" } } } } }, "/api/admin/system-status": { "get": { "security": [ { "AdminToken": [] } ], "produces": [ "application/json" ], "tags": [ "管理端-系统" ], "summary": "系统运行状态", "responses": { "200": { "description": "OK", "schema": { "type": "object", "additionalProperties": true } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/handlers.SwaggerErrorBody" } } } } }, "/api/admin/verify": { "post": { "description": "响应为 {\"valid\": true/false},不泄露真实口令。", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "管理端-认证" ], "summary": "校验管理员令牌", "parameters": [ { "description": "待校验 token", "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/handlers.AdminVerifyTokenRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/handlers.SwaggerValidBody" } } } } }, "/api/chat/messages": { "get": { "security": [ { "BearerAuth": [] } ], "produces": [ "application/json" ], "tags": [ "聊天(用户)" ], "summary": "我的聊天消息", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/handlers.SwaggerMessagesWrap" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/handlers.SwaggerErrorBody" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.SwaggerErrorBody" } } } }, "post": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "聊天(用户)" ], "summary": "发送用户消息", "parameters": [ { "description": "消息正文", "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/handlers.ChatMessagePayload" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/handlers.SwaggerOneChatMsgWrap" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/handlers.SwaggerErrorBody" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/handlers.SwaggerErrorBody" } }, "429": { "description": "Too Many Requests", "schema": { "$ref": "#/definitions/handlers.SwaggerErrorBody" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.SwaggerErrorBody" } } } } }, "/api/checkout": { "post": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "订单" ], "summary": "结账创建订单", "parameters": [ { "type": "string", "description": "Bearer 用户 token(部分商品必填)", "name": "Authorization", "in": "header" }, { "description": "结账参数", "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/handlers.CheckoutPayload" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/handlers.SwaggerCheckoutWrap" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/handlers.SwaggerErrorBody" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/handlers.SwaggerErrorBody" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/handlers.SwaggerErrorBody" } }, "409": { "description": "库存锁定冲突或同用户待支付", "schema": { "$ref": "#/definitions/handlers.SwaggerErrorBody" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.SwaggerErrorBody" } } } } }, "/api/health": { "get": { "produces": [ "application/json" ], "tags": [ "健康检查" ], "summary": "健康检查", "responses": { "200": { "description": "status ok;rabbitmq 为 disabled|ok|error:...", "schema": { "type": "object", "additionalProperties": true } } } } }, "/api/orders": { "get": { "security": [ { "BearerAuth": [] } ], "produces": [ "application/json" ], "tags": [ "订单" ], "summary": "我的订单", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/handlers.SwaggerOrdersBody" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/handlers.SwaggerErrorBody" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.SwaggerErrorBody" } } } } }, "/api/orders/{id}/cancel": { "post": { "produces": [ "application/json" ], "tags": [ "订单" ], "summary": "取消订单", "parameters": [ { "type": "string", "description": "订单 ID", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/handlers.SwaggerCancelWrap" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/handlers.SwaggerErrorBody" } }, "409": { "description": "Conflict", "schema": { "$ref": "#/definitions/handlers.SwaggerErrorBody" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.SwaggerErrorBody" } } } } }, "/api/orders/{id}/confirm": { "post": { "produces": [ "application/json" ], "tags": [ "订单" ], "summary": "确认订单", "parameters": [ { "type": "string", "description": "订单 ID", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/handlers.SwaggerConfirmWrap" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/handlers.SwaggerErrorBody" } }, "409": { "description": "待支付未到账等", "schema": { "$ref": "#/definitions/handlers.SwaggerErrorBody" } }, "410": { "description": "已取消或超时", "schema": { "$ref": "#/definitions/handlers.SwaggerErrorBody" } } } } }, "/api/orders/{id}/payment-status": { "get": { "produces": [ "application/json" ], "tags": [ "订单" ], "summary": "订单支付状态", "parameters": [ { "type": "string", "description": "订单 ID", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/handlers.SwaggerPaymentStatusWrap" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/handlers.SwaggerErrorBody" } } } } }, "/api/products": { "get": { "produces": [ "application/json" ], "tags": [ "公开" ], "summary": "上架商品列表", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/handlers.SwaggerProductListBody" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.SwaggerErrorBody" } } } } }, "/api/products/{id}/view": { "post": { "produces": [ "application/json" ], "tags": [ "公开" ], "summary": "记录商品浏览", "parameters": [ { "type": "string", "description": "商品 ID", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/handlers.SwaggerProductViewWrap" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/handlers.SwaggerErrorBody" } } } } }, "/api/site/maintenance": { "get": { "produces": [ "application/json" ], "tags": [ "公开" ], "summary": "维护模式状态", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/handlers.SwaggerMaintenanceWrap" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.SwaggerErrorBody" } } } } }, "/api/site/visit": { "post": { "produces": [ "application/json" ], "tags": [ "公开" ], "summary": "记录站点访问", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/handlers.SwaggerVisitWrap" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.SwaggerErrorBody" } } } } }, "/api/stats": { "get": { "produces": [ "application/json" ], "tags": [ "公开" ], "summary": "站点统计", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/handlers.SwaggerStatsWrap" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.SwaggerErrorBody" } } } } }, "/api/webhooks/mengya-pay": { "post": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Webhook" ], "summary": "萌芽支付 Webhook", "parameters": [ { "type": "string", "description": "与 WEBHOOK_MENGYA_SECRET 一致", "name": "X-Webhook-Secret", "in": "header" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/handlers.SwaggerWebhookMengyaResp" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/handlers.SwaggerErrorBody" } }, "403": { "description": "Forbidden", "schema": { "$ref": "#/definitions/handlers.SwaggerErrorBody" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.SwaggerErrorBody" } } } } }, "/api/wishlist": { "get": { "security": [ { "BearerAuth": [] } ], "produces": [ "application/json" ], "tags": [ "收藏" ], "summary": "收藏列表", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/handlers.SwaggerWishlistWrap" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/handlers.SwaggerErrorBody" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.SwaggerErrorBody" } } } }, "post": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "收藏" ], "summary": "添加收藏", "parameters": [ { "description": "商品 ID", "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/handlers.WishlistItemPayload" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/handlers.SwaggerWishlistWrap" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/handlers.SwaggerErrorBody" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/handlers.SwaggerErrorBody" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.SwaggerErrorBody" } } } } }, "/api/wishlist/{id}": { "delete": { "security": [ { "BearerAuth": [] } ], "produces": [ "application/json" ], "tags": [ "收藏" ], "summary": "移除收藏", "parameters": [ { "type": "string", "description": "商品 ID", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/handlers.SwaggerWishlistWrap" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/handlers.SwaggerErrorBody" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/handlers.SwaggerErrorBody" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.SwaggerErrorBody" } } } } } }, "definitions": { "handlers.AdminChatPayload": { "type": "object", "properties": { "content": { "type": "string" } } }, "handlers.AdminVerifyTokenRequest": { "type": "object", "properties": { "token": { "type": "string" } } }, "handlers.ChatMessagePayload": { "type": "object", "properties": { "content": { "type": "string" } } }, "handlers.CheckoutPayload": { "type": "object", "properties": { "contactEmail": { "type": "string" }, "contactPhone": { "type": "string" }, "note": { "type": "string" }, "notifyEmail": { "type": "string" }, "paymentMethod": { "type": "string" }, "productId": { "type": "string" }, "quantity": { "type": "integer" } } }, "handlers.MaintenancePayload": { "type": "object", "properties": { "maintenance": { "type": "boolean" }, "reason": { "type": "string" } } }, "handlers.ProductPayload": { "type": "object", "properties": { "active": { "type": "boolean" }, "codes": { "type": "array", "items": { "type": "string" } }, "coverUrl": { "type": "string" }, "deliveryMode": { "type": "string" }, "description": { "type": "string" }, "discountPrice": { "type": "number" }, "fixedContent": { "type": "string" }, "fulfillmentType": { "type": "string" }, "maxPerAccount": { "type": "integer" }, "name": { "type": "string" }, "paymentQrUrls": { "type": "array", "items": { "type": "string" } }, "price": { "type": "number" }, "requireLogin": { "type": "boolean" }, "screenshotUrls": { "type": "array", "items": { "type": "string" } }, "showContact": { "type": "boolean" }, "showNote": { "type": "boolean" }, "tags": { "type": "string" } } }, "handlers.SwaggerBoolOK": { "type": "object", "properties": { "ok": { "type": "boolean" } } }, "handlers.SwaggerBoolOKWrap": { "type": "object", "properties": { "data": { "$ref": "#/definitions/handlers.SwaggerBoolOK" } } }, "handlers.SwaggerCancelMsg": { "type": "object", "properties": { "message": { "type": "string" }, "ok": { "type": "boolean" } } }, "handlers.SwaggerCancelWrap": { "type": "object", "properties": { "data": { "$ref": "#/definitions/handlers.SwaggerCancelMsg" } } }, "handlers.SwaggerCheckoutData": { "type": "object", "properties": { "orderId": { "type": "string" }, "paymentExpectedTotal": { "type": "number" }, "paymentExpiresAt": { "type": "string" }, "paymentMethod": { "type": "string" }, "paymentQrUrls": { "type": "array", "items": { "type": "string" } }, "productId": { "type": "string" }, "productQty": { "type": "integer" }, "qrCodeUrl": { "type": "string" }, "status": { "type": "string" }, "viewCount": { "type": "integer" } } }, "handlers.SwaggerCheckoutWrap": { "type": "object", "properties": { "data": { "$ref": "#/definitions/handlers.SwaggerCheckoutData" } } }, "handlers.SwaggerConfirmData": { "type": "object", "properties": { "deliveredCodes": { "type": "array", "items": { "type": "string" } }, "deliveryMode": { "type": "string" }, "isManual": { "type": "boolean" }, "orderId": { "type": "string" }, "status": { "type": "string" } } }, "handlers.SwaggerConfirmWrap": { "type": "object", "properties": { "data": { "$ref": "#/definitions/handlers.SwaggerConfirmData" } } }, "handlers.SwaggerErrorBody": { "type": "object", "properties": { "error": { "type": "string" } } }, "handlers.SwaggerMaintenanceData": { "type": "object", "properties": { "maintenance": { "type": "boolean" }, "reason": { "type": "string" } } }, "handlers.SwaggerMaintenanceWrap": { "type": "object", "properties": { "data": { "$ref": "#/definitions/handlers.SwaggerMaintenanceData" } } }, "handlers.SwaggerMessagesInner": { "type": "object", "properties": { "messages": { "type": "array", "items": { "$ref": "#/definitions/models.ChatMessage" } } } }, "handlers.SwaggerMessagesWrap": { "type": "object", "properties": { "data": { "$ref": "#/definitions/handlers.SwaggerMessagesInner" } } }, "handlers.SwaggerOneChatMsgWrap": { "type": "object", "properties": { "data": { "$ref": "#/definitions/handlers.SwaggerSingleChatWrap" } } }, "handlers.SwaggerOrdersBody": { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/definitions/models.Order" } } } }, "handlers.SwaggerPaymentStatusData": { "type": "object", "properties": { "expectedTotal": { "type": "number" }, "paymentExpiresAt": { "type": "string" }, "paymentMethod": { "type": "string" }, "status": { "type": "string" } } }, "handlers.SwaggerPaymentStatusWrap": { "type": "object", "properties": { "data": { "$ref": "#/definitions/handlers.SwaggerPaymentStatusData" } } }, "handlers.SwaggerProductListBody": { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/definitions/models.Product" } } } }, "handlers.SwaggerProductOneBody": { "type": "object", "properties": { "data": { "$ref": "#/definitions/models.Product" } } }, "handlers.SwaggerProductViewData": { "type": "object", "properties": { "counted": { "type": "boolean" }, "id": { "type": "string" }, "viewCount": { "type": "integer" } } }, "handlers.SwaggerProductViewWrap": { "type": "object", "properties": { "data": { "$ref": "#/definitions/handlers.SwaggerProductViewData" } } }, "handlers.SwaggerSMTPWrap": { "type": "object", "properties": { "data": { "$ref": "#/definitions/storage.SMTPConfig" } } }, "handlers.SwaggerSingleChatWrap": { "type": "object", "properties": { "message": { "$ref": "#/definitions/models.ChatMessage" } } }, "handlers.SwaggerStatsData": { "type": "object", "properties": { "totalOrders": { "type": "integer" }, "totalVisits": { "type": "integer" } } }, "handlers.SwaggerStatsWrap": { "type": "object", "properties": { "data": { "$ref": "#/definitions/handlers.SwaggerStatsData" } } }, "handlers.SwaggerStringOKBody": { "type": "object", "properties": { "data": { "type": "string" } } }, "handlers.SwaggerValidBody": { "type": "object", "properties": { "valid": { "type": "boolean" } } }, "handlers.SwaggerVisitData": { "type": "object", "properties": { "counted": { "type": "boolean" }, "totalVisits": { "type": "integer" } } }, "handlers.SwaggerVisitWrap": { "type": "object", "properties": { "data": { "$ref": "#/definitions/handlers.SwaggerVisitData" } } }, "handlers.SwaggerWebhookMengyaResp": { "type": "object", "properties": { "matched": { "type": "boolean" }, "matched_order_id": { "type": "string" }, "ok": { "type": "boolean" } } }, "handlers.SwaggerWishlistItems": { "type": "object", "properties": { "items": { "type": "array", "items": { "type": "string" } } } }, "handlers.SwaggerWishlistWrap": { "type": "object", "properties": { "data": { "$ref": "#/definitions/handlers.SwaggerWishlistItems" } } }, "handlers.TogglePayload": { "type": "object", "properties": { "active": { "type": "boolean" } } }, "handlers.WishlistItemPayload": { "type": "object", "properties": { "productId": { "type": "string" } } }, "models.ChatMessage": { "type": "object", "properties": { "accountId": { "type": "string" }, "accountName": { "type": "string" }, "content": { "type": "string" }, "fromAdmin": { "type": "boolean" }, "id": { "type": "string" }, "sentAt": { "type": "string" } } }, "models.Order": { "type": "object", "properties": { "contactEmail": { "type": "string" }, "contactPhone": { "type": "string" }, "createdAt": { "type": "string" }, "deliveredCodes": { "type": "array", "items": { "type": "string" } }, "deliveryMode": { "type": "string" }, "id": { "type": "string" }, "note": { "type": "string" }, "notifyEmail": { "type": "string" }, "paymentExpectedTotal": { "type": "number" }, "paymentExpiresAt": { "type": "string" }, "paymentMethod": { "type": "string" }, "productId": { "type": "string" }, "productName": { "type": "string" }, "quantity": { "type": "integer" }, "status": { "type": "string" }, "userAccount": { "type": "string" }, "userName": { "type": "string" } } }, "models.Product": { "type": "object", "properties": { "active": { "type": "boolean" }, "codes": { "type": "array", "items": { "type": "string" } }, "coverUrl": { "type": "string" }, "createdAt": { "type": "string" }, "deliveryMode": { "type": "string" }, "description": { "type": "string" }, "discountPrice": { "type": "number" }, "fixedContent": { "type": "string" }, "fulfillmentType": { "type": "string" }, "id": { "type": "string" }, "maxPerAccount": { "type": "integer" }, "name": { "type": "string" }, "paymentQrUrls": { "description": "PaymentQrURLs 萌芽支付收款码图片链接(可多条)。", "type": "array", "items": { "type": "string" } }, "price": { "type": "number" }, "quantity": { "type": "integer" }, "requireLogin": { "type": "boolean" }, "screenshotUrls": { "type": "array", "items": { "type": "string" } }, "showContact": { "type": "boolean" }, "showNote": { "type": "boolean" }, "tags": { "type": "array", "items": { "type": "string" } }, "totalSold": { "type": "integer" }, "updatedAt": { "type": "string" }, "verificationUrl": { "type": "string" }, "viewCount": { "type": "integer" } } }, "storage.SMTPConfig": { "type": "object", "properties": { "email": { "type": "string" }, "enabled": { "type": "boolean" }, "fromName": { "type": "string" }, "host": { "type": "string" }, "password": { "type": "string" }, "port": { "type": "string" } } } }, "securityDefinitions": { "AdminToken": { "description": "管理端令牌(也可使用 Authorization 头或 query token,见各接口说明)", "type": "apiKey", "name": "X-Admin-Token", "in": "header" }, "BearerAuth": { "description": "用户访问令牌,格式: Bearer 空格 + token", "type": "apiKey", "name": "Authorization", "in": "header" }, "WebhookSecret": { "description": "与服务端 WEBHOOK_MENGYA_SECRET 一致时校验萌芽支付 Webhook", "type": "apiKey", "name": "X-Webhook-Secret", "in": "header" } } }` // SwaggerInfo holds exported Swagger Info so clients can modify it var SwaggerInfo = &swag.Spec{ Version: "1.0.0-go", Host: "localhost:8080", BasePath: "/", Schemes: []string{"http", "https"}, Title: "萌芽小店 API", Description: "商品、下单、站点统计、收藏与客服聊天;用户登录由萌芽账户认证中心(SproutGate)校验。监听地址以 HTTP_LISTEN_ADDR 为准。", InfoInstanceName: "swagger", SwaggerTemplate: docTemplate, } func init() { swag.Register(SwaggerInfo.InstanceName(), SwaggerInfo) }