dbstore

package
v0.0.0-...-6d43c30 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2020 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DBBindingModule

type DBBindingModule interface {
	BindsTableDBStore(impl *MemoryDBStore) DBStore

	BindsPrefix(impl DBProviderPrefix) Prefix

	// Interface modules can declare dependencies on other modules
	Modules() *DBProviderModule
}

DBBindingModule binds the MemoryDBStore to the DBStore interface for injection

type DBProviderModule

type DBProviderModule struct {
	Prefix Prefix
	// contains filtered or unexported fields
}

DBProviderModule provides DB configuration

func (*DBProviderModule) ProvidesPrefix

func (d *DBProviderModule) ProvidesPrefix() DBProviderPrefix

ProvidesPrefix provides the prefix to use

type DBProviderPrefix

type DBProviderPrefix Prefix

DBProviderPrefix is a Prefix provided by the DBProviderModule

type DBStore

type DBStore interface {
	StoreString(value string) error
	GetString() string
}

DBStore is an interface for Database interaction

type MemoryDBStore

type MemoryDBStore struct {
	Prefix Prefix
	// contains filtered or unexported fields
}

MemoryDBStore is a DBStore implementation that writes to memory

func (*MemoryDBStore) GetString

func (m *MemoryDBStore) GetString() string

GetString returns the in-memory string value

func (*MemoryDBStore) StoreString

func (m *MemoryDBStore) StoreString(value string) error

StoreString stores a string in the table

type Prefix

type Prefix string

Prefix is a prefix to append to calls to GetString

Jump to

Keyboard shortcuts

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