fs

package
v0.0.0-...-7eb8b13 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 31, 2021 License: NCSA Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewFSNamespace

func NewFSNamespace(options *kt.Options, fm os.FileMode,
	dm os.FileMode) (api.NamespaceHandler, error)

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 (fs *FSNamespace) CreateKeyRing(name string, ttl int) (*api.KeyRing, error)

func (*FSNamespace) DestroyKeyRing

func (fs *FSNamespace) DestroyKeyRing(name string) error

func (*FSNamespace) DestroyNamespace

func (fs *FSNamespace) DestroyNamespace(name string) error

func (*FSNamespace) GetKey

func (fs *FSNamespace) GetKey(keyring, name string) (*api.Key, error)

func (*FSNamespace) GetKeyRing

func (fs *FSNamespace) GetKeyRing(name string) (*api.KeyRing, error)

func (*FSNamespace) Init

func (fs *FSNamespace) Init(namespace *api.Namespace) error

func (*FSNamespace) Keys

func (fs *FSNamespace) Keys(keyring string) (map[string]*api.Key, error)

func (*FSNamespace) RemoveKey

func (fs *FSNamespace) RemoveKey(keyring, name string) error

func (*FSNamespace) RotateKeyRing

func (fs *FSNamespace) RotateKeyRing(keyring string, keys map[string]*api.Key) error

func (*FSNamespace) SetHasher

func (fs *FSNamespace) SetHasher(hasher func(string) string) *FSNamespace

func (*FSNamespace) UpdateKeyRing

func (fs *FSNamespace) UpdateKeyRing(keyring *api.KeyRing) error

type FSProxy

type FSProxy struct {
}

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.

func (*Intermediary) Read

func (i *Intermediary) Read(path, name string) ([]byte, error)

Read from the specified path.

func (*Intermediary) Write

func (i *Intermediary) Write(path, name string, p []byte) error

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 {
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL