Documentation ¶
Index ¶
- type MongoConnectDetails
- func (mongoConnectDetails *MongoConnectDetails) AssignCollection(dbName string, collectionName string)
- func (mongoConnectDetails *MongoConnectDetails) Connect() error
- func (mongoConnectDetails *MongoConnectDetails) CreateDocument(document *interface{}) (interface{}, error)
- func (mongoConnectDetails *MongoConnectDetails) Disconnect() error
- func (mongoConnectDetails *MongoConnectDetails) GetDocument(documnetID string, model *interface{}) (*interface{}, error)
- func (mongoConnectDetails *MongoConnectDetails) ListDatabases() ([]string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MongoConnectDetails ¶
type MongoConnectDetails struct { Username string `json:"username"` Password string `json:"password"` Host string `json:"host"` Port int `json:"port"` AuthSource string `json:"authSource"` App string `json:"app"` // contains filtered or unexported fields }
MongoConnectDetails model
func (*MongoConnectDetails) AssignCollection ¶
func (mongoConnectDetails *MongoConnectDetails) AssignCollection(dbName string, collectionName string)
func (*MongoConnectDetails) Connect ¶
func (mongoConnectDetails *MongoConnectDetails) Connect() error
Connect function to mongo that accepts MongoConnectDetails struct
func (*MongoConnectDetails) CreateDocument ¶
func (mongoConnectDetails *MongoConnectDetails) CreateDocument(document *interface{}) (interface{}, error)
CreateDocument
func (*MongoConnectDetails) Disconnect ¶
func (mongoConnectDetails *MongoConnectDetails) Disconnect() error
func (*MongoConnectDetails) GetDocument ¶
func (mongoConnectDetails *MongoConnectDetails) GetDocument(documnetID string, model *interface{}) (*interface{}, error)
GetDocument will retrieve a single experience post by its uuid
func (*MongoConnectDetails) ListDatabases ¶
func (mongoConnectDetails *MongoConnectDetails) ListDatabases() ([]string, error)
ListDatabases returns database list
Click to show internal directories.
Click to hide internal directories.