database

package
v0.0.0-...-52192e4 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2016 License: GPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Commit

func Commit(tx *sql.Tx) error

Types

type DBError

type DBError struct {
	When time.Time
	What string
}

func (DBError) Error

func (this DBError) Error() string

type MongoDB

type MongoDB struct {
	Db *mgo.Collection
	BL *mgo.Collection

	Activity *core.Activity
	// contains filtered or unexported fields
}

func NewMongoDB

func NewMongoDB(URI string) MongoDB

func (MongoDB) AddRow

func (this MongoDB) AddRow(args ...map[string]string) error

func (MongoDB) DeleteRow

func (this MongoDB) DeleteRow(id ...string) error

func (MongoDB) FindRow

func (this MongoDB) FindRow(id string, needArgs ...string) (string, error)

func (MongoDB) GetJustDone

func (this MongoDB) GetJustDone(id string) (string, string, error)

func (MongoDB) GetList

func (this MongoDB) GetList(action string, pass string) (string, error)

func (MongoDB) IsInBlackList

func (this MongoDB) IsInBlackList(name, sig string) bool

func (MongoDB) ModifyRow

func (this MongoDB) ModifyRow(args ...map[string]string) error

func (MongoDB) Revocate

func (this MongoDB) Revocate(name, sig string) error

type Mysql

type Mysql struct {
	Db *sql.DB

	Activity *core.Activity
	// contains filtered or unexported fields
}

func NewMysql

func NewMysql(URI string) Mysql

func (Mysql) AddRow

func (this Mysql) AddRow(args ...map[string]string) error

func (Mysql) CreateTable

func (this Mysql) CreateTable(str string) error

func (Mysql) DeleteRow

func (this Mysql) DeleteRow(id ...string) error

func (Mysql) FindRow

func (this Mysql) FindRow(id string, needArgs ...string) (string, error)

func (Mysql) GetJustDone

func (this Mysql) GetJustDone(id string) (string, string, error)

func (Mysql) GetList

func (this Mysql) GetList(action string, pass string) (string, error)

func (Mysql) IsInBlackList

func (this Mysql) IsInBlackList(name, sig string) bool

func (Mysql) ModifyRow

func (this Mysql) ModifyRow(args ...map[string]string) error

func (Mysql) Revocate

func (this Mysql) Revocate(name, sig string) error

Jump to

Keyboard shortcuts

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