Documentation ¶
Index ¶
- func NewFSNamespace(options *kt.Options, fm os.FileMode, dm os.FileMode) (api.NamespaceHandler, error)
- func NewFileWriter(mode int) *fileWriter
- type FSNamespace
- func (fs *FSNamespace) AddKey(keyring, name string, key *api.Key) error
- func (fs *FSNamespace) AddKeyRing(keyring *api.KeyRing) error
- func (fs *FSNamespace) CreateKeyRing(name string, ttl int) (*api.KeyRing, error)
- func (fs *FSNamespace) DestroyKeyRing(name string) error
- func (fs *FSNamespace) DestroyNamespace(name string) error
- func (fs *FSNamespace) GetKey(keyring, name string) (*api.Key, error)
- func (fs *FSNamespace) GetKeyRing(name string) (*api.KeyRing, error)
- func (fs *FSNamespace) Init(namespace *api.Namespace) error
- func (fs *FSNamespace) Keys(keyring string) (map[string]*api.Key, error)
- func (fs *FSNamespace) RemoveKey(keyring, name string) error
- func (fs *FSNamespace) RotateKeyRing(keyring string, keys map[string]*api.Key) error
- func (fs *FSNamespace) SetHasher(hasher func(string) string) *FSNamespace
- func (fs *FSNamespace) UpdateKeyRing(keyring *api.KeyRing) error
- type FSProxy
- type Intermediary
- type KeyEncodable
- type KeyRingEncodable
- type StorageManager
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewFSNamespace ¶
func NewFileWriter ¶
func NewFileWriter(mode int) *fileWriter
Types ¶
type FSNamespace ¶
type FSNamespace struct { DirMode os.FileMode FileMode os.FileMode sync.RWMutex // contains filtered or unexported fields }
func (*FSNamespace) AddKey ¶
func (fs *FSNamespace) AddKey(keyring, name string, key *api.Key) error
func (*FSNamespace) AddKeyRing ¶
func (fs *FSNamespace) AddKeyRing(keyring *api.KeyRing) error
func (*FSNamespace) CreateKeyRing ¶
func (*FSNamespace) DestroyKeyRing ¶
func (fs *FSNamespace) DestroyKeyRing(name string) error
func (*FSNamespace) DestroyNamespace ¶
func (fs *FSNamespace) DestroyNamespace(name string) error
func (*FSNamespace) GetKeyRing ¶
func (fs *FSNamespace) GetKeyRing(name string) (*api.KeyRing, error)
func (*FSNamespace) RemoveKey ¶
func (fs *FSNamespace) RemoveKey(keyring, name string) error
func (*FSNamespace) RotateKeyRing ¶
func (*FSNamespace) SetHasher ¶
func (fs *FSNamespace) SetHasher(hasher func(string) string) *FSNamespace
func (*FSNamespace) UpdateKeyRing ¶
func (fs *FSNamespace) UpdateKeyRing(keyring *api.KeyRing) error
type Intermediary ¶
type Intermediary struct {
// contains filtered or unexported fields
}
func (*Intermediary) Init ¶
func (i *Intermediary) Init() error
Init the Intermediary. This must be called to ensure all intermediate directories and their roots exist before proceeding.
type KeyEncodable ¶
type KeyEncodable struct { Name string `json:"name"` Custom bool `json:"custom"` Length int `json:"length"` Encoded string `json:"encoded"` Created time.Time `json:"created"` Version int `json:"version"` IsComposite bool `json:"is_composite"` IsParent bool `json:"is_parent"` // contains filtered or unexported fields }
KeyEncodable (not to be confused with types.Key) is an intermediate type used to represent on-disk data for a given key which is then converted to types.Key for consumption by the file system layer.
func KeyEncodableFromKey ¶
func KeyEncodableFromKey(key *api.Key) *KeyEncodable
func (*KeyEncodable) ToKey ¶
func (ke *KeyEncodable) ToKey() *api.Key
type KeyRingEncodable ¶
type KeyRingEncodable struct { Name string `json:"name"` Created time.Time `json:"created"` Rotated string `json:"rotated"` TTL int `json:"ttl"` MaxVersions int `json:"max_versions"` DeleteAfter int `json:"delete_after"` RotateAfter int `json:"rotate_after"` // contains filtered or unexported fields }
func KeyRingEncodableFromKeyRing ¶
func KeyRingEncodableFromKeyRing(keyring *api.KeyRing) *KeyRingEncodable
func (*KeyRingEncodable) ToKeyRing ¶
func (se *KeyRingEncodable) ToKeyRing() *api.KeyRing
type StorageManager ¶
type StorageManager struct { }
Click to show internal directories.
Click to hide internal directories.