Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrRoleNotFound = errors.New("role not found")
)
Functions ¶
Types ¶
type Config ¶
type Config struct { AccountId string `json:"account_id"` KeyId string `json:"key_id"` Key string `json:"key"` KeyName string `json:"key_name"` Configured bool `json:"is_configured"` }
func DefaultConfig ¶
func DefaultConfig() *Config
type Role ¶
type Role struct { // Capabilities is a list of strings which reflects // the capabilities this key will have in B2 Capabilities []string `json:"capabilities"` KeyNamePrefix string `json:"key_name_prefix"` // BucketName is an optional restriction to limit this key to // a particular bucket BucketName string `json:"bucket_id"` // NamePrefix is an optional restriction to limit which object // name prefixes this key can operate on NamePrefix string `json:"name_prefix"` // DefaultTTL is the TTL which will be applied to keys if no // TTL is requested DefaultTTL time.Duration `json:"default_ttl"` // MaxTTL is the maximum any TTL can be for this role MaxTTL time.Duration `json:"max_ttl"` }
A role stored in the storage backend
Click to show internal directories.
Click to hide internal directories.