config

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: May 26, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultAPIURL  = "https://api.ararahq.com/api"
	ConfigDir      = ".arara"
	ConfigFileName = "config.yaml"
	DefaultOutput  = "table"
	DefaultMode    = "test"
)
View Source
const (
	AuthTypeAPIKey = "apikey"
	AuthTypeOAuth  = "oauth"
)
View Source
const ServiceName = "ararahq-cli"

Variables

This section is empty.

Functions

func ConfigPath

func ConfigPath() string

func DeleteAPIKey

func DeleteAPIKey(profileName string) error

func EnsureConfigDir

func EnsureConfigDir() error

func GetAPIKey

func GetAPIKey(profileName string) (string, error)

func Save

func Save(configuration *Config) error

func StoreAPIKey

func StoreAPIKey(profileName string, apiKey string) error

Types

type Config

type Config struct {
	CurrentProfile string             `yaml:"current_profile"`
	Output         string             `yaml:"output"`
	Profiles       map[string]Profile `yaml:"profiles"`
}

func Load

func Load() (*Config, error)

type Profile

type Profile struct {
	APIKey   string `yaml:"api_key"`
	APIURL   string `yaml:"api_url"`
	Mode     string `yaml:"mode"`
	AuthType string `yaml:"auth_type,omitempty"`
}

func GetActiveProfile

func GetActiveProfile(configuration *Config) (*Profile, error)

Jump to

Keyboard shortcuts

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