Documentation
¶
Index ¶
- func Hash(value string) string
- func NewResourcesCacheManager(strategy string, snowmanDirectoryPath string) error
- type ResourcesCacheManager
- func (cm *ResourcesCacheManager) GetCache(itemUrl string) (*os.File, error)
- func (cm *ResourcesCacheManager) GetCacheItemByHostname(hostname string) ([]string, error)
- func (cm *ResourcesCacheManager) GetUnusedCacheHashes() ([]string, error)
- func (cm *ResourcesCacheManager) SetCache(itemUrl string, content string) error
- func (cm *ResourcesCacheManager) Teardown() error
- type SparqlCacheManager
- func (cm *SparqlCacheManager) GetCache(location string, query string) (*os.File, error)
- func (cm *SparqlCacheManager) GetCacheItemsByResourceAndArguments(location string, arguments ...string) ([]string, error)
- func (cm *SparqlCacheManager) GetUnusedCacheHashes() ([]string, error)
- func (cm *SparqlCacheManager) SetCache(location string, query string, content string) error
- func (cm *SparqlCacheManager) Teardown() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ResourcesCacheManager ¶
type ResourcesCacheManager struct { CacheStrategy string // "available", "never" StoredCacheHashes map[string]bool SnowmanDirectoryPath string // contains filtered or unexported fields }
var CurrentResourcesCacheManager *ResourcesCacheManager
func (*ResourcesCacheManager) GetCache ¶
func (cm *ResourcesCacheManager) GetCache(itemUrl string) (*os.File, error)
func (*ResourcesCacheManager) GetCacheItemByHostname ¶
func (cm *ResourcesCacheManager) GetCacheItemByHostname(hostname string) ([]string, error)
TODO: we propebly need another one for induvidual items?
func (*ResourcesCacheManager) GetUnusedCacheHashes ¶
func (cm *ResourcesCacheManager) GetUnusedCacheHashes() ([]string, error)
func (*ResourcesCacheManager) SetCache ¶
func (cm *ResourcesCacheManager) SetCache(itemUrl string, content string) error
func (*ResourcesCacheManager) Teardown ¶
func (cm *ResourcesCacheManager) Teardown() error
type SparqlCacheManager ¶
type SparqlCacheManager struct { CacheStrategy string // "available", "never" StoredCacheHashes map[string]bool SnowmanDirectoryPath string // contains filtered or unexported fields }
func NewSparqlCacheManager ¶
func NewSparqlCacheManager(strategy string, snowmanDirectoryPath string) (*SparqlCacheManager, error)
func (*SparqlCacheManager) GetCacheItemsByResourceAndArguments ¶
func (cm *SparqlCacheManager) GetCacheItemsByResourceAndArguments(location string, arguments ...string) ([]string, error)
GetCacheItemsByResourceAndArguments returns a list of cache paths given a resource and arguments, like so: "myquery.rq", "arg1", "arg2" note that if only a location is provided, the resulting path might be a directory
func (*SparqlCacheManager) GetUnusedCacheHashes ¶
func (cm *SparqlCacheManager) GetUnusedCacheHashes() ([]string, error)
func (*SparqlCacheManager) SetCache ¶
func (cm *SparqlCacheManager) SetCache(location string, query string, content string) error
func (*SparqlCacheManager) Teardown ¶
func (cm *SparqlCacheManager) Teardown() error
Click to show internal directories.
Click to hide internal directories.