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 GenerateResetPayPasswordCode(uid string) string
- func GetProfile(c helper.Context) (res schema.Response)
- func ResetPayPassword(c helper.Context, input ResetPayPasswordParams) (res schema.Response)
- func SendAuthEmail(c helper.Context) (res schema.Response)
- func SendAuthPhone(c helper.Context) (res schema.Response)
- func SendResetPayPassword(c helper.Context) (res schema.Response)
- func SetPayPassword(c helper.Context, input SetPayPasswordParams) (res schema.Response)
- func UpdatePassword(c helper.Context, input UpdatePasswordParams) (res schema.Response)
- func UpdatePasswordByAdmin(c helper.Context, userId string, input UpdatePasswordByAdminParams) (res schema.Response)
- func UpdatePayPassword(c helper.Context, input UpdatePayPasswordParams) (res schema.Response)
- func UpdateProfile(c helper.Context, input UpdateProfileParams) (res schema.Response)
- type ResetPayPasswordParams
- type SetPayPasswordParams
- type UpdatePasswordByAdminParams
- type UpdatePasswordParams
- type UpdatePayPasswordParams
- type UpdateProfileParams
- type UpdateWechatProfileParams
Constants ¶
This section is empty.
Variables ¶
View Source
var GetProfileRouter = router.Handler(func(c router.Context) { c.ResponseFunc(nil, func() schema.Response { return GetProfile(helper.NewContext(&c)) }) })
View Source
var ResetPayPasswordRouter = router.Handler(func(c router.Context) { var ( input ResetPayPasswordParams ) c.ResponseFunc(c.ShouldBindJSON(&input), func() schema.Response { return ResetPayPassword(helper.NewContext(&c), input) }) })
View Source
var SendAuthEmailRouter = router.Handler(func(c router.Context) { c.ResponseFunc(nil, func() schema.Response { return SendAuthEmail(helper.NewContext(&c)) }) })
View Source
var SendAuthPhoneRouter = router.Handler(func(c router.Context) { c.ResponseFunc(nil, func() schema.Response { return SendAuthPhone(helper.NewContext(&c)) }) })
View Source
var SendResetPayPasswordRouter = router.Handler(func(c router.Context) { c.ResponseFunc(nil, func() schema.Response { return SendResetPayPassword(helper.NewContext(&c)) }) })
View Source
var SetPayPasswordRouter = router.Handler(func(c router.Context) { var ( input SetPayPasswordParams ) c.ResponseFunc(c.ShouldBindJSON(&input), func() schema.Response { return SetPayPassword(helper.NewContext(&c), input) }) })
View Source
var SignOut = router.Handler(func(c router.Context) { c.ResponseFunc(nil, func() schema.Response { return schema.Response{} }) })
View Source
var UpdatePasswordRouter = router.Handler(func(c router.Context) { var ( input UpdatePasswordParams ) c.ResponseFunc(c.ShouldBindJSON(&input), func() schema.Response { return UpdatePassword(helper.NewContext(&c), input) }) })
View Source
var UpdatePayPasswordRouter = router.Handler(func(c router.Context) { var ( input UpdatePayPasswordParams ) c.ResponseFunc(c.ShouldBindJSON(&input), func() schema.Response { return UpdatePayPassword(helper.NewContext(&c), input) }) })
View Source
var UpdateProfileRouter = router.Handler(func(c router.Context) { var ( input UpdateProfileParams ) c.ResponseFunc(c.ShouldBindJSON(&input), func() schema.Response { return UpdateProfile(helper.NewContext(&c), input) }) })
Functions ¶
func ResetPayPassword ¶
func ResetPayPassword(c helper.Context, input ResetPayPasswordParams) (res schema.Response)
func SetPayPassword ¶
func SetPayPassword(c helper.Context, input SetPayPasswordParams) (res schema.Response)
func UpdatePassword ¶
func UpdatePassword(c helper.Context, input UpdatePasswordParams) (res schema.Response)
func UpdatePasswordByAdmin ¶
func UpdatePayPassword ¶
func UpdatePayPassword(c helper.Context, input UpdatePayPasswordParams) (res schema.Response)
func UpdateProfile ¶
func UpdateProfile(c helper.Context, input UpdateProfileParams) (res schema.Response)
Types ¶
type ResetPayPasswordParams ¶
type SetPayPasswordParams ¶
type UpdatePasswordByAdminParams ¶
type UpdatePasswordByAdminParams struct {
NewPassword string `json:"new_password" validate:"required,max=32" comment:"新密码"`
}
type UpdatePasswordParams ¶
type UpdatePayPasswordParams ¶
type UpdateProfileParams ¶
type UpdateProfileParams struct { Username *string `json:"username" validate:"omitempty,max=32" comment:"用户名"` // 用户名,部分用户有机会修改自己的用户名,比如微信注册的帐号 Nickname *string `json:"nickname" validate:"omitempty,max=32" comment:"昵称"` Gender *model.Gender `json:"gender" validate:"omitempty,number,oneof=0 1 2" comment:"性别"` Avatar *string `json:"avatar" validate:"omitempty,url,max=255" comment:"头像"` Wechat *UpdateWechatProfileParams `json:"wechat" validate:"omitempty" comment:"微信绑定信息"` // 更新微信绑定的帐号相关 }
type UpdateWechatProfileParams ¶
type UpdateWechatProfileParams struct { Nickname *string `json:"nickname" validate:"omitempty,max=32" comment:"微信昵称"` // 用户昵称 AvatarUrl *string `json:"avatar_url" validate:"omitempty,url,max=255" comment:"微信头像"` // 用户头像 Gender *int `json:"gender" validate:"omitempty,number" comment:"性别"` // 性别 Country *string `json:"country" validate:"omitempty,max=32" comment:"国家"` // 国家 Province *string `json:"province" validate:"omitempty,max=32" comment:"省份"` // 省份 City *string `json:"city" validate:"omitempty,max=32" comment:"城市"` // 城市 Language *string `json:"language" validate:"omitempty,max=32" comment:"语言"` // 语言 }
绑定的微信信息帐号相关
Click to show internal directories.
Click to hide internal directories.