setting

package
v0.0.0-...-04ecd83 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init() error

Types

type Config

type Config struct {
	ServerHost     string   `json:"server_host"`
	AccessToken    string   `json:"access_token"`
	LogPath        string   `json:"log_path"`
	InstructSwitch types.KV `json:"instruct_switch"`
}

func DefaultConfig

func DefaultConfig() Config

type ConfigStore

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

func NewConfigStore

func NewConfigStore() (*ConfigStore, error)

func (*ConfigStore) Config

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

func (*ConfigStore) Load

func (s *ConfigStore) Load() (err error)

func (*ConfigStore) Save

func (s *ConfigStore) Save(cfg Config) error

Jump to

Keyboard shortcuts

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