cliconfig

package
v0.376.0 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2024 License: AGPL-3.0 Imports: 8 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 {
	// contains filtered or unexported fields
}

func New

func New(options *Options) *Config

func (*Config) GetConfig

func (c *Config) GetConfig(path string) (*UserConfig, error)

func (*Config) GetProject

func (c *Config) GetProject(path string) (*Project, error)

func (*Config) GetSecrets

func (c *Config) GetSecrets(path, environment string) (map[string]string, error)

func (*Config) RemoveSecret

func (c *Config) RemoveSecret(path, environment, key string) error

func (*Config) SetSecret

func (c *Config) SetSecret(path, environment, key, value string) error

type EnvironmentSecret

type EnvironmentSecret struct {
	Development map[string]string `yaml:"development"`
	Test        map[string]string `yaml:"test"`
}

type Options

type Options struct {
	FileName   string
	WorkingDir string
}

type Project

type Project struct {
	Secrets EnvironmentSecret `yaml:"secrets"`
}

type UserConfig

type UserConfig struct {
	Projects map[string]Project `yaml:"projects"`
}

Jump to

Keyboard shortcuts

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