config

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2023 License: Apache-2.0 Imports: 8 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 {
	Server ServerConfig `yaml:"server"`
	Metric MetricConfig `yaml:"metric"`

	Provider  ProviderConfig  `yaml:"provider"`
	Converter ConverterConfig `yaml:"converter"`
}

func Parse

func Parse(configPath string) (*Config, error)

func (*Config) Host added in v0.2.0

func (cfg *Config) Host(ref string) (remote.CredentialFunc, bool, error)

type ContainerdConfig

type ContainerdConfig struct {
	Address     string `yaml:"address"`
	Snapshotter string `yaml:"snapshotter"`
}

type ConversionRule

type ConversionRule struct {
	TagSuffix string `yaml:"tag_suffix"`
}

type ConverterConfig

type ConverterConfig struct {
	Worker           int              `yaml:"worker"`
	Driver           DriverConfig     `yaml:"driver"`
	HarborAnnotation bool             `yaml:"harbor_annotation"`
	Platforms        string           `yaml:"platforms"`
	Rules            []ConversionRule `yaml:"rules"`
}

type DriverConfig

type DriverConfig struct {
	Type   string            `yaml:"type"`
	Config map[string]string `yaml:"config"`
}

type MetricConfig

type MetricConfig struct {
	Enabled bool `yaml:"enabled"`
}

type ProviderConfig

type ProviderConfig struct {
	Source     map[string]SourceConfig `yaml:"source"`
	Containerd ContainerdConfig        `yaml:"containerd"`
}

type ServerConfig

type ServerConfig struct {
	Name string `yaml:"name"`
	Uds  string `yaml:"uds"`
	Host string `yaml:"host"`
	Port string `yaml:"port"`
}

type SourceConfig

type SourceConfig struct {
	Auth     string  `yaml:"auth"`
	Insecure bool    `yaml:"insecure"`
	Webhook  Webhook `yaml:"webhook"`
}

type Webhook

type Webhook struct {
	AuthHeader string `yaml:"auth_header"`
}

Jump to

Keyboard shortcuts

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