config

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2020 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Default   string          `mapstructure:"default"`
	Files     Files           `yaml:"-"`
	Keyring   storage.Keyring `mapstructure:"keyring"`
	VaultEnvs []VaultEnv      `mapstructure:"contexts" yaml:"contexts"`
}

func New added in v0.3.0

func New() *Config

func (*Config) Add added in v0.3.0

func (c *Config) Add(url, namespace, alias string) error

func (*Config) Delete added in v0.3.0

func (c *Config) Delete(ctx string)

func (*Config) Exists added in v0.3.0

func (c *Config) Exists(v VaultEnv) error

func (*Config) FileCheck added in v0.3.0

func (c *Config) FileCheck(enable bool)

func (*Config) TokenHelper added in v0.3.0

func (c *Config) TokenHelper(cmd string)

func (*Config) Write added in v0.3.0

func (c *Config) Write() error

type Files

type Files struct {
	Self      string
	SelfDir   string
	SelfPath  string
	Vault     string
	VaultPath string
	Home      string
}

type VaultEnv

type VaultEnv struct {
	URL       string        `mapstructure:"url"`
	Namespace string        `mapstructure:"namespace"`
	Alias     string        `mapstructure:"alias"`
	Token     storage.Token `yaml:"-"`
}

Jump to

Keyboard shortcuts

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