Documentation ¶
Index ¶
- func GenerateUri(host, port, name, username, password string) string
- type Aggregate
- type Collections
- type CountData
- type DeleteOne
- type Find
- type FindAll
- type FindOne
- type InsertOne
- type MongoDBLogger
- func (m MongoDBLogger) Aggregate(payload Aggregate, ctx context.Context) error
- func (m MongoDBLogger) Count(payload CountData, ctx context.Context) error
- func (m MongoDBLogger) DeleteOne(payload DeleteOne, ctx context.Context) error
- func (m MongoDBLogger) Find(payload Find, ctx context.Context) error
- func (m MongoDBLogger) FindAll(payload FindAll, ctx context.Context) error
- func (m MongoDBLogger) FindOne(payload FindOne, ctx context.Context) error
- func (m MongoDBLogger) InsertOne(payload InsertOne, ctx context.Context) error
- func (m MongoDBLogger) UpdateOne(payload UpdateOne, ctx context.Context) error
- type Mongodb
- type Templates
- type UpdateOne
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateUri ¶
Types ¶
type Collections ¶
type Collections interface { Find(payload Find, ctx context.Context) error FindAll(payload FindAll, ctx context.Context) error // without page and size Count(payload CountData, ctx context.Context) error FindOne(payload FindOne, ctx context.Context) error InsertOne(payload InsertOne, ctx context.Context) error UpdateOne(payload UpdateOne, ctx context.Context) error Aggregate(payload Aggregate, ctx context.Context) error DeleteOne(payload DeleteOne, ctx context.Context) error }
Collections is mongodb's collection of function
func NewMongoDBLogger ¶
func NewMongoDBLogger(mongoClient Mongodb, collectionName string) Collections
type MongoDBLogger ¶
type MongoDBLogger struct {
// contains filtered or unexported fields
}
func (MongoDBLogger) Aggregate ¶
func (m MongoDBLogger) Aggregate(payload Aggregate, ctx context.Context) error
func (MongoDBLogger) Count ¶
func (m MongoDBLogger) Count(payload CountData, ctx context.Context) error
func (MongoDBLogger) DeleteOne ¶
func (m MongoDBLogger) DeleteOne(payload DeleteOne, ctx context.Context) error
func (MongoDBLogger) FindAll ¶
func (m MongoDBLogger) FindAll(payload FindAll, ctx context.Context) error
func (MongoDBLogger) FindOne ¶
func (m MongoDBLogger) FindOne(payload FindOne, ctx context.Context) error
type Mongodb ¶
type Mongodb struct {
// contains filtered or unexported fields
}
func (Mongodb) GetMongoClient ¶
func (Mongodb) GetMongoLogger ¶
type Templates ¶
type Templates interface { Save(obj interface{}, ctx context.Context) error Update(obj interface{}, ctx context.Context) error FindById(id string, result interface{}, ctx context.Context) error }
func ImplementTemplateRepository ¶
func ImplementTemplateRepository(mongoDb Collections) Templates
Click to show internal directories.
Click to hide internal directories.