user_mgr

package
v0.0.0-...-69b6b67 Latest Latest
Warning

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

Go to latest
Published: May 7, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeleteUser

func DeleteUser(id int64) error

func UpdateUser

func UpdateUser(newData map[string]interface{}, id int64) error

Types

type ExampleUserModel

type ExampleUserModel struct {
	Id               int64  `json:"id"`
	Status           string `json:"status"`
	Name             string `json:"name"`
	Email            string `json:"email"`
	Updated_unixtime int64  `json:"updated_unixtime" gorm:"autoUpdateTime"`
	Created_unixtime int64  `json:"created_unixtime" gorm:"autoCreateTime"`
}

example for GormDB and tools cache

func CreateUser

func CreateUser(userInfo *ExampleUserModel) (*ExampleUserModel, error)

type QueryUserResult

type QueryUserResult struct {
	Users       []*ExampleUserModel `json:"users"`
	Total_count int64               `json:"total_count"`
}

query

func QueryUser

func QueryUser(id *int64, status *string, name *string, email *string, limit int, offset int, fromCache bool, updateCache bool) (*QueryUserResult, error)

Jump to

Keyboard shortcuts

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