session

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConnectPassword

func ConnectPassword(f PasswordHandle)

func ConnectSignin

func ConnectSignin(f SigninHandle)

func Password

func Password(ctx context.Context, id int64, old, password string) (changed bool, e error)

Types

type PasswordHandle

type PasswordHandle func(req *PasswordRequest, resp *PasswordResponse) (e error)

type PasswordRequest

type PasswordRequest struct {
	Context  context.Context
	ID       int64
	Old      string
	Password string
}

type PasswordResponse

type PasswordResponse struct {
	Changed bool
}

type SigninHandle

type SigninHandle func(req *SigninRequest, resp *SigninResponse) (e error)

type SigninRequest

type SigninRequest struct {
	Context  context.Context
	Platform string
	Unix     int64
	Name     string
	Password string
}

type SigninResponse

type SigninResponse struct {
	ID int64
	// [a-zA-Z][a-zA-Z0-9]{4,}
	Name          string
	Nickname      string
	Authorization []int32
	Parent        int64
}

func Signin

func Signin(ctx context.Context,
	platform string, unix int64,
	name, password string,
) (result *SigninResponse, e error)

Jump to

Keyboard shortcuts

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