config

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2022 License: MIT Imports: 4 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildLocal

func BuildLocal(cfg *Config) error

func BuildVault

func BuildVault(c *Config) error

func GetVaultSecrets

func GetVaultSecrets(vaultAddress, vaultToken, secretPath string) (map[string]interface{}, error)

func KVStrings

func KVStrings(kvs []KVSecret) map[string]string

Types

type Config

type Config struct {
	Local
	Vault
}

func Build

func Build() (*Config, error)

type KVSecret

type KVSecret struct {
	Key   string
	Value string
}

func ParseKVSecrets

func ParseKVSecrets(data map[string]interface{}) ([]KVSecret, error)

type KVSecretData

type KVSecretData struct {
	Data map[string]interface{} `json:"data"`
}

type KeyService

type KeyService struct {
	Key     string `env:"HOOKS_KEY"`
	Secret  string `env:"HOOKS_SECRET"`
	Address string `env:"KEY_SERVICE_ADDRESS" envDefault:"key-service.k8sdeploy:8001"`
}

type Local

type Local struct {
	KeepLocal   bool `env:"LOCAL_ONLY" envDefault:"false" json:"keep_local,omitempty"`
	Development bool `env:"DEVELOPMENT" envDefault:"false" json:"development,omitempty"`
	HTTPPort    int  `env:"HTTP_PORT" envDefault:"3000" json:"port,omitempty"`
	Services    `json:"services"`
}

type OrchestratorService

type OrchestratorService struct {
	Key     string `env:"HOOKS_KEY"`
	Secret  string `env:"HOOKS_SECRET"`
	Address string `env:"ORCHESTRATOR_ADDRESS" envDefault:"orchestrator.k8sdeploy:8001"`
}

type Services

type Services struct {
	OrchestratorService
	KeyService
}

type Vault

type Vault struct {
	Address string `env:"VAULT_ADDRESS" envDefault:"http://vault.vault:8200"`
	Token   string `env:"VAULT_TOKEN" envDefault:""`
}

Jump to

Keyboard shortcuts

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