config

package
v0.8.2 Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultPath

func DefaultPath() string

func Save

func Save(path string, value Config) error

Types

type Config

type Config struct {
	Current   string              `json:"current"`
	Endpoints map[string]Endpoint `json:"endpoints"`
}

func Load

func Load(path string) (Config, error)

func (Config) Names

func (c Config) Names() []string

func (Config) Resolve

func (c Config) Resolve(name string) (Endpoint, error)

type Endpoint

type Endpoint struct {
	Name  string `json:"name"`
	URL   string `json:"url"`
	Token string `json:"token"`
	SSH   string `json:"ssh,omitempty"`
}

Jump to

Keyboard shortcuts

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