options

package
v0.21.1-0...-a3b014d Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddAllFlags

func AddAllFlags(flags *pflag.FlagSet, i ...Interface)

func Bind

func Bind(v *viper.Viper, configKey string, flag *pflag.Flag) error

func BindAllFlags

func BindAllFlags(flags *pflag.FlagSet, v *viper.Viper, i ...Interface) error

func BindOrExit

func BindOrExit(v *viper.Viper, configKey string, flag *pflag.Flag)

func FormatPositionalArgsHelp

func FormatPositionalArgsHelp(args map[string]string) string

func Summarize

func Summarize(itf interface{}, currentPath []string) string

Types

type Build

type Build struct {
	DBLocation `yaml:",inline" mapstructure:",squash"` // note: json will anonymously embed the struct if there is no tag (like yaml inline)

	// bound options
	SkipValidation bool `yaml:"skip-validation" json:"skip-validation" mapstructure:"skip-validation"`
	SchemaVersion  int  `yaml:"schema-version" json:"schema-version" mapstructure:"schema-version"`
}

func DefaultBuild

func DefaultBuild() Build

func (*Build) AddFlags

func (o *Build) AddFlags(flags *pflag.FlagSet)

func (*Build) BindFlags

func (o *Build) BindFlags(flags *pflag.FlagSet, v *viper.Viper) error

type CacheArchive

type CacheArchive struct {
	// bound options
	Path string `yaml:"archive" json:"archive" mapstructure:"archive"`
}

func DefaultCacheArchive

func DefaultCacheArchive() CacheArchive

func (*CacheArchive) AddFlags

func (o *CacheArchive) AddFlags(flags *pflag.FlagSet)

func (*CacheArchive) BindFlags

func (o *CacheArchive) BindFlags(flags *pflag.FlagSet, v *viper.Viper) error

type CacheRestore

type CacheRestore struct {
	// bound options
	DeleteExisting bool `yaml:"delete-existing" json:"delete-existing" mapstructure:"delete-existing"`
}

func DefaultCacheRestore

func DefaultCacheRestore() CacheRestore

func (*CacheRestore) AddFlags

func (o *CacheRestore) AddFlags(flags *pflag.FlagSet)

func (*CacheRestore) BindFlags

func (o *CacheRestore) BindFlags(flags *pflag.FlagSet, v *viper.Viper) error

type DBLocation

type DBLocation struct {
	// bound options
	Directory string `yaml:"dir" json:"dir" mapstructure:"dir"`
}

func DefaultDBLocation

func DefaultDBLocation() DBLocation

func (*DBLocation) AddFlags

func (o *DBLocation) AddFlags(flags *pflag.FlagSet)

func (*DBLocation) BindFlags

func (o *DBLocation) BindFlags(flags *pflag.FlagSet, v *viper.Viper) error

type Format

type Format struct {
	Output           string   `yaml:"output" json:"output" mapstructure:"output"`
	AllowableFormats []string `yaml:"-" json:"-" mapstructure:"-"`
}

func (*Format) AddFlags

func (o *Format) AddFlags(flags *pflag.FlagSet)

func (*Format) BindFlags

func (o *Format) BindFlags(flags *pflag.FlagSet, v *viper.Viper) error

type Interface

type Interface interface {
	AddFlags(*pflag.FlagSet)
	BindFlags(*pflag.FlagSet, *viper.Viper) error
}

type Package

type Package struct {
	// bound options
	PublishBaseURL           string `yaml:"publish-base-url" json:"publish-base-url" mapstructure:"publish-base-url"`
	OverrideArchiveExtension string `yaml:"override-archive-extension" json:"override-archive-extension" mapstructure:"override-archive-extension"`
}

func DefaultPackage

func DefaultPackage() Package

func (*Package) AddFlags

func (o *Package) AddFlags(flags *pflag.FlagSet)

func (*Package) BindFlags

func (o *Package) BindFlags(flags *pflag.FlagSet, v *viper.Viper) error

type Provider

type Provider struct {
	// bound options
	Selection `yaml:",inline" mapstructure:",squash"`

	// unbound options
	Store   `yaml:",inline" mapstructure:",squash"`
	Vunnel  Vunnel            `yaml:"vunnel" json:"vunnel" mapstructure:"vunnel"`
	Configs []provider.Config `yaml:"configs" json:"configs" mapstructure:"configs"`
}

func DefaultProvider

func DefaultProvider() Provider

func (*Provider) AddFlags

func (o *Provider) AddFlags(flags *pflag.FlagSet)

func (*Provider) BindFlags

func (o *Provider) BindFlags(flags *pflag.FlagSet, v *viper.Viper) error

func (Provider) Redact

func (o Provider) Redact()

type Pull

type Pull struct {
	// bound options
	Parallelism int `yaml:"parallelism" json:"parallelism" mapstructure:"parallelism"`
}

func DefaultPull

func DefaultPull() Pull

func (*Pull) AddFlags

func (o *Pull) AddFlags(flags *pflag.FlagSet)

func (*Pull) BindFlags

func (o *Pull) BindFlags(flags *pflag.FlagSet, v *viper.Viper) error

type Results

type Results struct {
	ResultsOnly bool `yaml:"results-only" json:"results-only" mapstructure:"results-only"`
}

func DefaultResults

func DefaultResults() Results

func (Results) AddFlags

func (r Results) AddFlags(flags *pflag.FlagSet)

func (Results) BindFlags

func (r Results) BindFlags(flags *pflag.FlagSet, v *viper.Viper) error

type Selection

type Selection struct {
	// bound options
	IncludeFilter []string `yaml:"include-filter" json:"include-filter" mapstructure:"include-filter"`
}

func DefaultSelection

func DefaultSelection() Selection

func (*Selection) AddFlags

func (o *Selection) AddFlags(flags *pflag.FlagSet)

func (*Selection) BindFlags

func (o *Selection) BindFlags(flags *pflag.FlagSet, v *viper.Viper) error

type Store

type Store struct {

	// unbound options
	Root string `yaml:"root" json:"root" mapstructure:"root"`
}

func DefaultStore

func DefaultStore() Store

func (*Store) AddFlags

func (o *Store) AddFlags(_ *pflag.FlagSet)

func (*Store) BindFlags

func (o *Store) BindFlags(_ *pflag.FlagSet, v *viper.Viper) error

type Vunnel

type Vunnel struct {

	// unbound options
	Config           string            `yaml:"config" json:"config" mapstructure:"config"`
	Executor         string            `yaml:"executor" json:"executor" mapstructure:"executor"`
	DockerTag        string            `yaml:"docker-tag" json:"docker-tag" mapstructure:"docker-tag"`
	DockerImage      string            `yaml:"docker-image" json:"docker-image" mapstructure:"docker-image"`
	GenerateConfigs  bool              `yaml:"generate-configs" json:"generate-configs" mapstructure:"generate-configs"`
	ExcludeProviders []string          `yaml:"exclude-providers" json:"exclude-providers" mapstructure:"exclude-providers"`
	Env              map[string]string `yaml:"env" json:"env" mapstructure:"-"` // note: we don't want users to specify run env vars by app config env vars
}

func DefaultVunnel

func DefaultVunnel() Vunnel

func (*Vunnel) AddFlags

func (o *Vunnel) AddFlags(flags *pflag.FlagSet)

func (*Vunnel) BindFlags

func (o *Vunnel) BindFlags(flags *pflag.FlagSet, v *viper.Viper) error

func (Vunnel) Redact

func (o Vunnel) Redact()

Jump to

Keyboard shortcuts

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