Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶ added in v1.4.2
type Config struct { Enabled bool `mapstructure:"enabled"` Time int `mapstructure:"time"` StoragePath string `mapstructure:"storagepath"` SufixFile string `mapstructure:"sufixfile"` Endpoints []Endpoint `mapstructure:"endpoints"` }
Config structure for storing cache system configuration
func (*Config) BuntConnect ¶ added in v1.4.2
BuntConnect connects to database BuntDB - used for caching
func (Config) BuntGet ¶ added in v1.4.2
func (c Config) BuntGet(key string, w http.ResponseWriter) (cacheExist bool)
BuntGet downloads the data - if any - that is in the buntdb (embedded cache database) using response.URL.String() as key
func (Config) BuntSet ¶ added in v1.4.2
BuntSet sets data as cache in buntdb (embedded cache database) using response.URL.String() as key
func (*Config) ClearEndpoints ¶ added in v1.4.2
func (c *Config) ClearEndpoints()
Click to show internal directories.
Click to hide internal directories.