• wangp's avatar
    lakala · af1afef6
    wangp authored
    af1afef6
docs.go 8.91 KB
// Package docs GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
// This file was generated by swaggo/swag
package docs

import (
	"bytes"
	"encoding/json"
	"strings"
	"text/template"

	"github.com/swaggo/swag"
)

var doc = `{
    "schemes": {{ marshal .Schemes }},
    "swagger": "2.0",
    "info": {
        "description": "{{.Description}}",
        "title": "{{.Title}}",
        "contact": {},
        "version": "{{.Version}}"
    },
    "host": "{{.Host}}",
    "basePath": "{{.BasePath}}",
    "paths": {
        "/api/v1/pay/unified_order": {
            "post": {
                "description": "拉卡拉统一支付",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "拉卡拉统一支付"
                ],
                "summary": "拉卡拉统一支付",
                "parameters": [
                    {
                        "description": "参数",
                        "name": "body",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/models.PlaceAnOrderParamInput"
                        }
                    },
                    {
                        "type": "string",
                        "description": "语言类型 zh-CN简体中文 en-US英文 ja 日文 默认中文",
                        "name": "language",
                        "in": "header"
                    }
                ],
                "responses": {
                    "200": {
                        "description": ""
                    }
                }
            }
        },
        "/api/v1/pay/unified_refund": {
            "post": {
                "description": "拉卡拉退款",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "拉卡拉退款"
                ],
                "summary": "拉卡拉退款",
                "parameters": [
                    {
                        "description": "参数",
                        "name": "body",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/models.RefundParamInput"
                        }
                    },
                    {
                        "type": "string",
                        "description": "语言类型 zh-CN简体中文 en-US英文 ja 日文 默认中文",
                        "name": "language",
                        "in": "header"
                    }
                ],
                "responses": {
                    "200": {
                        "description": ""
                    }
                }
            }
        },
        "/api/v1/pay/wx_notice": {
            "post": {
                "description": "拉卡拉统一支付微信回调",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "拉卡拉统一支付回调"
                ],
                "summary": "拉卡拉统一支付微信回调",
                "parameters": [
                    {
                        "description": "参数",
                        "name": "body",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/models.WxNoticeInput"
                        }
                    },
                    {
                        "type": "string",
                        "description": "语言类型 zh-CN简体中文 en-US英文 ja 日文 默认中文",
                        "name": "language",
                        "in": "header"
                    }
                ],
                "responses": {
                    "200": {
                        "description": ""
                    }
                }
            }
        }
    },
    "definitions": {
        "models.PlaceAnOrderParamInput": {
            "type": "object",
            "properties": {
                "app_id": {
                    "type": "string"
                },
                "attach_info": {
                    "type": "string"
                },
                "customer": {
                    "type": "string"
                },
                "dynamic_id": {
                    "type": "string"
                },
                "goods_des": {
                    "type": "string"
                },
                "goods_detail": {
                    "type": "string"
                },
                "goods_price": {
                    "type": "number"
                },
                "is_serve": {
                    "type": "integer"
                },
                "notice_url": {
                    "type": "string"
                },
                "open_id": {
                    "type": "string"
                },
                "operator": {
                    "type": "string"
                },
                "pay_type": {
                    "type": "integer"
                },
                "platform_info": {
                    "type": "string"
                },
                "platform_type": {
                    "type": "integer"
                },
                "quit_url": {
                    "type": "string"
                },
                "return_url": {
                    "type": "string"
                },
                "source_code": {
                    "type": "integer"
                },
                "store_sn": {
                    "type": "string"
                },
                "sub_mchid": {
                    "type": "string"
                },
                "wap_name": {
                    "type": "string"
                },
                "wap_url": {
                    "type": "string"
                }
            }
        },
        "models.RefundParamInput": {
            "type": "object",
            "properties": {
                "goods_price": {
                    "type": "number"
                },
                "order_id": {
                    "type": "string"
                }
            }
        },
        "models.WxNoticeInput": {
            "type": "object",
            "properties": {
                "channel_id": {
                    "type": "string"
                },
                "merchant_no": {
                    "type": "string"
                },
                "order_create_time": {
                    "type": "string"
                },
                "order_efficient_time": {
                    "type": "string"
                },
                "order_info": {
                    "type": "string"
                },
                "order_status": {
                    "type": "string"
                },
                "order_trade_info": {
                    "type": "object"
                },
                "out_order_no": {
                    "type": "string"
                },
                "pay_order_no": {
                    "type": "string"
                },
                "split_info": {
                    "type": "object"
                },
                "term_no": {
                    "type": "string"
                },
                "total_amount": {
                    "type": "number"
                },
                "trans_merchant_no": {
                    "type": "string"
                },
                "trans_term_no": {
                    "type": "string"
                }
            }
        }
    },
    "securityDefinitions": {
        "ApiKeyAuth": {
            "type": "apiKey",
            "name": "Authorization",
            "in": "header"
        }
    }
}`

type swaggerInfo struct {
	Version     string
	Host        string
	BasePath    string
	Schemes     []string
	Title       string
	Description string
}

// SwaggerInfo holds exported Swagger Info so clients can modify it
var SwaggerInfo = swaggerInfo{
	Version:     "1.0",
	Host:        "",
	BasePath:    "",
	Schemes:     []string{},
	Title:       "谛宝多多平台",
	Description: "采购订单项目",
}

type s struct{}

func (s *s) ReadDoc() string {
	sInfo := SwaggerInfo
	sInfo.Description = strings.Replace(sInfo.Description, "\n", "\\n", -1)

	t, err := template.New("swagger_info").Funcs(template.FuncMap{
		"marshal": func(v interface{}) string {
			a, _ := json.Marshal(v)
			return string(a)
		},
	}).Parse(doc)
	if err != nil {
		return doc
	}

	var tpl bytes.Buffer
	if err := t.Execute(&tpl, sInfo); err != nil {
		return doc
	}

	return tpl.String()
}

func init() {
	swag.Register(swag.Name, &s{})
}