config

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2025 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNotExists = errors.New("config does not exist")
)

Functions

This section is empty.

Types

type Build

type Build struct {
	Dockerfile string            `koanf:"dockerfile"`
	Args       map[string]string `koanf:"args"`
	Driver     string            `koanf:"driver"`
	Secrets    map[string]string `koanf:"secrets"`
	Arch       []string          `koanf:"arch"`
	Builder    string
}

type Config

type Config struct {
	AppName     string
	Service     string            `koanf:"service"`
	Image       string            `koanf:"image"`
	Transaction Transaction       `koanf:"transaction"`
	Servers     []string          `koanf:"servers"`
	Host        string            `koanf:"host"`
	SSH         SSH               `koanf:"ssh"`
	Registry    Registry          `koanf:"registry"`
	Proxy       Proxy             `koanf:"proxy"`
	Build       Build             `koanf:"build"`
	Debug       bool              `koanf:"debug"`
	Env         map[string]string `koanf:"env"`
	Volumes     []string          `koanf:"volumes"`
}

func Get

func Get() *Config

func Load

func Load(f *pflag.FlagSet) (*Config, error)

type Proxy

type Proxy struct {
	Container string         `koanf:"container"`
	Img       string         `koanf:"image"`
	Args      map[string]any `koanf:"args"`
	Labels    map[string]any `koanf:"labels"`
	Volumes   []string       `koanf:"volumes"`
}

type Registry

type Registry struct {
	Server   string `koanf:"server"`
	Username string `koanf:"username"`
	Password string `koanf:"password"`
}

type SSH

type SSH struct {
	User string `koanf:"user"`
	Port int64  `koanf:"port"`
}

type Transaction

type Transaction struct {
	Bypass bool `koanf:"bypass"`
}

Jump to

Keyboard shortcuts

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