config

package
v0.0.0-...-aae20f0 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2026 License: GPL-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const MAX_DOCKER_SECRET_LENGTH = 64
View Source
const MAX_SANITISED_APP_NAME_LENGTH = 45

Variables

View Source
var (
	ABRA_DIR                  = config.GetAbraDir()
	SERVERS_DIR               = config.GetServersDir()
	RECIPES_DIR               = config.GetRecipesDir()
	LOGS_DIR                  = config.GetLogsDir()
	CATALOGUE_DIR             = config.GetCatalogueDir()
	RECIPES_JSON              = path.Join(config.GetCatalogueDir(), "recipes.json")
	REPOS_BASE_URL            = "https://git.coopcloud.tech/coop-cloud"
	CATALOGUE_JSON_REPO_NAME  = "recipes-catalogue-json"
	TOOLSHED_SSH_URL_TEMPLATE = "ssh://git@git.coopcloud.tech:2222/toolshed/%s.git"
	RECIPES_SSH_URL_TEMPLATE  = "ssh://git@git.coopcloud.tech:2222/coop-cloud/%s.git"

	// NOTE(d1): please note, this was done purely out of laziness on our part
	// AFAICR. it's easy to punt the value into the label because that is what is
	// expects. it's not particularly useful in terms of UI/UX but hey, nobody
	// complained yet!
	CHAOS_DEFAULT = "false"

	DIRTY_DEFAULT = "+U"

	MISSING_DEFAULT = "-"

	UNKNOWN_DEFAULT = "unknown"
)
View Source
var BackupbotLabel = "coop-cloud.backupbot.enabled"

Functions

func GetAllFilesInDirectory

func GetAllFilesInDirectory(directory string) ([]fs.FileInfo, error)

GetAllFilesInDirectory returns filenames of all files in directory

func GetAllFoldersInDirectory

func GetAllFoldersInDirectory(directory string) ([]string, error)

GetAllFoldersInDirectory returns both folder and symlink paths

func GetServers

func GetServers() ([]string, error)

GetServers retrieves all servers.

func ReadServerNames

func ReadServerNames() ([]string, error)

ReadServerNames retrieves all server names.

Types

type Abra

type Abra struct {
	AbraDir string `yaml:"abraDir"`
	// contains filtered or unexported fields
}

Abra defines the configuration file for abra.

func LoadAbraConfig

func LoadAbraConfig() Abra

LoadAbraConfig returns the abra configuration. It tries to find a abra configuration file (see findAbraConfig for lookup logic). When no configuration was found it returns the default config.

func (Abra) GetAbraDir

func (a Abra) GetAbraDir() string

GetAbraDir returns the abra dir. It has the following logic: 1. check if $ABRA_DIR is set 2. check if abraDir was set in a config file 3. use $HOME/.abra when above two options failed

func (Abra) GetCatalogueDir

func (a Abra) GetCatalogueDir() string

func (Abra) GetLogsDir

func (a Abra) GetLogsDir() string

func (Abra) GetRecipesDir

func (a Abra) GetRecipesDir() string

func (Abra) GetServersDir

func (a Abra) GetServersDir() string

Jump to

Keyboard shortcuts

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