store

package
v0.0.0-...-3478799 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package store is a generated GoMock package.

Index

Constants

View Source
const (
	TABLE_CREATE_QUERY = `` /* 205-byte string literal not displayed */

	INSERT_OR_REPLACE_QUERY = `INSERT OR REPLACE INTO %s (Name, Value, Type) VALUES(?,?,?);`
	READ_WHERE_QUERY        = `SELECT Value FROM %s WHERE Name = $1;`
	DELETE_ALL_QUERY        = `DELETE FROM %s;`
)

Type == 0 for string

Variables

This section is empty.

Functions

This section is empty.

Types

type MockPersistentKeyValueStoreInterface

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

MockPersistentKeyValueStoreInterface is a mock of PersistentKeyValueStoreInterface interface.

func NewMockPersistentKeyValueStoreInterface

func NewMockPersistentKeyValueStoreInterface(ctrl *gomock.Controller) *MockPersistentKeyValueStoreInterface

NewMockPersistentKeyValueStoreInterface creates a new mock instance.

func (*MockPersistentKeyValueStoreInterface) Clear

Clear mocks base method.

func (*MockPersistentKeyValueStoreInterface) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockPersistentKeyValueStoreInterface) GetValue

GetValue mocks base method.

func (*MockPersistentKeyValueStoreInterface) SetValue

func (m *MockPersistentKeyValueStoreInterface) SetValue(key, value string) error

SetValue mocks base method.

type MockPersistentKeyValueStoreInterfaceMockRecorder

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

MockPersistentKeyValueStoreInterfaceMockRecorder is the mock recorder for MockPersistentKeyValueStoreInterface.

func (*MockPersistentKeyValueStoreInterfaceMockRecorder) Clear

Clear indicates an expected call of Clear.

func (*MockPersistentKeyValueStoreInterfaceMockRecorder) GetValue

func (mr *MockPersistentKeyValueStoreInterfaceMockRecorder) GetValue(key interface{}) *gomock.Call

GetValue indicates an expected call of GetValue.

func (*MockPersistentKeyValueStoreInterfaceMockRecorder) SetValue

func (mr *MockPersistentKeyValueStoreInterfaceMockRecorder) SetValue(key, value interface{}) *gomock.Call

SetValue indicates an expected call of SetValue.

type PersistentKeyValueStore

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

* This class is copy of PersistentKeyValueStore.py class in GO. It stores key-value pairs persistently using a database.

func NewPersistentKeyValueStore

func NewPersistentKeyValueStore(fileName string, tableName string) (*PersistentKeyValueStore, error)

func (*PersistentKeyValueStore) Clear

func (store *PersistentKeyValueStore) Clear() error

func (*PersistentKeyValueStore) GetValue

func (store *PersistentKeyValueStore) GetValue(key string) (string, error)

func (*PersistentKeyValueStore) SetValue

func (store *PersistentKeyValueStore) SetValue(key string, value string) error

type PersistentKeyValueStoreInterface

type PersistentKeyValueStoreInterface interface {
	SetValue(key string, value string) error
	GetValue(key string) (string, error)
	Clear() error
}

* Interface for the PersistentKeyValueStore that define which methods are implemented by PersistentKeyValueStore.

Jump to

Keyboard shortcuts

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