rc

package
v1.8.0 Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Cleanup added in v1.4.0

func Cleanup()

Cleanup will clean up any temporary files that the rc package may have made. Cleanup is thread-safe and can be called multiple times.

Types

type Config

type Config struct {
	Version int               `yaml:"version"`
	Current string            `yaml:"current"`
	Vaults  map[string]*Vault `yaml:"vaults"`
	Options Options           `yaml:"options"`
}

func Apply

func Apply(use string) Config

func Read added in v1.1.0

func Read() Config

func (*Config) Apply

func (c *Config) Apply(use string) error

func (*Config) CACerts added in v1.4.0

func (c *Config) CACerts() []string

func (*Config) Find added in v0.7.0

func (c *Config) Find(alias string) (*Vault, bool, error)

func (*Config) HasStrongbox added in v1.4.0

func (c *Config) HasStrongbox() bool

func (*Config) Namespace added in v1.5.0

func (c *Config) Namespace() string

func (*Config) SetCurrent

func (c *Config) SetCurrent(alias string, reskip bool) error

func (*Config) SetTarget

func (c *Config) SetTarget(alias string, config Vault) error

func (*Config) SetToken

func (c *Config) SetToken(token string) error

func (*Config) URL

func (c *Config) URL() string

func (*Config) Vault added in v0.5.0

func (c *Config) Vault(which string) (*Vault, error)

func (*Config) Verified added in v0.0.28

func (c *Config) Verified() bool

func (*Config) Write

func (c *Config) Write() error

type Options added in v1.6.0

type Options struct {
	ManageVaultToken bool `yaml:"manage_vault_token"`
}

type Vault added in v0.5.0

type Vault struct {
	URL         string   `yaml:"url"`
	Token       string   `yaml:"token"`
	CACerts     []string `yaml:"ca_certs,omitempty"`
	SkipVerify  bool     `yaml:"skip_verify,omitempty"`
	NoStrongbox bool     `yaml:"no_strongbox,omitempty"`
	Namespace   string   `yaml:"namespace,omitempty"`
}

Jump to

Keyboard shortcuts

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