Documentation ¶
Index ¶
- func Count[T any](ctx context.Context, collection *mongo.Collection, filterInput T) (int64, error)
- func Create[T any](ctx context.Context, collection *mongo.Collection, data T) (*T, error)
- func DeleteByID(ctx context.Context, collection *mongo.Collection, id primitive.ObjectID) error
- func Find[T any, TFilter any](ctx context.Context, collection *mongo.Collection, f TFilter, ...) ([]T, error)
- func GetByID[T any](ctx context.Context, collection *mongo.Collection, id primitive.ObjectID) (*T, error)
- func Update[T any](ctx context.Context, collection *mongo.Collection, id primitive.ObjectID, in T) (*T, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeleteByID ¶
DeleteByID delete data by id
func Find ¶
func Find[T any, TFilter any](ctx context.Context, collection *mongo.Collection, f TFilter, pagination paging.StdPaging, ) ([]T, error)
Find find user based on provided filters
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.