cfg

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2021 License: BSD-3-Clause Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Configuration

type Configuration struct {
	Namespace string
	Git       GitConfig      `koanf:",squash"`
	History   HistoryConfig  `koanf:",squash"`
	Orphan    OrphanConfig   `koanf:",squash"`
	Resource  ResourceConfig `koanf:",squash"`
	Log       LogConfig
	Delete    bool
}

Configuration holds a strongly-typed tree of the configuration

func NewDefaultConfig

func NewDefaultConfig() *Configuration

NewDefaultConfig retrieves the hardcoded configs with sane defaults

type GitConfig

type GitConfig struct {
	CommitLimit  int    `koanf:"commit-limit"`
	RepoPath     string `koanf:"repo-path"`
	Tag          bool   `koanf:"tags"`
	SortCriteria string `koanf:"sort"`
}

GitConfig configures git repository

type HistoryConfig

type HistoryConfig struct {
	Keep int
}

HistoryConfig configures the history command behaviour

type LogConfig

type LogConfig struct {
	LogLevel string `koanf:"level"`
	Batch    bool
	Verbose  bool
}

LogConfig configures the log

type OrphanConfig

type OrphanConfig struct {
	OlderThan           string `koanf:"older-than"`
	OrphanDeletionRegex string `koanf:"deletion-pattern"`
}

OrphanConfig configures the orphans command behaviour

type ResourceConfig added in v0.6.0

type ResourceConfig struct {
	Labels      []string `koanf:"label"`
	OlderThan   string   `koanf:"older-than"`
	DeleteAfter string   `koanf:"delete-after"`
}

ResourceConfig configures the resources and secrets

Jump to

Keyboard shortcuts

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