backend

package
v0.0.0-...-e35a1e5 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2020 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrBucketNotFound = errors.New("ERR_BUCKET_NOT_FOUND")
	ErrEntryNotFound  = errors.New("ERR_ENTRY_NOT_FOUND")
)

Errors

Functions

This section is empty.

Types

type Backend

type Backend interface {
	Get(ctx context.Context, bucket, key string) (out []byte, err error)
	Del(ctx context.Context, bucket, key string) (out []byte, err error)
	Put(ctx context.Context, bucket, key string, in []byte) (out []byte, err error)
	List(ctx context.Context, bucket string) (list [][]byte, err error)
}

Backend the backend interface

type Entry

type Entry struct {
	Key  string
	Meta *Meta
	Data []byte
}

Entry an entry

type Meta

type Meta struct {
	Created   int64
	Updated   int64
	Protected int32
}

Meta metadata

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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