model

package
v0.13.0-alpha.65 Latest Latest
Warning

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

Go to latest
Published: Dec 25, 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 {
	TTLSecond      uint64    `json:"ttl_second"`
	AllowAnonymous bool      `json:"allow_anonymous"`
	Anonymous      TokenAttr `json:"anonymous"`

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

	EnableAllowlist      bool     `json:"enable_allowlist"`
	Allowlist            []string `json:"allowlist"`
	AllowlisBlockMessage string   `json:"allowlist_block_message"`

	SpecialIPs map[string]TokenAttr `json:"special_ips"`
}

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,omitempty"`
	RateLimitPerSecond uint64 `json:"rate_limit_per_second,omitempty"`
	AllowTagsList      bool   `json:"allow_tags_list,omitempty"`
	NoAllowlist        bool   `json:"no_allowlist,omitempty"`
	NoBlock            bool   `json:"no_block,omitempty"`

	BlobsURL string `json:"blobs_url,omitempty"`

	Block        bool   `json:"block,omitempty"`
	BlockMessage string `json:"block_message,omitempty"`
}

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