store

package
v0.0.0-...-d1f9358 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2021 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadJSON

func LoadJSON(s KVStore, key string, v interface{}) (returnErr error)

LoadJSON load json data from KVStore

func SetJSON

func SetJSON(s KVStore, key string, v interface{}) (returnErr error)

SetJSON sets json data in KVStore

Types

type API

type API interface {
	KVGet(key string) ([]byte, *model.AppError)
	KVSet(key string, value []byte) *model.AppError
	KVDelete(key string) *model.AppError
}

API that store uses for interactions with KVStore

type KVStore

type KVStore interface {
	Load(key string) ([]byte, error)
	Store(key string, data []byte) error
	Delete(key string) error
}

KVStore abstraction for plugin.API.KVStore

func NewPluginStore

func NewPluginStore(api API) KVStore

NewPluginStore creates KVStore from plugin.API

Directories

Path Synopsis
Package mock is a generated GoMock package.
Package mock is a generated GoMock package.

Jump to

Keyboard shortcuts

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