Documentation ¶
Index ¶
- func ConnectRethinkDB(opts map[string]interface{}) (*r.Session, error)
- func DeleteRethinkDBDocument(key string, table r.Term, session *r.Session) error
- func GetRethinkDBAllDocuments(model interface{}, table r.Term, session *r.Session) error
- func GetRethinkDBDocument(key string, model interface{}, table r.Term, session *r.Session) error
- func InsertRethinkDBDocument(doc interface{}, model interface{}, table r.Term, session *r.Session) error
- func UpdateRethinkDBDocument(id string, doc interface{}, model interface{}, table r.Term, ...) error
- type Collection
- type Datastore
- type Document
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConnectRethinkDB ¶
ConnectRethinkDB connects to a rethinkdb database
func DeleteRethinkDBDocument ¶
DeleteRethinkDBDocument will delete the document with the given ID from rethinkdb
func GetRethinkDBAllDocuments ¶
GetRethinkDBAllDocuments will get all documents from the given rethinkdb table
func GetRethinkDBDocument ¶
GetRethinkDBDocument will get the document with the given ID from rethinkdb
Types ¶
type Collection ¶
Collection represents a named group of documents in the datastore.
type Datastore ¶
type Datastore interface { CreateDoc(*Document) (*Document, error) DeleteDoc(*Document) error GetAllDocs(*Collection) ([]Document, error) GetDoc(string, *Collection) (*Document, error) UpdateDoc(*Document) (*Document, error) }
Datastore interface abstracts the underlying storage implementation.
type Document ¶
type Document struct { Collection Collection Content interface{} }
Document represents a "record" in the datastore.
Click to show internal directories.
Click to hide internal directories.