entity

package
v0.0.0-...-69e7fd1 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TokenClassCode          = "code"
	TokenClassAccess        = "access"
	TokenClassRefresh       = "refresh"
	TokenClassResetPassword = "reset-password"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	ID          string
	Name        string
	Description *string
	Icon        *string
	Color       *string
	Image       *string
	Secret      string
	Home        string
	Callback    string
	IsActive    bool
	CreatedAt   time.Time
	UpdatedAt   time.Time
}

type Payload

type Payload map[string]string

func (*Payload) Agent

func (e *Payload) Agent() string

func (*Payload) Device

func (e *Payload) Device() string

func (*Payload) IP

func (e *Payload) IP() string

func (*Payload) Scan

func (e *Payload) Scan(val interface{}) error

func (*Payload) Value

func (e *Payload) Value() (driver.Value, error)

type Token

type Token struct {
	ID         string
	Class      string
	Hash       string
	UserID     string
	ClientID   string
	Payload    Payload
	NotBefore  time.Time
	Expiration time.Time
	CreatedAt  time.Time
	UpdatedAt  time.Time
}

func (*Token) IsActive

func (e *Token) IsActive() error

type User

type User struct {
	ID        string
	Image     *string
	Name      string
	Email     string
	Password  string
	CreatedAt time.Time
	UpdatedAt time.Time
}

func (*User) MaskEmail

func (e *User) MaskEmail() string

Jump to

Keyboard shortcuts

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