reader

package
v0.0.0-...-d596c2c Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DC

type DC struct {
	Vars      EnvVars   `yaml:"vars,omitempty"`
	Secrets   Secrets   `yaml:"secrets,omitempty"`
	KVSecrets KVSecrets `yaml:"kv_secrets,omitempty"`
}

type EnvVars

type EnvVars map[string]string

func (EnvVars) GetOutput

func (e EnvVars) GetOutput() OutputList

type Environment

type Environment struct {
	Vars      EnvVars       `yaml:"vars,omitempty"`
	Secrets   Secrets       `yaml:"secrets,omitempty"`
	KVSecrets KVSecrets     `yaml:"kv_secrets,omitempty"`
	Dcs       map[string]DC `yaml:"dcs,omitempty"`
}

type KVSecret

type KVSecret map[string]string

type KVSecretBlock

type KVSecretBlock struct {
	Path string
	Vars KVSecret
}

func (KVSecretBlock) GetOutput

func (s KVSecretBlock) GetOutput(ctx context.Context, r *Reader) (OutputList, error)

type KVSecrets

type KVSecrets []KVSecretBlock

func (KVSecrets) GetOutput

func (s KVSecrets) GetOutput(ctx context.Context, r *Reader) (OutputList, error)

type MountInfo

type MountInfo struct {
	Type    string
	Version string
}

type Mounts

type Mounts map[string]MountInfo

type Output

type Output struct {
	Key     string
	Value   string
	Comment string
}

type OutputList

type OutputList []Output

func (OutputList) Print

func (o OutputList) Print(showComments bool)

type Reader

type Reader struct {
	// contains filtered or unexported fields
}

func NewReader

func NewReader() (*Reader, error)

func (*Reader) InitVault

func (r *Reader) InitVault() error

func (*Reader) MountAndPath

func (r *Reader) MountAndPath(path string) (string, string)

func (*Reader) Read

func (r *Reader) Read(ctx context.Context, input *Variables, env string, dc string) (OutputList, error)

type Secrets

type Secrets map[string]string

func (Secrets) GetOutput

func (s Secrets) GetOutput(ctx context.Context, r *Reader) (OutputList, error)

type Variables

type Variables struct {
	Vars         EnvVars                `yaml:"vars,omitempty"`
	Secrets      Secrets                `yaml:"secrets,omitempty"`
	KVSecrets    KVSecrets              `yaml:"kv_secrets,omitempty"`
	Environments map[string]Environment `yaml:"environments,omitempty"`
}

Jump to

Keyboard shortcuts

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