model

package
v2.11.20 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2021 License: MIT Imports: 1 Imported by: 10

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func StoreUser added in v2.4.0

func StoreUser(ctx context.Context, user User) context.Context

StoreUser stores given User in context

Types

type User

type User struct {
	Login    string `json:"login"`
	Password string `json:"password,omitempty"`
	ID       uint64 `json:"id"`
}

User of the app

func NewUser

func NewUser(id uint64, login string) User

NewUser creates new user with given id, login and profiles

func ReadUser added in v2.4.0

func ReadUser(ctx context.Context) User

ReadUser retrieves user from context

func (User) IsZero added in v2.11.4

func (u User) IsZero() bool

IsZero check if instance is valued or not

Jump to

Keyboard shortcuts

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