config

package
v0.51.3 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	URLKey      = "url"
	TokenKey    = "token"
	APITokenEnv = "PIXLET_TOKEN"
)

Variables

View Source
var (
	Config     = viper.New()
	ConfigOnce sync.Once
)
View Source
var ErrKeyNotFound = fmt.Errorf("key not found")
View Source
var ErrNoToken = fmt.Errorf("tronbyt API token not set. Use `tronbyt config set token <token>` to set it")
View Source
var ErrNoURL = fmt.Errorf("tronbyt URL not set. Use `tronbyt config set url <url>` to set it")

Functions

func GetToken added in v0.49.0

func GetToken() (string, error)

func GetURL added in v0.49.0

func GetURL() (string, error)

func InitConfig added in v0.50.2

func InitConfig()

func NewConfigCmd added in v0.49.0

func NewConfigCmd() *cobra.Command

func NewGetCmd added in v0.49.0

func NewGetCmd() *cobra.Command

func NewSetCmd added in v0.49.0

func NewSetCmd() *cobra.Command

Types

This section is empty.

Jump to

Keyboard shortcuts

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