config

package
v0.3.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	AppName = "meta-cli"

	KeyAccessToken    = "access_token"
	KeyAppID          = "app_id"
	KeyDefaultAccount = "default_account"
	KeyAPIVersion     = "api_version"
	KeyOutputFormat   = "output_format"
)

Variables

This section is empty.

Functions

func DefaultConfigPath

func DefaultConfigPath() string

Types

type Config

type Config struct {
	AccessToken    string
	AppID          string
	DefaultAccount string
	APIVersion     string
	OutputFormat   string
}

type ConfigStore

type ConfigStore struct {
	// contains filtered or unexported fields
}

func NewStore

func NewStore(configPath string) *ConfigStore

func (*ConfigStore) ConfigFilePath

func (s *ConfigStore) ConfigFilePath() string

func (*ConfigStore) Get

func (s *ConfigStore) Get(key string) string

func (*ConfigStore) Load

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

func (*ConfigStore) Set

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

func (*ConfigStore) Validate

func (s *ConfigStore) Validate(c *Config) error

Jump to

Keyboard shortcuts

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