config

package
v0.4.8 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultProfile = "default"

Variables

View Source
var DefaultServerURL = "https://intern.bekti.com"
View Source
var (
	ErrInvalidProfileName = errors.New("invalid profile name")
)

Functions

func NormalizeProfileName

func NormalizeProfileName(value string) (string, error)

func ResolveConfigDir

func ResolveConfigDir(flagValue string) (string, error)

func Save

func Save(configDir string, cfg File) error

func SetProfile

func SetProfile(cfg *File, name string, profile Profile)

Types

type File

type File struct {
	Profiles map[string]Profile `json:"profiles"`
}

func Load

func Load(configDir string) (File, error)

type Profile

type Profile struct {
	ServerURL    string `json:"server_url"`
	TokenBackend string `json:"token_backend,omitempty"`
}

func GetProfile

func GetProfile(cfg File, name string) Profile

Jump to

Keyboard shortcuts

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