user

package
v0.0.0-...-b00af6b Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func UsersList

func UsersList(db *database.Database) (map[int64]*User, error)

Types

type User

type User struct {
	*database.Database
	// contains filtered or unexported fields
}

func Create

func Create(ui *UserInit) (*User, error)

func CreateFromRecord

func CreateFromRecord(r map[string]interface{}, db *database.Database) (*User, error)

func Find

func Find(db *database.Database, id int64) (*User, error)

func (*User) Hash

func (u *User) Hash() string

func (*User) ID

func (u *User) ID() int64

func (*User) SetTZ

func (u *User) SetTZ(tz string) *User

func (*User) SetTZLabel

func (u *User) SetTZLabel(tzLabel string) *User

func (*User) SetTZOffset

func (u *User) SetTZOffset(tzOffset int64) *User

func (*User) TZ

func (u *User) TZ() string

func (*User) TZOffset

func (u *User) TZOffset() int64

func (*User) Update

func (u *User) Update() (*User, error)

func (*User) UpdateFromInit

func (u *User) UpdateFromInit(ui *UserInit) *User

type UserInit

type UserInit struct {
	*database.Database
	Uhash    string
	TZOffset int64
	TZLabel  string
	TZ       string
}

func NewInit

func NewInit(db *database.Database, rawPayload string, uhash string) (*UserInit, error)

Jump to

Keyboard shortcuts

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