repository

package
v0.0.0-...-811e4ca Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 26, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL