-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Description
Description
Instead of calling config from the CLI layer, create a dedicated package. Viper would be wrapped in this package, and would not appear anywhere in the code, all config management would be done by the config package.
It's API could look something like:
type PorkbunAPIConfig struct {
Key string `json:"key"`
SecretKey string `json:"secretKey"`
Domain string `json:"domain"`
Subdomain string `json:"subdomain"`
Type string `json:"type"`
}
type Config struct{}
func (c *Config) Get() (PorkbunAPIConfig, error)
func (c *Config) GetKey(key string) (PorkbunAPIConfig, error)
func (c *Config) Set(key, value string) error
func (c *Config) Delete(key) errorReactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels