boltdb_storage_service

package
v0.12.1 Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const DEV_SUB_DIRECTORY = "./buckets/"

Variables

This section is empty.

Functions

func New

func New() (storage.StorageService, error)

New - Create a new BoltDB Storage plugin

Types

type BoltStorageService

type BoltStorageService struct {
	storage.UnimplementedStoragePlugin
	// contains filtered or unexported fields
}

func (*BoltStorageService) Delete

func (s *BoltStorageService) Delete(bucket string, key string) error

Delete - deletes an item from Storage

func (*BoltStorageService) Read

func (s *BoltStorageService) Read(bucket string, key string) ([]byte, error)

Read - reads an item from Storage

func (*BoltStorageService) Write

func (s *BoltStorageService) Write(bucket string, key string, object []byte) error

Write - will create a new item or overwrite an existing item in storage

type Object

type Object struct {
	Key  string `storm:"id"`
	Data []byte
}

Jump to

Keyboard shortcuts

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