Documentation ¶
Index ¶
Constants ¶
View Source
const (
USER_COLLECTION = "user"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Repository ¶
type Repository interface { UserCreate(ctx context.Context, data *model.UserModel) error UserFind(ctx context.Context, filters bson.M, orderBy string, pagination bool, page, perPage int) ([]*model.UserModel, error) UserFindByID(ctx context.Context, filters bson.M, sort string) (*model.UserModel, error) UserUpdate(ctx context.Context, filters bson.M, data *model.UserModel, id string) error UserDelete(ctx context.Context, filters bson.M) error }
Repository represent the repositories
func NewMongoRepository ¶
func NewMongoRepository(client *mongo.Client, dbName string) Repository
NewMongoRepository will create an object that represent the Repository interface
Click to show internal directories.
Click to hide internal directories.