config

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2026 License: MIT Imports: 7 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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