config

package
v0.14.1 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccountConfig

type AccountConfig struct {
	Name      string `yaml:"name"`
	Broker    string `yaml:"broker"` // currently supported: broker.CodeKIS, broker.CodeKiwoom
	Sandbox   bool   `yaml:"sandbox"`
	AppKey    string `yaml:"app_key"`
	AppSecret string `yaml:"app_secret"`
	AccountID string `yaml:"account_id"`
}

AccountConfig represents a broker account configuration

type Config

type Config struct {
	Server   ServerConfig    `yaml:"server"`
	Storage  StorageConfig   `yaml:"storage,omitempty"`
	Accounts []AccountConfig `yaml:"accounts,omitempty"`
}

Config represents the application configuration

func Load

func Load(filename string) (*Config, error)

Load loads configuration from a YAML file

func (*Config) Validate

func (c *Config) Validate() error

Validate validates and normalizes configuration values.

type ServerConfig

type ServerConfig struct {
	Host string `yaml:"host"`
	Port int    `yaml:"port"`
}

ServerConfig represents server configuration

type StorageConfig

type StorageConfig struct {
	TokenDir        string `yaml:"token_dir"`
	OrderContextDir string `yaml:"order_context_dir"`
}

StorageConfig represents local persistence paths.

Jump to

Keyboard shortcuts

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