Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
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 ¶
BuntConnect connects to database BuntDB - used for caching
func (Config) BuntGet ¶
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 ¶
BuntSet sets data as cache in buntdb (embedded cache database) using response.URL.String() as key
func (*Config) ClearEndpoints ¶
func (c *Config) ClearEndpoints()
Click to show internal directories.
Click to hide internal directories.