Documentation
¶
Index ¶
- type Aliases
- type App
- type Config
- func (c *Config) BaseURL(u string) string
- func (c *Config) DatabaseConnection() string
- func (c *Config) Filename() string
- func (c *Config) FullPath(f string) string
- func (c *Config) Host() string
- func (c *Config) IndexPath() string
- func (c *Config) IsSameHost(h string) bool
- func (c *Config) LoadRules() error
- func (c *Config) RulesPath() string
- func (c *Config) SaveRules() error
- func (c *Config) SecretKey() []byte
- func (c *Config) WebSocketURL() string
- type Hotkeys
- type Rule
- type Rules
- type Server
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type App ¶
type App struct {
Directory string `yaml:"directory" mapstructure:"directory"`
SearchURL string `yaml:"search_url" mapstructure:"search_url"`
LogLevel string `yaml:"log_level" mapstructure:"log_level"`
DebugSQL bool `yaml:"debug_sql" mapstructure:"debug_sql"`
OpenResultsOnNewTab bool `yaml:"open_results_on_new_tab" mapstructure:"open_results_on_new_tab"`
}
type Config ¶
type Config struct {
App App `yaml:"app" mapstructure:"app"`
Server Server `yaml:"server" mapstructure:"server"`
Hotkeys Hotkeys `yaml:"hotkeys" mapstructure:"hotkeys"`
SensitiveContentPatterns map[string]string `yaml:"sensitive_content_patterns" mapstructure:"sensitive_content_patterns"`
Rules *Rules `yaml:"-" mapstructure:"-"`
// contains filtered or unexported fields
}
func CreateDefaultConfig ¶
func CreateDefaultConfig() *Config
CreateDefaultConfig returns a new Config with default values.
func (*Config) DatabaseConnection ¶
func (*Config) IsSameHost ¶ added in v0.4.0
func (*Config) WebSocketURL ¶
type Hotkeys ¶ added in v0.3.0
type Rule ¶
type Rule struct {
ReStrs []string
// contains filtered or unexported fields
}
func (*Rule) MarshalJSON ¶
func (*Rule) UnmarshalJSON ¶
type Rules ¶
type Rules struct {
Skip *Rule `json:"skip"`
Priority *Rule `json:"priority"`
Aliases Aliases `json:"aliases"`
}
func (*Rules) IsPriority ¶
func (*Rules) ResolveAliases ¶
Click to show internal directories.
Click to hide internal directories.