Documentation ¶
Overview ¶
HTTP API v1.0 ----------------------- 约定参数名称:
api : 接口名称 api_key : 接口用户 sign : 签名 sign_type : 签名类型 app : 应用编码
-----------------------
Index ¶
- Variables
- func NewAccountApi() *accountApi
- func NewGoodsApi() *goodsApi
- func NewPassportApi() api.Handler
- func NewRegisterApi() api.Handler
- func NewResApi() api.Handler
- func NewServe(store storage.Interface, debug bool, requireVer string, apiUser string, ...) http.Handler
- func NewService(factory api.ContextFactory, debug bool, rl *util.RequestLimit) *api.ServeMux
- func NewShopApi() *shopApi
- type AppApi
- type ArticleApi
- type MemberApi
- type PassportApi
- func (p PassportApi) GetCodeVerifyResult(token string) (int64, bool)
- func (h PassportApi) ModifyPassword(ctx api.Context) interface{}
- func (m PassportApi) Process(fn string, ctx api.Context) *api.Response
- func (u PassportApi) SResult(err error) *proto.Result
- func (h PassportApi) TradePassword(ctx api.Context) interface{}
- type RegisterApi
- type SettingsApi
Constants ¶
This section is empty.
Variables ¶
View Source
var ( RequireVersion = "1.0.0" ApiUser = "go2o" ApiSecret = "123456" )
Functions ¶
func NewAccountApi ¶
func NewAccountApi() *accountApi
func NewGoodsApi ¶
func NewGoodsApi() *goodsApi
func NewPassportApi ¶
func NewRegisterApi ¶
func NewServe ¶
func NewServe(store storage.Interface, debug bool, requireVer string, apiUser string, apiSecret string) http.Handler
服务
func NewService ¶
func NewService(factory api.ContextFactory, debug bool, rl *util.RequestLimit) *api.ServeMux
服务
func NewShopApi ¶
func NewShopApi() *shopApi
Types ¶
type ArticleApi ¶
type ArticleApi struct { }
type PassportApi ¶
type PassportApi struct {
// contains filtered or unexported fields
}
func (PassportApi) GetCodeVerifyResult ¶
func (p PassportApi) GetCodeVerifyResult(token string) (int64, bool)
获取校验结果
func (PassportApi) ModifyPassword ¶
func (h PassportApi) ModifyPassword(ctx api.Context) interface{}
*
- @api {post} /passport/modify_pwd 修改密码
- @apiName modify_pwd
- @apiGroup passport
- @apiParam {String} account 账号
- @apiParam {Int} cred_type 账号类型,1:用户名 3:邮件 4:手机号
- @apiParam {String} token 令牌
- @apiParam {String} pwd md5编码后的密码
- @apiParam {String} old_pwd md5编码后的旧密码
- @apiSuccessExample Success-Response
- {}
- @apiSuccessExample Error-Response
- {"code":1,"message":"api not defined"} *
func (PassportApi) TradePassword ¶
func (h PassportApi) TradePassword(ctx api.Context) interface{}
*
- @api {post} /passport/trade_pwd 修改交易密码
- @apiName trade_pwd
- @apiGroup passport
- @apiParam {String} account 账号
- @apiParam {Int} cred_type 账号类型,1:用户名 3:邮件 4:手机号
- @apiParam {String} token 令牌
- @apiParam {String} pwd md5编码后的密码
- @apiParam {String} old_pwd md5编码后的旧密码,如果没有设置交易密码,则为空
- @apiSuccessExample Success-Response
- {}
- @apiSuccessExample Error-Response
- {"code":1,"message":"api not defined"} *
type SettingsApi ¶
type SettingsApi struct { }
func NewSettingsApi ¶
func NewSettingsApi() *SettingsApi
Click to show internal directories.
Click to hide internal directories.