model

package
v0.13.0-alpha.51 Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Login

type Login struct {
	LoginID int64
	UserID  int64

	Type     string
	Account  string
	Password string
}

type Registry

type Registry struct {
	RegistryID int64
	UserID     int64

	Domain string
	Data   RegistryAttr
}

type RegistryAttr

type RegistryAttr struct {
	AllowAnonymous bool      `json:"allow_anonymous"`
	Anonymous      TokenAttr `json:"anonymous"`

	AllowPrefix bool   `json:"allow_prefix"`
	Source      string `json:"source"`

	AllowImages []string             `json:"allow_images"`
	SpecialIPs  map[string]TokenAttr `json:"special_ips"`

	Description string `json:"description"`
}

func (*RegistryAttr) Scan

func (n *RegistryAttr) Scan(value any) error

func (RegistryAttr) Value

func (n RegistryAttr) Value() (driver.Value, error)

type Token

type Token struct {
	TokenID int64
	UserID  int64

	Account  string
	Password string
	Data     TokenAttr
}

type TokenAttr

type TokenAttr struct {
	NoRateLimit        bool   `json:"no_rate_limit"`
	RateLimitPerSecond uint64 `json:"rate_limit_per_second"`
	NoAllowlist        bool   `json:"no_allowlist"`
	NoBlock            bool   `json:"no_block"`
	AllowTagsList      bool   `json:"allow_tags_list"`

	Description string `json:"description"`
}

func (*TokenAttr) Scan

func (n *TokenAttr) Scan(value any) error

func (TokenAttr) Value

func (n TokenAttr) Value() (driver.Value, error)

type User

type User struct {
	UserID   int64
	Nickname string

	Data UserAttr
}

type UserAttr

type UserAttr struct {
	NoRateLimit        bool   `json:"no_rate_limit"`
	RateLimitPerSecond uint64 `json:"rate_limit_per_second"`
	NoAllowlist        bool   `json:"no_allowlist"`
	NoBlock            bool   `json:"no_block"`
	AllowTagsList      bool   `json:"allow_tags_list"`
}

func (*UserAttr) Scan

func (n *UserAttr) Scan(value any) error

func (UserAttr) Value

func (n UserAttr) Value() (driver.Value, error)

Jump to

Keyboard shortcuts

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