Documentation
¶
Overview ¶
The lib package is the implementation of the core functionality of the raid CLI tool.
Index ¶
- Constants
- Variables
- func AddProfile(profile Profile)
- func AddProfiles(profiles []Profile)
- func CloneRepository(repo Repo) error
- func ContainsEnv(name string) bool
- func ContainsProfile(name string) bool
- func ExecuteEnv(name string) error
- func ForceLoad() error
- func GetEnv() string
- func InitConfig() error
- func Install(maxThreads int) error
- func ListEnvs() []string
- func Load() error
- func RemoveProfile(name string) error
- func Set(key string, value any)
- func SetEnv(name string) error
- func SetProfile(name string) error
- func ValidateProfile(path string) error
- func Write()
- type Context
- type Env
- type EnvVar
- type Profile
- type Repo
Constants ¶
View Source
const ( ConfigDirName = ".raid" ConfigFileName = "config.toml" ConfigPathDefault = "~" + sys.Sep + ConfigDirName + sys.Sep + ConfigFileName ConfigPathFlag = "config" ConfigPathFlagShort = "c" ConfigPathFlagDesc = "configuration file path (default is " + ConfigPathDefault + ")" )
View Source
const ( ACTIVE_PROFILE_KEY = "profile" ALL_PROFILES_KEY = "profiles" PROFILE_SCHEMA_PATH = "schemas/raid-profile.schema.json" )
View Source
const (
ACTIVE_ENV_KEY = "env"
)
View Source
const (
YAML_SEP = "---"
)
Variables ¶
View Source
var CfgPath string
Functions ¶
func AddProfile ¶
func AddProfile(profile Profile)
func AddProfiles ¶
func AddProfiles(profiles []Profile)
func CloneRepository ¶
func ContainsEnv ¶
func ContainsProfile ¶
func ExecuteEnv ¶
func InitConfig ¶
func InitConfig() error
func RemoveProfile ¶
func SetProfile ¶
func ValidateProfile ¶
Types ¶
type Profile ¶
type Profile struct {
Name string `json:"name"`
Path string `json:"path"`
Repositories []Repo `json:"repositories"`
Environments []Env `json:"environments"`
}
func ExtractProfile ¶
func ExtractProfiles ¶
func GetProfile ¶
func GetProfile() Profile
func ListProfiles ¶
func ListProfiles() []Profile
Click to show internal directories.
Click to hide internal directories.