domain

package
v0.0.0-...-a65319e Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2022 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Authorization

type Authorization struct {
	Path   string
	Method string
}

type Page

type Page struct {
	PageNumber int
	PageSize   int
	Sort       string
	Total      int64
}

func (*Page) FillDefaults

func (pg *Page) FillDefaults()

func (Page) IsLast

func (pg Page) IsLast() bool

func (Page) Offset

func (pg Page) Offset() int

func (Page) TotalPages

func (pg Page) TotalPages() int

type Permission

type Permission struct {
	ID   uuid.UUID
	Name string
}

type SimpleWorkspace

type SimpleWorkspace struct {
	ID   uuid.UUID `json:"id"`
	Name string    `json:"name"`
}

type SystemToken

type SystemToken struct {
	ID            uuid.UUID
	Name          string
	Revoked       bool
	Permissions   []Permission
	Workspaces    []SimpleWorkspace
	AllWorkspaces bool
	Token         string
	CreatedAt     *time.Time
	RevokedAt     *time.Time
	LastUsedAt    *time.Time
	Author        string
}

func (SystemToken) CreateUserFromSystemToken

func (systemToken SystemToken) CreateUserFromSystemToken() User

func (*SystemToken) SetLastUsed

func (systemToken *SystemToken) SetLastUsed()

type User

type User struct {
	ID            uuid.UUID
	Name          string
	PhotoURL      string
	Email         string
	IsRoot        bool
	SystemTokenID uuid.UUID
	CreatedAt     time.Time
}

Jump to

Keyboard shortcuts

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