Documentation ¶
Overview ¶
Copyright 2019-2020 Axetroy. All rights reserved. MIT license.
Copyright 2019-2020 Axetroy. All rights reserved. MIT license.
Copyright 2019-2020 Axetroy. All rights reserved. MIT license.
Copyright 2019-2020 Axetroy. All rights reserved. MIT license.
Index ¶
- Variables
- func GenerateTransferLogSQL(filter QueryParams, limit int, count bool) string
- func GetDetail(c helper.Context, transferId string) (res schema.Response)
- func GetHistory(c helper.Context, query Query) (res schema.Response)
- func GetTransferTableName(currency string) string
- func To(c helper.Context, input ToParams, signature string) (res schema.Response)
- type Query
- type QueryParams
- type ToParams
Constants ¶
This section is empty.
Variables ¶
View Source
var GetDetailRouter = router.Handler(func(c router.Context) { c.ResponseFunc(nil, func() schema.Response { return GetDetail(helper.NewContext(&c), c.Param("transfer_id")) }) })
View Source
var GetHistoryRouter = router.Handler(func(c router.Context) { var ( input Query ) c.ResponseFunc(c.ShouldBindQuery(&input), func() schema.Response { return GetHistory(helper.NewContext(&c), input) }) })
View Source
var ToRouter = router.Handler(func(c router.Context) { var ( input ToParams ) signature := c.GetHeader(middleware.SignatureHeader) c.ResponseFunc(c.ShouldBindJSON(&input), func() schema.Response { return To(helper.NewContext(&c), input, signature) }) })
Functions ¶
func GenerateTransferLogSQL ¶
func GenerateTransferLogSQL(filter QueryParams, limit int, count bool) string
Types ¶
type QueryParams ¶
type ToParams ¶
type ToParams struct { Currency string `json:"currency" validate:"required" comment:"币种"` // 币种 To string `json:"to" validate:"required,numeric" comment:"转账对象"` // 转账给谁 Amount string `json:"amount" validate:"required,numeric,gt=0" comment:"转账数量"` // 转账数量 Note *string `json:"note" validate:"omitempty" comment:"转账备注"` // 转账备注 }
Click to show internal directories.
Click to hide internal directories.