config

package
v0.0.0-...-5861326 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2023 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Database   DatabaseConfig  `yaml:"database"`
	Logging    LoggingConfig   `yaml:"logging"`
	Scanner    Scanner         `yaml:"scanner"`
	Updater    Updater         `yaml:"updater"`
	Registries RegistryEntries `yaml:"registries"`
	Webhooks   Webhooks        `yaml:"webhooks"`
}

func GetDefaultConfig

func GetDefaultConfig() *Config

func (*Config) ReadConfigIfFound

func (c *Config) ReadConfigIfFound(path string) error

type ConsoleLogging

type ConsoleLogging struct {
	Level zerolog.Level `yaml:"level"`
}

type DatabaseConfig

type DatabaseConfig struct {
	Path string
}

func (DatabaseConfig) LoadDatabase

func (c DatabaseConfig) LoadDatabase(ctx context.Context) (*database.Database, error)

type FileLogging

type FileLogging struct {
	Directory string        `yaml:"directory"`
	Level     zerolog.Level `yaml:"level"`
}

type LoggingConfig

type LoggingConfig struct {
	Console ConsoleLogging `yaml:"console"`
	File    FileLogging    `yaml:"file"`
}

func (LoggingConfig) CreateLogger

func (c LoggingConfig) CreateLogger() *zerolog.Logger

type RegistryEntries

type RegistryEntries []RegistryEntry

func (RegistryEntries) GetAuthConfigFor

func (e RegistryEntries) GetAuthConfigFor(domain string) *RegistryEntry

func (RegistryEntries) GetSystemContextFor

func (e RegistryEntries) GetSystemContextFor(domain string) *types.SystemContext

type RegistryEntry

type RegistryEntry struct {
	Domain   string `yaml:"domain,omitempty"`
	Username string `yaml:"username,omitempty"`
	Password string `yaml:"password,omitempty"`
	Insecure bool   `yaml:"insecure,omitempty"`
}

func (RegistryEntry) ConvertToAuthConfig

func (e RegistryEntry) ConvertToAuthConfig() *types.DockerAuthConfig

func (RegistryEntry) GetSystemContext

func (e RegistryEntry) GetSystemContext() *types.SystemContext

type Scanner

type Scanner struct {
	Interval    string `yaml:"interval"`
	ImageAge    int    `yaml:"image_age"`
	ScanAll     bool   `yaml:"scan_all"`
	ScanStopped bool   `yaml:"scan_stopped"`
}

func (Scanner) IsIntervalValid

func (s Scanner) IsIntervalValid() bool

type Updater

type Updater struct {
	StopTimeout   int  `yaml:"stop_timeout"`
	RemoveVolumes bool `yaml:"remove_volumes"`
	RemoveImages  bool `yaml:"remove_images"`
}

type Webhook

type Webhook struct {
	Url    string        `yaml:"url"`
	Author WebhookAuthor `yaml:"author"`
	Kind   WebhookKind   `yaml:"kind"`
}

type WebhookAuthor

type WebhookAuthor struct {
	Name    string `yaml:"name"`
	Url     string `yaml:"url"`
	IconUrl string `yaml:"icon_url"`
}

type WebhookKind

type WebhookKind struct {
	ImageSuccess     *bool `yaml:"image_success"`
	ContainerSuccess *bool `yaml:"container_success"`
	Errors           *bool `yaml:"errors"`
}

type Webhooks

type Webhooks map[string]Webhook

Jump to

Keyboard shortcuts

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