config

package
v0.16.2 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2024 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ConfigType   = "cli.ocm" + cfgcpi.OCM_CONFIG_TYPE_SUFFIX
	ConfigTypeV1 = ConfigType + runtime.VersionSeparator + "v1"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	runtime.ObjectVersionedType `json:",inline"`

	ConfigSets  []string                 `json:"configSets,omitempty"`
	Credentials []string                 `json:"credentials,omitempty"`
	Settings    []string                 `json:"settings,omitempty"`
	Verbose     bool                     `json:"verbose,omitempty"`
	Signing     keyoption.ConfigFragment `json:"signing,omitempty"`
	Logging     logopts.ConfigFragment   `json:"logging,omitempty"`

	// ConfigFiles describes the cli argument for additional config files.
	// This is not persisted since it is resolved by the first evaluation.
	ConfigFiles []string `json:"-"`
}

Config describes a memory based config interface.

func New

func New() *Config

New creates a new memory ConfigSpec.

func (*Config) AddFlags

func (c *Config) AddFlags(fs *pflag.FlagSet)

func (*Config) ApplyTo

func (c *Config) ApplyTo(cctx config.Context, target interface{}) error

func (*Config) Evaluate

func (c *Config) Evaluate(ctx ocm.Context, main bool) (*EvaluatedOptions, error)

func (*Config) GetType

func (c *Config) GetType() string

type EvaluatedOptions

type EvaluatedOptions struct {
	LogOpts       *logopts.EvaluatedOptions
	Keys          *keyoption.EvaluatedOptions
	ConfigForward config.Config
}

Jump to

Keyboard shortcuts

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