Documentation ¶
Index ¶
- func AddRemoteCache(cacheInfo CacheProvider) error
- func RemoveRemoteCache() error
- type AzureCache
- func (s *AzureCache) Configure(cacheInfo CacheProvider) error
- func (s *AzureCache) DisableCache()
- func (s *AzureCache) Exists(key string) bool
- func (s *AzureCache) GetName() string
- func (s *AzureCache) IsCacheDisabled() bool
- func (s *AzureCache) List() ([]CacheObjectDetails, error)
- func (s *AzureCache) Load(key string) (string, error)
- func (s *AzureCache) Remove(key string) error
- func (s *AzureCache) Store(key string, data string) error
- type AzureCacheConfiguration
- type CacheObjectDetails
- type CacheProvider
- type FileBasedCache
- func (f *FileBasedCache) Configure(cacheInfo CacheProvider) error
- func (s *FileBasedCache) DisableCache()
- func (*FileBasedCache) Exists(key string) bool
- func (s *FileBasedCache) GetName() string
- func (f *FileBasedCache) IsCacheDisabled() bool
- func (*FileBasedCache) List() ([]CacheObjectDetails, error)
- func (*FileBasedCache) Load(key string) (string, error)
- func (*FileBasedCache) Remove(key string) error
- func (*FileBasedCache) Store(key string, data string) error
- type GCSCache
- func (s *GCSCache) Configure(cacheInfo CacheProvider) error
- func (s *GCSCache) DisableCache()
- func (s *GCSCache) Exists(key string) bool
- func (s *GCSCache) GetName() string
- func (s *GCSCache) IsCacheDisabled() bool
- func (s *GCSCache) List() ([]CacheObjectDetails, error)
- func (s *GCSCache) Load(key string) (string, error)
- func (s *GCSCache) Remove(key string) error
- func (s *GCSCache) Store(key string, data string) error
- type GCSCacheConfiguration
- type ICache
- type S3Cache
- func (s *S3Cache) Configure(cacheInfo CacheProvider) error
- func (s *S3Cache) DisableCache()
- func (s *S3Cache) Exists(key string) bool
- func (s *S3Cache) GetName() string
- func (s *S3Cache) IsCacheDisabled() bool
- func (s *S3Cache) List() ([]CacheObjectDetails, error)
- func (s *S3Cache) Load(key string) (string, error)
- func (s *S3Cache) Remove(key string) error
- func (s *S3Cache) Store(key string, data string) error
- type S3CacheConfiguration
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddRemoteCache ¶
func AddRemoteCache(cacheInfo CacheProvider) error
func RemoveRemoteCache ¶
func RemoveRemoteCache() error
Types ¶
type AzureCache ¶
type AzureCache struct {
// contains filtered or unexported fields
}
Generate ICache implementation
func (*AzureCache) Configure ¶
func (s *AzureCache) Configure(cacheInfo CacheProvider) error
func (*AzureCache) DisableCache ¶
func (s *AzureCache) DisableCache()
func (*AzureCache) Exists ¶
func (s *AzureCache) Exists(key string) bool
func (*AzureCache) GetName ¶
func (s *AzureCache) GetName() string
func (*AzureCache) IsCacheDisabled ¶
func (s *AzureCache) IsCacheDisabled() bool
func (*AzureCache) List ¶
func (s *AzureCache) List() ([]CacheObjectDetails, error)
func (*AzureCache) Remove ¶
func (s *AzureCache) Remove(key string) error
type AzureCacheConfiguration ¶
type CacheObjectDetails ¶
type CacheProvider ¶
type CacheProvider struct { GCS GCSCacheConfiguration `mapstructucre:"gcs" yaml:"gcs,omitempty"` Azure AzureCacheConfiguration `mapstructucre:"azure" yaml:"azure,omitempty"` S3 S3CacheConfiguration `mapstructucre:"s3" yaml:"s3,omitempty"` }
func NewCacheProvider ¶
func NewCacheProvider(cacheType, bucketname, region, storageAccount, containerName, projectId string) (CacheProvider, error)
func ParseCacheConfiguration ¶
func ParseCacheConfiguration() (CacheProvider, error)
type FileBasedCache ¶
type FileBasedCache struct {
// contains filtered or unexported fields
}
func (*FileBasedCache) Configure ¶
func (f *FileBasedCache) Configure(cacheInfo CacheProvider) error
func (*FileBasedCache) DisableCache ¶
func (s *FileBasedCache) DisableCache()
func (*FileBasedCache) Exists ¶
func (*FileBasedCache) Exists(key string) bool
func (*FileBasedCache) GetName ¶
func (s *FileBasedCache) GetName() string
func (*FileBasedCache) IsCacheDisabled ¶
func (f *FileBasedCache) IsCacheDisabled() bool
func (*FileBasedCache) List ¶
func (*FileBasedCache) List() ([]CacheObjectDetails, error)
func (*FileBasedCache) Remove ¶
func (*FileBasedCache) Remove(key string) error
type GCSCache ¶
type GCSCache struct {
// contains filtered or unexported fields
}
func (*GCSCache) Configure ¶
func (s *GCSCache) Configure(cacheInfo CacheProvider) error
func (*GCSCache) DisableCache ¶
func (s *GCSCache) DisableCache()
func (*GCSCache) IsCacheDisabled ¶
func (*GCSCache) List ¶
func (s *GCSCache) List() ([]CacheObjectDetails, error)
type GCSCacheConfiguration ¶
type ICache ¶
type ICache interface { Configure(cacheInfo CacheProvider) error Store(key string, data string) error Load(key string) (string, error) List() ([]CacheObjectDetails, error) Remove(key string) error Exists(key string) bool IsCacheDisabled() bool GetName() string DisableCache() }
func GetCacheConfiguration ¶
If we have set a remote cache, return the remote cache configuration
type S3Cache ¶
type S3Cache struct {
// contains filtered or unexported fields
}
Generate ICache implementation
func (*S3Cache) Configure ¶
func (s *S3Cache) Configure(cacheInfo CacheProvider) error
func (*S3Cache) DisableCache ¶
func (s *S3Cache) DisableCache()
func (*S3Cache) IsCacheDisabled ¶
func (*S3Cache) List ¶
func (s *S3Cache) List() ([]CacheObjectDetails, error)
type S3CacheConfiguration ¶
Click to show internal directories.
Click to hide internal directories.