prefix

package
v0.1.8 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2022 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const StorageKIDPrefix = "k"

StorageKIDPrefix is the KID prefix for key IDs (used by localkms).

Variables

This section is empty.

Functions

This section is empty.

Types

type StorePrefixWrapper

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

StorePrefixWrapper is a wrapper store that prepends IDPrefix to IDs. IDs will be stored in the embedded store with IDPrefix as prefix while the user of this wrapper store will interact the original unchanged ID.

func NewPrefixStoreWrapper

func NewPrefixStoreWrapper(store storage.Store, prefix string) (*StorePrefixWrapper, error)

NewPrefixStoreWrapper creates a new StorePrefixWrapper of store.

func (*StorePrefixWrapper) Batch

func (b *StorePrefixWrapper) Batch(operations []storage.Operation) error

Batch is not implemented.

func (*StorePrefixWrapper) Close

func (b *StorePrefixWrapper) Close() error

Close is not implemented.

func (*StorePrefixWrapper) Delete

func (b *StorePrefixWrapper) Delete(k string) error

Delete will delete a record with k by prefixing it with IDPrefix first.

func (*StorePrefixWrapper) Flush

func (b *StorePrefixWrapper) Flush() error

Flush is not implemented.

func (*StorePrefixWrapper) Get

func (b *StorePrefixWrapper) Get(k string) ([]byte, error)

Get fetches the record based on k by first prefixing it with IDPrefix.

func (*StorePrefixWrapper) GetBulk

func (b *StorePrefixWrapper) GetBulk(...string) ([][]byte, error)

GetBulk is not implemented.

func (*StorePrefixWrapper) GetTags

func (b *StorePrefixWrapper) GetTags(string) ([]storage.Tag, error)

GetTags is not implemented.

func (*StorePrefixWrapper) Put

func (b *StorePrefixWrapper) Put(k string, v []byte, tags ...storage.Tag) error

Put stores v with k ID by prefixing it with IDPrefix.

func (*StorePrefixWrapper) Query

Query is not implemented.

Jump to

Keyboard shortcuts

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