bucket

package
v0.0.0-...-536971d Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2020 License: GPL-3.0 Imports: 14 Imported by: 2

Documentation

Index

Constants

View Source
const BoxOverhead = 24 + secretbox.Overhead // nonce+mac

Variables

View Source
var ErrAuth = errors.New("integrity check failure")

Functions

func IsNotExist

func IsNotExist(err error) bool

Types

type Bucket

type Bucket interface {
	Abs(key string) string
	Put(key string, data []byte) error
	Get(key string) ([]byte, error)
	List() (keys, children []string, err error)
	Descend(child string) (Bucket, error)
	Destroy() error
}

func NewEncryptedBucket

func NewEncryptedBucket(bucket Bucket, key *secretkey.Key) Bucket

func NewFileBucket

func NewFileBucket(path string) (Bucket, error)

func NewRecoverableBucket

func NewRecoverableBucket(b Bucket, log *PromptLogger) Bucket

func NewS3Bucket

func NewS3Bucket(b *s3.Bucket) Bucket

func NewS3BucketFromFile

func NewS3BucketFromFile(path string) (Bucket, error)

type PromptLogger

type PromptLogger struct {
	Logger *log.Logger
	// contains filtered or unexported fields
}

func (*PromptLogger) Printf

func (l *PromptLogger) Printf(format string, v ...interface{})

func (*PromptLogger) Retry

func (l *PromptLogger) Retry(format string, v ...interface{}) bool

Jump to

Keyboard shortcuts

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