Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClientHelper ¶
type ClientHelper interface { Database(string) DatabaseHelper Connect() error StartSession() (mongo.Session, error) Ping() error }
ClientHelper Helper functions for the Client
func NewClient ¶
func NewClient(cnf *Config) (ClientHelper, error)
NewClient creates a new ClientHelper
type CollectionHelper ¶
CollectionHelper Helper functions for the Collection
type Config ¶
type Config struct { Username string Password string Host string Port string DatabaseName string Collection string }
Config stores the configuration for the database
type DatabaseHelper ¶
type DatabaseHelper interface { Collection(name string) CollectionHelper Client() ClientHelper }
DatabaseHelper Helper functions for the Database
Click to show internal directories.
Click to hide internal directories.