userservice

package
v0.0.0-...-139547c Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2020 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetUserInfo

func GetUserInfo(uID uint) (userdao.User, error)

func ModifyAvatar

func ModifyAvatar(req ModifyUserAvatarRequest, uID uint) (bool, error)

func ModifyUserInfo

func ModifyUserInfo(req ModifyUserInfoRequest, uID uint) (userdao.User, error)

func UserRegister

func UserRegister(req RegisterRequest) (bool, error)

用户注册

Types

type LoginRequest

type LoginRequest struct {
	Account  string `json:"account" binding:"required"`
	Password string `json:"password" binding:"required"`
}

type LoginResponse

type LoginResponse struct {
	Token     string `json:"token"`
	ExpiredAt int64  `json:"expired_at"`
}

func Login

func Login(req LoginRequest) (LoginResponse, error)

type ModifyUserAvatarRequest

type ModifyUserAvatarRequest struct {
	FileURL string `json:"file_url"`
}

type ModifyUserInfoRequest

type ModifyUserInfoRequest struct {
	Nickname string `json:"nickname"`
	Gender   string `json:"gender"`
	Bio      string `json:"bio"`
}

type RegisterRequest

type RegisterRequest struct {
	Account  string `json:"account" binding:"required"`
	Password string `json:"password" binding:"required"`
}

Jump to

Keyboard shortcuts

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