database

package
v0.0.0-...-f2cd14d Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2016 License: GPL-3.0 Imports: 2 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterOrderStore

func RegisterOrderStore(name string, register OrderStoreRegistration)

Types

type Options

type Options map[string]interface{}

Datastore options to be passed by client

type OrderStore

type OrderStore interface {
	// Returns an order row for OrderId,  excludes Execution/Allocations etc
	OrderGet(int32) (*proto.Order, error)
	// Returns an order row for OrderKey,  excludes Execution/Allocations etc
	OrderGetByOrderKey(int32) (*proto.Order, error)
	// Save order as new entry
	OrderCreate(*proto.Order) error

	// Create an Execution from entity
	ExecutionCreate(*proto.Execution) error

	// Close the store and clean up. (Flush to disk, cleanly sever connections, etc)
	Close()
}

Defines the OrderStore interface. Every backing store must implement at least this interface.

func NewOrderStore

func NewOrderStore(name, dbpath string, opts Options) (OrderStore, error)

type OrderStoreRegistration

type OrderStoreRegistration struct {
	DialFunc func(string, Options) (OrderStore, error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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