human

package
v0.17.3 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2022 License: BSD-3-Clause Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CatalogProgress

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

func NewCatalogProgress

func NewCatalogProgress() *CatalogProgress

func (*CatalogProgress) Add

func (cp *CatalogProgress) Add(sid string, p SeriesProgress)

func (CatalogProgress) MarshalJSON

func (cp CatalogProgress) MarshalJSON() ([]byte, error)

type EntryProgress

type EntryProgress struct {
	EID     string `json:"eid" db:"eid"`
	Current int    `json:"current" db:"current"`
	Total   int    `json:"total" db:"total"`
}

func (EntryProgress) String

func (ep EntryProgress) String() string

type SeriesProgress

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

func NewSeriesProgress

func NewSeriesProgress() *SeriesProgress

func (*SeriesProgress) Add

func (sp *SeriesProgress) Add(eid string, p EntryProgress)

func (*SeriesProgress) Get

func (sp *SeriesProgress) Get(eid string) (EntryProgress, error)

func (SeriesProgress) MarshalJSON

func (sp SeriesProgress) MarshalJSON() ([]byte, error)

func (*SeriesProgress) UnmarshalJSON

func (sp *SeriesProgress) UnmarshalJSON(data []byte) error

type Type

type Type string
const (
	Admin    Type = "admin"
	Standard Type = "standard"
)

type User

type User struct {
	UID  string `json:"uid"  db:"uid"`
	Name string `json:"name" db:"name"`
	Pass string `json:"pass" db:"pass"`
	Type Type   `json:"type" db:"type"`
}

func NewUser

func NewUser(name, pass string, t Type) User

NewUser expects username and unhashed password along with the users permission

Jump to

Keyboard shortcuts

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