model

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2024 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 CreatedToken

type CreatedToken struct {
	ID        uuid.UUID `json:"id"`
	CreatedAt time.Time `json:"createdAt"`
	UpdatedAt time.Time `json:"updatedAt"`
	UserID    uuid.UUID `json:"userID"`
	User      *User     `json:"user"`
	Scopes    []string  `json:"scopes"`
	Token     string    `json:"token"`
}

func (CreatedToken) GetCreatedAt

func (this CreatedToken) GetCreatedAt() time.Time

func (CreatedToken) GetID

func (this CreatedToken) GetID() uuid.UUID

func (CreatedToken) GetScopes

func (this CreatedToken) GetScopes() []string

func (CreatedToken) GetUpdatedAt

func (this CreatedToken) GetUpdatedAt() time.Time

func (CreatedToken) GetUser

func (this CreatedToken) GetUser() *User

func (CreatedToken) GetUserID

func (this CreatedToken) GetUserID() uuid.UUID

func (CreatedToken) IsTokenBase

func (CreatedToken) IsTokenBase()

type File

type File struct {
	ID        uuid.UUID  `json:"id" gorm:"default:(-)"`
	CreatedAt time.Time  `json:"createdAt"`
	UpdatedAt time.Time  `json:"updatedAt"`
	UserID    uuid.UUID  `json:"userID"`
	User      *User      `json:"user"`
	PublicID  string     `json:"publicID"`
	Name      *string    `json:"name,omitempty"`
	Extension *string    `json:"extension,omitempty"`
	Size      int64      `json:"size"`
	MimeType  string     `json:"mimeType"`
	Hash      types.Hash `json:"hash"`
}

type Token

type Token struct {
	ID        uuid.UUID      `json:"id" gorm:"default:(-)"`
	CreatedAt time.Time      `json:"createdAt"`
	UpdatedAt time.Time      `json:"updatedAt"`
	UserID    uuid.UUID      `json:"userID"`
	User      *User          `json:"user"`
	Hash      types.Hash     `json:"hash"`
	Scopes    pq.StringArray `json:"scopes" gorm:"type:text[]"`
}

func (Token) GetCreatedAt

func (t Token) GetCreatedAt() time.Time

func (Token) GetID

func (t Token) GetID() uuid.UUID

func (Token) GetScopes

func (t Token) GetScopes() []string

func (Token) GetUpdatedAt

func (t Token) GetUpdatedAt() time.Time

func (Token) GetUser

func (t Token) GetUser() *User

func (Token) GetUserID

func (t Token) GetUserID() uuid.UUID

func (Token) IsTokenBase

func (Token) IsTokenBase()

type TokenBase

type TokenBase interface {
	IsTokenBase()
	GetID() uuid.UUID
	GetCreatedAt() time.Time
	GetUpdatedAt() time.Time
	GetUserID() uuid.UUID
	GetUser() *User
	GetScopes() []string
}

type TokenInput

type TokenInput struct {
	Scopes []string `json:"scopes"`
}

type User

type User struct {
	ID                uuid.UUID `json:"id" gorm:"default:(-)"`
	CreatedAt         time.Time `json:"createdAt"`
	UpdatedAt         time.Time `json:"updatedAt"`
	PreferredUsername *string   `json:"preferredUsername"`
	OpenidSub         string    `json:"openidSub"`
	UsedStorage       int64     `json:"usedStorage"`
}

Jump to

Keyboard shortcuts

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