user

package
v0.0.0-...-26336ce Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Auth

func Auth(uar *UserAuthRequest) (*user.User, error)

func GetUserByToken

func GetUserByToken(token string) (*user.User, error)

func GetUserByUUID

func GetUserByUUID(userUUID string) (*user.User, error)

Types

type UserAuthRequest

type UserAuthRequest struct {
	Token string `json:"token"`
}

type UserLoginRequest

type UserLoginRequest struct {
	Account  string `json:"account"`
	Password string `json:"password"`
}

func (*UserLoginRequest) Login

func (ulgr *UserLoginRequest) Login() (*helper.Token, error)

type UserProfile

type UserProfile struct {
	UserID uint   `json:"user_id"`
	Name   string `json:"name"`
}

type UserRequest

type UserRequest struct {
	Account  string      `json:"account"`
	Password string      `json:"password"`
	Profile  UserProfile `json:"profile"`
}

func (*UserRequest) GenerateUser

func (ur *UserRequest) GenerateUser() (*user.User, error)

Jump to

Keyboard shortcuts

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