databases

package
v0.0.0-...-47f99fb Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2014 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const MaxIdleConnsPerHost = 1000

Variables

View Source
var DDOC_NAME = "ddoc"

Functions

This section is empty.

Types

type Cassandra

type Cassandra struct {
	Pool         gossie.ConnectionPool
	ColumnFamily string
}

func (*Cassandra) Create

func (cs *Cassandra) Create(key string, value map[string]interface{}) error

func (*Cassandra) Delete

func (cs *Cassandra) Delete(key string) error

func (*Cassandra) Init

func (cs *Cassandra) Init(config Config)

func (*Cassandra) Query

func (cb *Cassandra) Query(key string, args []interface{}) error

func (*Cassandra) Read

func (cs *Cassandra) Read(key string) error

func (*Cassandra) Shutdown

func (cs *Cassandra) Shutdown()

func (*Cassandra) Update

func (cs *Cassandra) Update(key string, value map[string]interface{}) error

type Column

type Column struct {
	Key   string `cf:"default" key:"Key" value:"Value"`
	Value string
}

type Config

type Config struct {
	Driver    string
	Name      string
	Table     string
	Addresses []string
	Username  string
	Password  string
}

type Couchbase

type Couchbase struct {
	Bucket *couchbase.Bucket
}

func (*Couchbase) Create

func (cb *Couchbase) Create(key string, value map[string]interface{}) error

func (*Couchbase) Delete

func (cb *Couchbase) Delete(key string) error

func (*Couchbase) Init

func (cb *Couchbase) Init(config Config)

func (*Couchbase) Query

func (cb *Couchbase) Query(key string, args []interface{}) error

func (*Couchbase) Read

func (cb *Couchbase) Read(key string) error

func (*Couchbase) Shutdown

func (cb *Couchbase) Shutdown()

func (*Couchbase) Update

func (cb *Couchbase) Update(key string, value map[string]interface{}) error

type Database

type Database interface {
	Init(config Config)

	Shutdown()

	Create(key string, value map[string]interface{}) error

	Read(key string) error

	Update(key string, value map[string]interface{}) error

	Delete(key string) error

	Query(key string, value []interface{}) error
}

type MongoDB

type MongoDB struct {
	Session        *mgo.Session
	DBName         string
	CollectionName string
}

func (*MongoDB) Create

func (mongo *MongoDB) Create(key string, value map[string]interface{}) error

func (*MongoDB) Delete

func (mongo *MongoDB) Delete(key string) error

func (*MongoDB) Init

func (mongo *MongoDB) Init(config Config)

func (*MongoDB) Query

func (mongo *MongoDB) Query(key string, args []interface{}) error

func (*MongoDB) Read

func (mongo *MongoDB) Read(key string) error

func (*MongoDB) Shutdown

func (mongo *MongoDB) Shutdown()

func (*MongoDB) Update

func (mongo *MongoDB) Update(key string, value map[string]interface{}) error

type RestClient

type RestClient struct {
	URIs []string
	// contains filtered or unexported fields
}

func (RestClient) Do

func (c RestClient) Do(q string) error

type Tuq

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

func (*Tuq) Create

func (t *Tuq) Create(key string, value map[string]interface{}) error

func (*Tuq) Delete

func (t *Tuq) Delete(key string) error

func (*Tuq) Init

func (t *Tuq) Init(config Config)

func (*Tuq) Query

func (t *Tuq) Query(key string, args []interface{}) error

func (*Tuq) Read

func (t *Tuq) Read(key string) error

func (*Tuq) Shutdown

func (t *Tuq) Shutdown()

func (*Tuq) Update

func (t *Tuq) Update(key string, value map[string]interface{}) error

Jump to

Keyboard shortcuts

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