user

package
v0.0.0-...-dd4cc49 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type User

type User struct {
	ID           int    `json:"id"`
	GroupID      int    `json:"group_id"`
	Username     string `json:"username"`
	Password     string `json:"password"`
	Email        string `json:"email"`
	Phone        string `json:"phone"`
	Contact      string `json:"contact"`
	EncryteToken string `json:"encryte_token"`
	Status       int    `json:"status"`
	CreatedAt    int64  `json:"created_at"`
	UpdatedAt    int64  `json:"updated_at"`
	SyncType     int    // 0: noneed, 1: insert, 2: update, 3: delete.
}

type Users

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

func Init

func Init(db *sql.DB, kv *kv.KVStore) *Users

func (*Users) Delete

func (u *Users) Delete(id int) error

func (*Users) Get

func (u *Users) Get(id int) (*User, error)

func (*Users) Insert

func (u *Users) Insert(user *User) error

func (*Users) Search

func (u *Users) Search(query string) ([]*User, error)

func (*Users) Sync

func (u *Users) Sync(syncType int) error

func (*Users) SyncSingle

func (u *Users) SyncSingle(id int) error

func (*Users) Update

func (u *Users) Update(user *User) error

Jump to

Keyboard shortcuts

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