config

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2026 License: MIT Imports: 11 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 AuditConfig added in v0.2.0

type AuditConfig struct {
	LogDirectory string         `yaml:"log_directory"`
	Redact       AuditRedaction `yaml:"redact,omitempty"`
	Retention    AuditRetention `yaml:"retention,omitempty"`
}

func (AuditConfig) Validate added in v0.2.0

func (c AuditConfig) Validate() error

type AuditRedaction added in v0.2.0

type AuditRedaction struct {
	Headers         []string `yaml:"headers,omitempty"`
	QueryParameters []string `yaml:"query_parameters,omitempty"`
}

func (AuditRedaction) Validate added in v0.2.0

func (c AuditRedaction) Validate() error

type AuditRetention added in v0.2.0

type AuditRetention struct {
	MaxAge  string `yaml:"max_age,omitempty"`
	MaxRuns int    `yaml:"max_runs,omitempty"`
}

type Config

type Config struct {
	Network   NetworkConfig             `yaml:"network,omitempty"`
	Prepare   PrepareConfig             `yaml:"prepare,omitempty"`
	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 LoadDefaultWithPath added in v0.2.0

func LoadDefaultWithPath(directory string) (Config, string, error)

func New

func New() Config

func (Config) DockerfilesForProvider added in v0.2.0

func (c Config) DockerfilesForProvider(name string) []string

func (Config) MountsForProvider

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

func (Config) NetworkPolicyForProvider added in v0.2.1

func (c Config) NetworkPolicyForProvider(name string) *networkpolicy.Policy

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 NetworkConfig added in v0.2.0

type NetworkConfig struct {
	Audit  *AuditConfig          `yaml:"audit,omitempty"`
	Policy *networkpolicy.Policy `yaml:"policy,omitempty"`
}

type PrepareConfig added in v0.2.0

type PrepareConfig struct {
	Dockerfiles []string `yaml:"dockerfiles,omitempty"`
}

type ProviderConfig

type ProviderConfig struct {
	Dockerfiles []string                `yaml:"dockerfiles,omitempty"`
	Mounts      []Mount                 `yaml:"mounts,omitempty"`
	Network     networkpolicy.Additions `yaml:"network,omitempty"`
}

Jump to

Keyboard shortcuts

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