config

package
v0.0.0-...-577f95d Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2023 License: MIT Imports: 6 Imported by: 9

Documentation

Index

Constants

View Source
const DefaultEnv = "default"
View Source
const (
	KeyEnvironment string = "env"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Envs map[string]map[string]string `yaml:"env"`
	// contains filtered or unexported fields
}

func NewConfig

func NewConfig(appName, configName string) (*Config, error)

func (*Config) Env

func (c *Config) Env(name string) map[string]string

func (*Config) EnvProperty

func (c *Config) EnvProperty(env, key string) (string, error)

func (*Config) Path

func (c *Config) Path() string

func (*Config) RemoveEnv

func (c *Config) RemoveEnv(name string) error

func (*Config) RemoveEnvProperty

func (c *Config) RemoveEnvProperty(envName, key string) error

func (*Config) SetEnvProperty

func (c *Config) SetEnvProperty(env, key, value string) error

Jump to

Keyboard shortcuts

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