Create & Init Project...

This commit is contained in:
2019-04-22 18:49:16 +08:00
commit fc4fa37393
25440 changed files with 4054998 additions and 0 deletions

View File

@@ -0,0 +1,31 @@
package(default_visibility = ["//visibility:public"])
load(
"@io_bazel_rules_go//go:def.bzl",
"go_library",
)
go_library(
name = "go_default_library",
srcs = [
"income.go",
"model.go",
],
importpath = "go-common/app/interface/main/ugcpay/api/http",
tags = ["automanaged"],
visibility = ["//visibility:public"],
)
filegroup(
name = "package-srcs",
srcs = glob(["**"]),
tags = ["automanaged"],
visibility = ["//visibility:private"],
)
filegroup(
name = "all-srcs",
srcs = [":package-srcs"],
tags = ["automanaged"],
visibility = ["//visibility:public"],
)

View File

@@ -0,0 +1 @@
# HTTP API文档

View File

@@ -0,0 +1,42 @@
package http
// RespIncomeAssetOverview .
type RespIncomeAssetOverview struct {
Total int64 `json:"total"`
TotalBuyTimes int64 `json:"total_buy_times"`
MonthNew int64 `json:"month_new"`
DayNew int64 `json:"day_new"`
}
// ArgIncomeAssetList .
type ArgIncomeAssetList struct {
Ver string `form:"ver"`
PS int64 `form:"ps"`
PN int64 `form:"pn"`
}
// RespIncomeAssetList .
type RespIncomeAssetList struct {
List []*RespIncomeAsset `json:"list"`
Page RespPage `json:"page"`
}
// RespIncomeAsset .
type RespIncomeAsset struct {
OID int64 `json:"oid"`
OType string `json:"otype"`
Title string `json:"title"`
Currency string `json:"currency"`
Price int64 `json:"price"`
TotalBuyTimes int64 `json:"total_buy_times"`
NewBuyTimes int64 `json:"new_buy_times"`
TotalErrTimes int64 `json:"total_err_times"`
NewErrTimes int64 `json:"new_err_times"`
}
// RespPage .
type RespPage struct {
Num int64 `json:"num"`
Size int64 `json:"size"`
Total int64 `json:"total"`
}

View File

@@ -0,0 +1,34 @@
package http
// ArgTradeOrder .
type ArgTradeOrder struct {
OrderID string `form:"order_id" validate:"required"`
}
// RespTradeOrder .
type RespTradeOrder struct {
OrderID string `json:"order_id"`
MID int64 `json:"mid"`
Biz string `json:"biz"`
Platform string `json:"platform"`
OID int64 `json:"oid"`
OType string `json:"otype"`
Fee int64 `json:"fee"`
Currency string `json:"currency"`
PayID string `json:"pay_id"`
State string `json:"state"`
Reason string `json:"reason"`
}
// ArgTradeCreate .
type ArgTradeCreate struct {
OID int64 `form:"oid" validate:"required"`
OType string `form:"otype" validate:"required"`
Currency string `form:"currency" validate:"required"`
}
// RespTradeCreate .
type RespTradeCreate struct {
OrderID string `json:"order_id"`
PayData string `json:"pay_data"`
}