user

package
v0.14.6 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrMismatchedPassword = errors.New("password mismatched")

Functions

func CheckPasswordLever

func CheckPasswordLever(ps string) error

func DeleteUser

func DeleteUser(ctx *logger.RequestContext, userName string) error

func EncodePassWord

func EncodePassWord(password string) (string, error)

func GetUserByName

func GetUserByName(ctx *logger.RequestContext, userName string) (*model.User, error)

func IsLastUserPk

func IsLastUserPk(ctx *logger.RequestContext, pk int64) bool

func Login

func Login(ctx *logger.RequestContext, userName string, password string, passwordEncoded bool) (*model.User, error)

func UpdateUser

func UpdateUser(ctx *logger.RequestContext, userName, password string) error

Types

type CreateUserResponse

type CreateUserResponse struct {
	UserName string `json:"username"`
}

func CreateUser

func CreateUser(ctx *logger.RequestContext, userName, password string) (*CreateUserResponse, error)

type ListUserResponse

type ListUserResponse struct {
	common.MarkerInfo
	Users []model.User `json:"userList"`
}

func ListUser

func ListUser(ctx *logger.RequestContext, marker string, maxKeys int) (*ListUserResponse, error)

type LoginInfo

type LoginInfo struct {
	UserName string `json:"username"`
	Password string `json:"password"`
}

type LoginResponse

type LoginResponse struct {
	Authorization string `json:"authorization"`
}

type UpdateUserArgs

type UpdateUserArgs struct {
	Password string `json:"password"`
}

Jump to

Keyboard shortcuts

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