userpass

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2022 License: MIT Imports: 4 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Manager

type Manager interface {
	inters.UserPasswordVerifier

	Register(ctx context.Context, userName, password string) (userID uint64, err error)
	GetUser(ctx context.Context, userID uint64) (user *User, err error)
	GetUserByUserName(ctx context.Context, userName string) (user *User, err error)

	UpdateUserExData(ctx context.Context, userID uint64, key string, val interface{}) error
	UpdateUserAllExData(ctx context.Context, userID uint64, exData map[string]interface{}) error
}

func NewManager

func NewManager(passwordSecret string, model inters.UserPasswordModel) Manager

type User

type User struct {
	ID       uint64
	UserName string
	CreateAt int64
	ExData   map[string]interface{}
}

Jump to

Keyboard shortcuts

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