user_login

package
v0.0.0-...-6db71ed Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MaxUsernameLength = 100
	MaxPasswordLength = 20
	MinPasswordLength = 8
)

Variables

This section is empty.

Functions

This section is empty.

Types

type LoginResponse

type LoginResponse struct {
	UserId int64  `json:"user_id"`
	Token  string `json:"token"`
}

func PostUserLogin

func PostUserLogin(username, password string) (*LoginResponse, error)

PostUserLogin 注册用户并得到token和id

func QueryUserLogin

func QueryUserLogin(username, password string) (*LoginResponse, error)

QueryUserLogin 查询用户是否存在,并返回token和id

type PostUserLoginFlow

type PostUserLoginFlow struct {
	// contains filtered or unexported fields
}

func NewPostUserLoginFlow

func NewPostUserLoginFlow(username, password string) *PostUserLoginFlow

func (*PostUserLoginFlow) Do

type QueryUserLoginFlow

type QueryUserLoginFlow struct {
	// contains filtered or unexported fields
}

func NewQueryUserLoginFlow

func NewQueryUserLoginFlow(username, password string) *QueryUserLoginFlow

func (*QueryUserLoginFlow) Do

Jump to

Keyboard shortcuts

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