config

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AdditionalMountDirectory = "/agbx"
)

Variables

View Source
var ErrNotFound = errors.New("config file not found")

Functions

func Create

func Create(directory string, configuration Config) error

Types

type Config

type Config struct {
	Providers map[string]ProviderConfig `yaml:"providers,omitempty"`
	Image     Image                     `yaml:"image"`
	Mounts    []Mount                   `yaml:"mounts,omitempty"`
	Version   int                       `yaml:"version"`
}

func Load

func Load(filePath string) (Config, error)

func LoadDefault

func LoadDefault(directory string) (Config, error)

func New

func New() Config

func (Config) MountsForProvider

func (c Config) MountsForProvider(name string) ([]Mount, error)

func (Config) Validate

func (c Config) Validate() error

type Image

type Image struct {
	Name   string `yaml:"name"`
	Tag    string `yaml:"tag"`
	Digest string `yaml:"digest,omitempty"`
}

func (Image) Reference

func (image Image) Reference() string

type Mount

type Mount struct {
	ReadOnly *bool  `yaml:"read_only,omitempty"`
	Source   string `yaml:"source"`
	Target   string `yaml:"target"`
}

func (Mount) IsReadOnly

func (mount Mount) IsReadOnly() bool

type ProviderConfig

type ProviderConfig struct {
	Mounts []Mount `yaml:"mounts,omitempty"`
}

Jump to

Keyboard shortcuts

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