Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { ConnectionURL string `json:"connectionUrl"` Database string `json:"database"` }
Config provides options to establish connection to mongo db
type Mongodb ¶
type Mongodb struct {
// contains filtered or unexported fields
}
Mongodb struct
func (*Mongodb) CreateRecords ¶
func (m *Mongodb) CreateRecords(q QueryInsert) (ok bool, err error)
CreateRecords creates new records according to passed QueryInsert
func (*Mongodb) GetRecords ¶
type QueryGet ¶
type QueryGet struct { Collection string `json:"collection"` Query map[string]interface{} `json:"query"` }
QueryGet describes to perform retrieving mongo records
type QueryInsert ¶
type QueryInsert struct { Collection string `json:"collection"` Query []map[string]interface{} `json:"query"` }
QueryInsert describes interface to insert mongo records
Click to show internal directories.
Click to hide internal directories.