Documentation ¶
Index ¶
- type CoreRepository
- func (r *CoreRepository) Aggregate(ctx context.Context, pipeline interface{}, opts ...*options.AggregateOptions) (*mongo.Cursor, error)
- func (r *CoreRepository) CountDocuments(ctx context.Context, filter interface{}, opts ...*options.CountOptions) (int64, error)
- func (r *CoreRepository) DeleteMany(ctx context.Context, filter interface{}, opts ...*options.DeleteOptions) (*mongo.DeleteResult, error)
- func (r *CoreRepository) DeleteOne(ctx context.Context, filter interface{}, opts ...*options.DeleteOptions) (*mongo.DeleteResult, error)
- func (r *CoreRepository) Find(ctx context.Context, filter interface{}, opts ...*options.FindOptions) (*mongo.Cursor, error)
- func (r *CoreRepository) FindOne(ctx context.Context, filter interface{}, opts ...*options.FindOneOptions) *mongo.SingleResult
- func (r *CoreRepository) GetCollection() *mongo.Collection
- func (r *CoreRepository) GetCollectionName() string
- func (r *CoreRepository) GetDatabaseName() string
- func (r *CoreRepository) InsertMany(ctx context.Context, documents []interface{}, ...) (*mongo.InsertManyResult, error)
- func (r *CoreRepository) InsertOne(ctx context.Context, document interface{}, opts ...*options.InsertOneOptions) (*mongo.InsertOneResult, error)
- func (r *CoreRepository) UpdateMany(ctx context.Context, filter interface{}, update interface{}, ...) (*mongo.UpdateResult, error)
- func (r *CoreRepository) UpdateOne(ctx context.Context, filter interface{}, update interface{}, ...) (*mongo.UpdateResult, error)
- type CsItemRepository
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CoreRepository ¶
type CoreRepository struct {
// contains filtered or unexported fields
}
func NewCoreRepository ¶
func NewCoreRepository(mc *mongo.Database, mo *options.CollectionOptions, cn string) *CoreRepository
func (*CoreRepository) Aggregate ¶
func (r *CoreRepository) Aggregate(ctx context.Context, pipeline interface{}, opts ...*options.AggregateOptions) (*mongo.Cursor, error)
func (*CoreRepository) CountDocuments ¶
func (r *CoreRepository) CountDocuments(ctx context.Context, filter interface{}, opts ...*options.CountOptions) (int64, error)
func (*CoreRepository) DeleteMany ¶
func (r *CoreRepository) DeleteMany(ctx context.Context, filter interface{}, opts ...*options.DeleteOptions) (*mongo.DeleteResult, error)
func (*CoreRepository) DeleteOne ¶
func (r *CoreRepository) DeleteOne(ctx context.Context, filter interface{}, opts ...*options.DeleteOptions) (*mongo.DeleteResult, error)
func (*CoreRepository) Find ¶
func (r *CoreRepository) Find(ctx context.Context, filter interface{}, opts ...*options.FindOptions) (*mongo.Cursor, error)
func (*CoreRepository) FindOne ¶
func (r *CoreRepository) FindOne(ctx context.Context, filter interface{}, opts ...*options.FindOneOptions) *mongo.SingleResult
func (*CoreRepository) GetCollection ¶
func (r *CoreRepository) GetCollection() *mongo.Collection
func (*CoreRepository) GetCollectionName ¶
func (r *CoreRepository) GetCollectionName() string
func (*CoreRepository) GetDatabaseName ¶
func (r *CoreRepository) GetDatabaseName() string
func (*CoreRepository) InsertMany ¶
func (r *CoreRepository) InsertMany(ctx context.Context, documents []interface{}, opts ...*options.InsertManyOptions) (*mongo.InsertManyResult, error)
func (*CoreRepository) InsertOne ¶
func (r *CoreRepository) InsertOne(ctx context.Context, document interface{}, opts ...*options.InsertOneOptions) (*mongo.InsertOneResult, error)
func (*CoreRepository) UpdateMany ¶
func (r *CoreRepository) UpdateMany(ctx context.Context, filter interface{}, update interface{}, opts ...*options.UpdateOptions) (*mongo.UpdateResult, error)
func (*CoreRepository) UpdateOne ¶
func (r *CoreRepository) UpdateOne(ctx context.Context, filter interface{}, update interface{}, opts ...*options.UpdateOptions) (*mongo.UpdateResult, error)
type CsItemRepository ¶
type CsItemRepository interface { GetCsItems(ctx context.Context, filter interface{}, limit int64, sort bson.D) ([]*domain.CsItem, error) PostCsItem(ctx context.Context, item *domain.CsItem) error }
func NewCsItemRepository ¶
func NewCsItemRepository(mongo *mongo.Database, cn string) CsItemRepository
Click to show internal directories.
Click to hide internal directories.