filedriver

package
v0.59.0 Latest Latest
Warning

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

Go to latest
Published: May 22, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Driver

type Driver struct {
	// contains filtered or unexported fields
}

Driver is the filedriver object

func NewDriver

func NewDriver(rootPath string) (*Driver, error)

NewDriver creates a new file driver. rootPath is the directory where the secrets data file resides.

func (*Driver) Delete

func (d *Driver) Delete(id string) error

Delete deletes the secret associated with the specified ID. An error is returned if no matching secret is found.

func (*Driver) List

func (d *Driver) List() ([]string, error)

List returns all secret IDs

func (*Driver) Lookup

func (d *Driver) Lookup(id string) ([]byte, error)

Lookup returns the bytes associated with a secret ID

func (*Driver) Store

func (d *Driver) Store(id string, data []byte) error

Store stores the bytes associated with an ID. An error is returned if the ID already exists

Jump to

Keyboard shortcuts

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