storage

package
v0.0.0-...-cfa8106 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2023 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitBaseStorage

func InitBaseStorage(dataPath string) error

Types

type BaseStorage

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

func (*BaseStorage) Delete

func (b *BaseStorage) Delete(module, key string) error

func (*BaseStorage) Get

func (b *BaseStorage) Get(module, key string) (value []byte, err error)

func (*BaseStorage) Has

func (b *BaseStorage) Has(module, key string) (value bool)

func (*BaseStorage) Set

func (b *BaseStorage) Set(module, key string, value []byte) error

type Storage

type Storage interface {
	Get(module, key string) ([]byte, error)
	Set(module, key string, value []byte) error
	Has(module, key string) bool
	Delete(module, key string) error
}

func GetBaseStorage

func GetBaseStorage() Storage

Jump to

Keyboard shortcuts

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