model

package
v0.0.0-...-b0f0a3b Latest Latest
Warning

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

Go to latest
Published: Oct 4, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ErrorEmailConflict = Error("EMAIL_CONFLICT")
	ErrorTokenExpired  = Error("TOKEN_EXPIRED")
	ErrorUserInactive  = Error("USER_INACTIVE")
	ErrorTokenNotFound = Error("TOKEN_NOT_FOUND")
	ErrorUserNotFound  = Error("USER_NOT_FOUND")
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Account

type Account struct {
	ID      ID
	Created Time
	Updated Time
	Name    string
}

type Email

type Email string

func (Email) IsValid

func (e Email) IsValid() bool

func (Email) String

func (e Email) String() string

func (Email) ToLower

func (e Email) ToLower() Email

type Error

type Error string

Error is for errors in the business domain. See the constants below.

func (Error) Error

func (e Error) Error() string

type Group

type Group struct {
	ID        ID
	Created   Time
	Updated   Time
	AccountID ID `db:"accountID"`
	Name      string
}

type ID

type ID string

func (ID) String

func (i ID) String() string

type Job

type Job struct {
	ID       int
	Name     string
	Payload  Map
	Timeout  time.Duration
	Run      Time
	Received *Time
	Created  Time
	Updated  Time
}

type Map

type Map map[string]string

func (*Map) Scan

func (m *Map) Scan(src any) error

Scan satisfies sql.Scanner interface.

func (Map) Value

func (m Map) Value() (driver.Value, error)

Value satisfies driver.Valuer interface.

type Time

type Time struct {
	T time.Time
}

func (*Time) Scan

func (t *Time) Scan(src any) error

Scan satisfies sql.Scanner interface.

func (Time) Value

func (t Time) Value() (driver.Value, error)

Value satisfies driver.Valuer interface.

type User

type User struct {
	ID        ID
	Created   Time
	Updated   Time
	AccountID ID `db:"accountID"`
	Name      string
	Email     Email
	Confirmed bool
	Active    bool
}

Jump to

Keyboard shortcuts

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