Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { Host *string `yaml:"host"` Port *int `yaml:"port"` DBPath *string `yaml:"db_path"` IndexPath *string `yaml:"index_path"` Dictionary *string `yaml:"dictionary"` StopTokens *string `yaml:"stop_tokens"` Source *Source `yaml:"source"` Logger *Logger `yaml:"logger"` }
Config contains all config needed by xuanzang.
func (*Config) LoadFromContent ¶
LoadFromContent loads configuration from a given bytes. It returns error if yaml decode failed.
func (*Config) LoadFromFilePath ¶
LoadFromFilePath loads configuration from a specified local path. It returns error if file not found or yaml decode failed.
Click to show internal directories.
Click to hide internal directories.