db

package
v0.0.0-...-099495b Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init() error

func UserAclCheck

func UserAclCheck(name, password string) bool

func UserAdd

func UserAdd(name, password string) error

func UserDel

func UserDel(name string) error

func UserMod

func UserMod(name, password string) error

Types

type User

type User struct {
	Id       int64  `gorm:"primaryKey"`
	Name     string `gorm:"unique;size:50;comment:用户名"`
	Password string `gorm:"size:32;comment:用户密码"`
	Status   int    `gorm:"comment:状态"`

	Created     time.Time `gorm:"autoCreateTime;comment:创建时间"`
	CreatedUnix int64     `gorm:"autoCreateTime;comment:创建时间"`
	Updated     time.Time `gorm:"autoCreateTime;comment:更新时间"`
	UpdatedUnix int64     `gorm:"autoCreateTime;comment:更新时间"`
}

func UserGetByName

func UserGetByName(name string) (User, error)

func UsersList

func UsersList() ([]*User, error)

func (User) TableName

func (User) TableName() string

Jump to

Keyboard shortcuts

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