Documentation ¶
Index ¶
Constants ¶
View Source
const (
ApplicationName = "glaball"
)
View Source
const (
DefaultCacheSize = "100MB"
)
Variables ¶
This section is empty.
Functions ¶
func DefaultCacheDir ¶
func DefaultConfigDir ¶
Types ¶
type CacheOptions ¶
type CacheOptions struct { Enabled bool `yaml:"enabled" mapstructure:"enabled"` BasePath string `yaml:"path" mapstructure:"path"` CacheSizeMax string `yaml:"size" mapstructure:"size"` Compression bool `yaml:"compression" mapstructure:"compression"` TTL *time.Duration `yaml:"ttl" mapstructure:"ttl"` }
func (*CacheOptions) DiskvOptions ¶
func (c *CacheOptions) DiskvOptions() (diskv.Options, error)
type Config ¶
type Config struct { Hosts Hosts `yaml:"hosts" mapstructure:"hosts"` Cache CacheOptions `yaml:"cache" mapstructure:"cache"` Filter string `yaml:"filter" mapstructure:"filter"` Threads int `yaml:"threads" mapstructure:"threads"` ShowAll bool `yaml:"all" mapstructure:"all"` }
type Host ¶
type Host struct { URL string `yaml:"url" mapstructure:"url"` IP string `yaml:"ip" mapstructure:"ip"` Token string `yaml:"token" mapstructure:"token"` RateLimiter RateLimiterOptions `yaml:"rate_limiter" mapstructure:"rate_limiter"` }
type RateLimiterOptions ¶
type RateLimiterOptions struct {
Enabled bool `yaml:"enabled" mapstructure:"enabled"`
}
Click to show internal directories.
Click to hide internal directories.