globalconfig

package
v1.4.0-postgres-hotfix Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2025 License: LGPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// Env is the environment the CLI is running in
	Env = "DEV"
)
View Source
var GetConfigDir = func() (string, error) {
	homeDir, err := os.UserHomeDir()
	if err != nil {
		return "", err
	}

	return filepath.Join(homeDir, configDir), nil
}

Functions

func SaveGlobalConfig added in v1.4.0

func SaveGlobalConfig(globalConfig GlobalConfig) error

func SetupConfigDir

func SetupConfigDir() error

Types

type Credential added in v1.2.9

type Credential struct {
	Token string `json:"token"`
	ID    string `json:"id"`
	Name  string `json:"name"`
}

type GlobalConfig added in v1.4.0

type GlobalConfig struct {
	OrganizationID string     `json:"organization_id"`
	ProjectID      string     `json:"project_id"`
	Credential     Credential `json:"credential"`
}

func GetGlobalConfig added in v1.4.0

func GetGlobalConfig() (GlobalConfig, error)

Jump to

Keyboard shortcuts

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