config

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultAppFolder      = "garm-cli"
	DefaultConfigFileName = "config.toml"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Managers      []Manager `toml:"manager"`
	ActiveManager string    `toml:"active_manager"`
	// contains filtered or unexported fields
}

func LoadConfig

func LoadConfig() (*Config, error)

func (*Config) DeleteProfile

func (c *Config) DeleteProfile(name string) error

func (*Config) GetActiveConfig

func (c *Config) GetActiveConfig() (Manager, error)

func (*Config) HasManager

func (c *Config) HasManager(mgr string) bool

func (*Config) SaveConfig

func (c *Config) SaveConfig() error

func (*Config) SetManagerToken

func (c *Config) SetManagerToken(name, token string) error

type Manager

type Manager struct {
	Name    string `toml:"name"`
	BaseURL string `toml:"base_url"`
	Token   string `toml:"bearer_token"`
}

Jump to

Keyboard shortcuts

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