gotrade: Index | Files | Directories

package database

import ""


Package Files


func RegisterOrderStore Uses

func RegisterOrderStore(name string, register OrderStoreRegistration)

type Options Uses

type Options map[string]interface{}

Datastore options to be passed by client

type OrderStore Uses

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)

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

func NewOrderStore Uses

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

type OrderStoreRegistration Uses

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



Package database imports 2 packages (graph) and is imported by 3 packages. Updated 2016-07-20. Refresh now. Tools for package owners.