Documentation ¶
Index ¶
- func ConnectDB() *mongo.Client
- func GetCollection(collectionName string) *mongo.Collection
- func GetEnvLimit() int64
- func GetEnvLogin() (netID string, password string)
- func GetEnvMongoURI() string
- func GetOptionLimit(query *bson.M, c *gin.Context) (*options.FindOptions, error)
- func GetPortString() string
- type DBSingleton
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetCollection ¶
func GetCollection(collectionName string) *mongo.Collection
getting database collections
func GetEnvLimit ¶
func GetEnvLimit() int64
func GetEnvLogin ¶
func GetEnvMongoURI ¶
func GetEnvMongoURI() string
func GetOptionLimit ¶
Returns *options.FindOptions with a limit and offset applied. Returns error if any
func GetPortString ¶
func GetPortString() string
Types ¶
type DBSingleton ¶
type DBSingleton struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.