config

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: May 13, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultBaseURL = "https://api.flashcat.cloud"
)

Variables

This section is empty.

Functions

func ConfigDir

func ConfigDir() string

func ConfigPath

func ConfigPath() string

func ConfigSource

func ConfigSource(key string) string

ConfigSource returns the source of a config value for display.

func MaskKey

func MaskKey(key string) string

MaskKey partially masks an app key for display.

func Save

func Save(cfg *Config) error

Save writes the config to disk with restricted permissions.

Types

type Config

type Config struct {
	AppKey  string `yaml:"app_key"`
	BaseURL string `yaml:"base_url"`
}

func Load

func Load() (*Config, error)

Load reads config from file, then overlays environment variables. Flag overrides are applied by the caller.

Jump to

Keyboard shortcuts

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