config

package
v1.1.2 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	DefaultClientID   = "getnote-cli"
	DefaultAPIBaseURL = "https://openapi.biji.com"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	APIKey   string `json:"api_key"`
	ClientID string `json:"client_id"`
}

Config holds the CLI configuration.

func Get

func Get() *Config

Get returns the singleton config, loading from file on first call.

func (*Config) Clear

func (c *Config) Clear() error

Clear removes the stored API key and saves the config.

func (*Config) IsLoggedIn

func (c *Config) IsLoggedIn() bool

IsLoggedIn reports whether an API key is configured.

func (*Config) Save

func (c *Config) Save() error

Save writes the current config to disk, creating the directory if needed.

Jump to

Keyboard shortcuts

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