config

package
v0.0.0-...-b1a777e Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitializeConfig

func InitializeConfig()

Types

type Config

type Config struct {
	GlobalPrefix string             `mapstructure:"global_prefix"`
	Projects     map[string]Project `mapstructure:"projects"`
}

Define the structs to match the updated YAML structure

func LoadConfig

func LoadConfig() (*Config, error)

Standalone function to load the configuration from a file

func (*Config) FormatParameterStorePath

func (c *Config) FormatParameterStorePath(projectName, environmentName string) (string, error)

func (*Config) GetEnvironment

func (c *Config) GetEnvironment(projectName, environmentName string) (*Environment, error)

Method to get the environment path

func (*Config) GetProject

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

func (*Config) PrintTable

func (c *Config) PrintTable()

Method to print the config as a table

func (*Config) ValidateConfig

func (c *Config) ValidateConfig() error

Function to validate the config

type Environment

type Environment struct {
	Prefix    string `mapstructure:"prefix"`
	LocalPath string `mapstructure:"local_path"`
}

func (*Environment) GetResolvedLocalPath

func (e *Environment) GetResolvedLocalPath() string

type Project

type Project struct {
	Prefix       string                 `mapstructure:"prefix"`
	Environments map[string]Environment `mapstructure:"environments"`
}

Jump to

Keyboard shortcuts

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