db

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: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Add

func Add(ctx context.Context, parent int64, name, nickname, password string, authorization []int32) (id int64, e error)

func Change

func Change(ctx context.Context, id int64, nickname string, authorization []int32) (bool, error)

Change properties

func Find

func Init

func Init()

func LastModified

func LastModified() (modtime time.Time)

func Parent

func Parent(ctx context.Context, id, parent int64) (bool, error)

func Password

func Password(ctx context.Context, id int64, value string) (bool, error)

Password change password

func Remove

func Remove(ctx context.Context, ids []int64) (int64, error)

Types

type DataOfUser

type DataOfUser struct {
	ID            int64   `xorm:"pk autoincr 'id'"`
	Parent        int64   `xorm:"index 'parent' default(0) "`
	Name          string  `xorm:"unique 'name' default('') "`
	Nickname      string  `xorm:"'nickname' default('') "`
	Password      string  `xorm:"'password' default('') "`
	Authorization []int32 `xorm:"'authorization'"`
}

func (DataOfUser) TableName

func (DataOfUser) TableName() string

func (*DataOfUser) ToPB

func (d *DataOfUser) ToPB() *grpc_user.Data

Jump to

Keyboard shortcuts

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