Help us shape the future of Go! Take the 2026 Go Developer Survey

config

package
v0.4.0-mvp3-rc Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultPath

func DefaultPath() (string, error)

Types

type Config

type Config struct {
	Current  string             `toml:"current"`
	Profiles map[string]Profile `toml:"profiles"`
}

type CredentialReader

type CredentialReader interface {
	Get(profile string) (string, error)
}

type Profile

type Profile struct {
	URL string `toml:"url"`
}

type Runtime

type Runtime struct {
	Profile string
	URL     string
	Token   string
}

func Resolve

func Resolve(cfg Config, creds CredentialReader, in RuntimeInput) (Runtime, error)

type RuntimeInput

type RuntimeInput struct {
	Profile string
	URL     string
	Token   string
}

type Service added in v0.4.0

type Service struct {
	Profile string
	URL     string
}

func ResolveService added in v0.4.0

func ResolveService(cfg Config, in ServiceInput) (Service, error)

type ServiceInput added in v0.4.0

type ServiceInput struct {
	Profile string
	URL     string
}

type Store

type Store struct{ Path string }

func NewStore

func NewStore(path string) (*Store, error)

func (*Store) Get

func (s *Store) Get(key string) (string, error)

func (*Store) Load

func (s *Store) Load() (Config, error)

func (*Store) Save

func (s *Store) Save(cfg Config) error

func (*Store) Set

func (s *Store) Set(key, value string) error

Jump to

Keyboard shortcuts

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