user

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2019 License: MIT Imports: 28 Imported by: 0

Documentation

Overview

Copyright 2019 Axetroy. All rights reserved. MIT license.

Copyright 2019 Axetroy. All rights reserved. MIT license.

Copyright 2019 Axetroy. All rights reserved. MIT license.

Copyright 2019 Axetroy. All rights reserved. MIT license.

Copyright 2019 Axetroy. All rights reserved. MIT license.

Copyright 2019 Axetroy. All rights reserved. MIT license.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateUser

func CreateUser(input CreateUserParams) (res schema.Response)

func CreateUserRouter

func CreateUserRouter(context *gin.Context)

func GenerateResetPayPasswordCode

func GenerateResetPayPasswordCode(uid string) string

func GetAvatarRouter

func GetAvatarRouter(context *gin.Context)

func GetList

func GetList(context controller.Context, input Query) (res schema.List)

func GetListRouter

func GetListRouter(context *gin.Context)

func GetProfile

func GetProfile(context controller.Context) (res schema.Response)

func GetProfileByAdmin

func GetProfileByAdmin(context controller.Context, userId string) (res schema.Response)

func GetProfileByAdminRouter

func GetProfileByAdminRouter(context *gin.Context)

func GetProfileRouter

func GetProfileRouter(context *gin.Context)

func ResetPayPassword

func ResetPayPassword(context controller.Context, input ResetPayPasswordParams) (res schema.Response)

func ResetPayPasswordRouter

func ResetPayPasswordRouter(context *gin.Context)

func SendResetPayPassword

func SendResetPayPassword(context controller.Context) (res schema.Response)

func SendResetPayPasswordRouter

func SendResetPayPasswordRouter(context *gin.Context)

func SetPayPassword

func SetPayPassword(context controller.Context, input SetPayPasswordParams) (res schema.Response)

func SetPayPasswordRouter

func SetPayPasswordRouter(context *gin.Context)

func SignOut

func SignOut(context *gin.Context)

func UpdatePassword

func UpdatePassword(context controller.Context, input UpdatePasswordParams) (res schema.Response)

func UpdatePasswordByAdmin

func UpdatePasswordByAdmin(context controller.Context, userId string, input UpdatePasswordByAdminParams) (res schema.Response)

func UpdatePasswordByAdminRouter

func UpdatePasswordByAdminRouter(context *gin.Context)

func UpdatePasswordRouter

func UpdatePasswordRouter(context *gin.Context)

func UpdatePayPassword

func UpdatePayPassword(context controller.Context, input UpdatePayPasswordParams) (res schema.Response)

func UpdatePayPasswordRouter

func UpdatePayPasswordRouter(context *gin.Context)

func UpdateProfile

func UpdateProfile(context controller.Context, input UpdateProfileParams) (res schema.Response)

func UpdateProfileByAdmin

func UpdateProfileByAdmin(context controller.Context, userId string, input UpdateProfileParams) (res schema.Response)

func UpdateProfileByAdminRouter

func UpdateProfileByAdminRouter(context *gin.Context)

func UpdateProfileRouter

func UpdateProfileRouter(context *gin.Context)

func UploadAvatar

func UploadAvatar(uid string, input UploadAvatarParams, file *multipart.FileHeader) (res schema.Response)

func UploadAvatarRouter

func UploadAvatarRouter(context *gin.Context)

Types

type CreateUserParams

type CreateUserParams struct {
	Username *string      `json:"username"`
	Email    *string      `json:"email"`
	Phone    *string      `json:"phone"`
	Nickname *string      `json:"nickname"`
	Gender   model.Gender `json:"gender"`
	Password string       `json:"password"`
}

type Query

type Query struct {
	schema.Query
}

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 {
	Nickname *string       `json:"nickname" valid:"length(1|36)~昵称长度为1-36位"`
	Gender   *model.Gender `json:"gender"`
	Avatar   *string       `json:"avatar"`
}

type UploadAvatarParams

type UploadAvatarParams struct {
	Immediately string `form:"immediately"` // 是否立即生效
}

Jump to

Keyboard shortcuts

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