config

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultConfigFilename = "./yashiro.yaml"

Variables

This section is empty.

Functions

This section is empty.

Types

type AwsConfig

type AwsConfig struct {
	ParameterStoreValues []AwsParameterStoreValueConfig `json:"parameter_store,omitempty"`
	SecretsManagerValues []ValueConfig                  `json:"secrets_manager,omitempty"`
	SdkConfig            *aws.Config                    `json:"-"`
}

AwsConfig is AWS service configuration.

type AwsParameterStoreValueConfig

type AwsParameterStoreValueConfig struct {
	ValueConfig
	Decryption *bool `json:"decryption,omitempty"`
}

AwsParameterStoreValueConfig is a AWS Systems Manager Parameter Store configuration. This is extended ValueConfig for parameter decryption.

type Config

type Config struct {
	Aws *AwsConfig `json:"aws,omitempty"`
}

Config is Yashiro configuration.

func NewFromFile

func NewFromFile(ctx context.Context, filename string) (*Config, error)

NewFromFile returns a new Config according to a file. The configuration file is assumed to be in YAML format.

type Value

type Value interface {
	GetReferenceName() string
	GetIsJSON() bool
}

Value is interface of external store value.

type ValueConfig

type ValueConfig struct {
	Name   string  `json:"name"`
	Ref    *string `json:"ref,omitempty"`
	IsJSON bool    `json:"is_json"`
}

ValueConfig is a value of external store configuration.

func (ValueConfig) GetIsJSON

func (c ValueConfig) GetIsJSON() bool

func (ValueConfig) GetReferenceName

func (c ValueConfig) GetReferenceName() string

GetReferenceName returns name of variable reference. If Ref is not set, returns Name.

Jump to

Keyboard shortcuts

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