user

package
v0.5.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 28, 2020 License: MIT Imports: 16 Imported by: 0

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

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 GenerateResetPayPasswordCode

func GenerateResetPayPasswordCode(uid string) string

func GetProfile

func GetProfile(c helper.Context) (res schema.Response)

func ResetPayPassword

func ResetPayPassword(c helper.Context, input ResetPayPasswordParams) (res schema.Response)

func SendAuthEmail

func SendAuthEmail(c helper.Context) (res schema.Response)

func SendAuthPhone

func SendAuthPhone(c helper.Context) (res schema.Response)

func SendResetPayPassword

func SendResetPayPassword(c helper.Context) (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 UpdatePasswordByAdmin(c helper.Context, userId string, input UpdatePasswordByAdminParams) (res schema.Response)

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 ResetPayPasswordParams struct {
	Code        string `json:"code" valid:"required~请输入重置码"` // 重置码
	NewPassword string ``                                    // 新的交易密码
	/* 134-byte string literal not displayed */
}

type SetPayPasswordParams

type SetPayPasswordParams struct {
	Password        string `json:"password" valid:"required~请输入密码,int~请输入纯数字的密码,length(6|6)~密码长度为6位"`
	PasswordConfirm string `` /* 138-byte string literal not displayed */
}

type UpdatePasswordByAdminParams

type UpdatePasswordByAdminParams struct {
	NewPassword string `json:"new_password" valid:"required~请输入新密码"`
}

type UpdatePasswordParams

type UpdatePasswordParams struct {
	OldPassword string `json:"old_password" valid:"required~请输入旧密码"`
	NewPassword string `json:"new_password" valid:"required~请输入新密码"`
}

type UpdatePayPasswordParams

type UpdatePayPasswordParams struct {
	OldPassword string `json:"old_password" valid:"required~请输入旧密码,int~请输入纯数字的旧密码,length(6|6)~旧密码长度为6位"`
	NewPassword string `json:"new_password" valid:"required~请输入新密码,int~请输入纯数字的新密码,length(6|6)~新密码长度为6位"`
}

type UpdateProfileParams

type UpdateProfileParams struct {
	Username *string                    `json:"username"` // 用户名,部分用户有机会修改自己的用户名,比如微信注册的帐号
	Nickname *string                    `json:"nickname" valid:"length(1|36)~昵称长度为1-36位"`
	Gender   *model.Gender              `json:"gender"`
	Avatar   *string                    `json:"avatar"`
	Wechat   *UpdateWechatProfileParams `json:"wechat"` // 更新微信绑定的帐号相关
}

type UpdateWechatProfileParams

type UpdateWechatProfileParams struct {
	Nickname  *string `json:"nickname"`   // 用户昵称
	AvatarUrl *string `json:"avatar_url"` // 用户头像
	Gender    *int    `json:"gender"`     // 性别
	Country   *string `json:"country"`    // 国家
	Province  *string `json:"province"`   // 省份
	City      *string `json:"city"`       // 城市
	Language  *string `json:"language"`   // 语言
}

绑定的微信信息帐号相关

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL