bolt

package
v0.0.0-...-0afa638 Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(path string) (cms.Store, error)

New returns a new instance of a Store

Types

type Store

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

Store holds the state for the store

func (Store) Close

func (s Store) Close() error

Close closes the store

func (Store) CreateBucket

func (s Store) CreateBucket(name string) error

CreateBucket creates a new repository bucket if it doesn't already exist

func (Store) GetDocument

func (s Store) GetDocument(bucket, namespace, id string) ([]byte, error)

GetDocument returns the document at the specified key in the bucket

func (Store) ListDocuments

func (s Store) ListDocuments(bucket, namespace string) ([][]byte, error)

ListDocuments returns paginated documents of the specified type

func (Store) PutDocument

func (s Store) PutDocument(bucket, namespace, id string, data []byte) error

PutDocument stores a document in the bucket at the specified key

Jump to

Keyboard shortcuts

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