data

package
v1.3.4 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2020 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var InvalidDataModelError = errors.New("invalid data model, must contains string field ID and assigns string value")
View Source
var InvalidDataSourceError = errors.New("invalid dataSource")
View Source
var NotImplementedError = errors.New("method is not implemented")

Functions

This section is empty.

Types

type BaseKVRepository

type BaseKVRepository struct {
	BaseRepository
}

func (*BaseKVRepository) Delete

func (r *BaseKVRepository) Delete(params ...interface{}) error

Delete removes a key:value pair from the database

func (*BaseKVRepository) Get

func (r *BaseKVRepository) Get(params ...interface{}) error

Get retrieves a key:value pair from the database

func (*BaseKVRepository) Parse

func (r *BaseKVRepository) Parse(params ...interface{}) ([]byte, []byte, interface{}, error)

func (*BaseKVRepository) Put

func (r *BaseKVRepository) Put(params ...interface{}) error

Put inserts a key:value pair into the database

type BaseRepository

type BaseRepository struct {
}

func (*BaseRepository) CloseDataSource

func (r *BaseRepository) CloseDataSource() error

func (*BaseRepository) DataSource

func (r *BaseRepository) DataSource() interface{}

func (*BaseRepository) SetDataSource

func (r *BaseRepository) SetDataSource(dataSource interface{})

type Configuration

type Configuration interface {
}

type KVRepository

type KVRepository interface {
	Repository
	Put(params ...interface{}) error
	Get(params ...interface{}) error
	Delete(params ...interface{}) error
}

KVRepository is the Key/Value Repository interface

type Repository

type Repository interface {
	SetDataSource(dataSource interface{})
	DataSource() interface{}
	CloseDataSource() error
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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