Documentation
¶
Index ¶
- Variables
- type Config
- type Credentials
- type Storage
- func (s *Storage) Close() error
- func (s *Storage) Conn() *azblob.Client
- func (s *Storage) Delete(key string) error
- func (s *Storage) DeleteWithContext(ctx context.Context, key string) error
- func (s *Storage) Get(key string) ([]byte, error)
- func (s *Storage) GetWithContext(ctx context.Context, key string) ([]byte, error)
- func (s *Storage) Reset() error
- func (s *Storage) ResetWithContext(ctx context.Context) error
- func (s *Storage) Set(key string, val []byte, exp time.Duration) error
- func (s *Storage) SetWithContext(ctx context.Context, key string, val []byte, exp time.Duration) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ConfigDefault = Config{ Account: "", Container: "", Endpoint: "", RequestTimeout: 0, Reset: false, MaxAttempts: 3, }
ConfigDefault is the default config
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { // Storage account name. Account string // Container name. Container string // Storage endpoint. // Optional. Default: "https://STORAGEACCOUNTNAME.blob.core.windows.net" Endpoint string // Request timeout. // Optional. Default is 0 (no timeout) RequestTimeout time.Duration // Reset clears any existing keys in existing container. // Optional. Default is false Reset bool // Credentials overrides AWS access key and AWS secret access key. Not recommended. // Optional. Default is Credentials{} Credentials Credentials // The maximum number of times requests that encounter retryable failures should be attempted. // Optional. Default is 3 MaxAttempts int }
Config defines the config for storage.
type Credentials ¶
Credentials are the azure storage account access keys
type Storage ¶
type Storage struct {
// contains filtered or unexported fields
}
Storage interface that is implemented by storage providers
func (*Storage) DeleteWithContext ¶ added in v2.2.0
DeleteWithContext deletes entry by key
func (*Storage) GetWithContext ¶ added in v2.2.0
GetWithContext gets value by key
func (*Storage) ResetWithContext ¶ added in v2.2.0
ResetWithContext resets all entries
Click to show internal directories.
Click to hide internal directories.