user

package
v0.0.0-...-dd69b3f Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrRecordInvalid = errors.New("record is invalid")
)

Functions

func Delete

func Delete(id bson.ObjectId) error

Types

type User

type User struct {
	ID   bson.ObjectId `json:"id" storm:"id"`
	Name string        `json:"name"`
	Role string        `json:"role"`
}

User holds data for a single user

func All

func All() ([]User, error)

All retrieves all user from the database

func One

func One(id bson.ObjectId) (*User, error)

One returns a single user record from the database

func (*User) Save

func (u *User) Save() error

Jump to

Keyboard shortcuts

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