Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Handlers ¶
type Handlers interface { CreateNewUser() gin.HandlerFunc GetUsers() gin.HandlerFunc GetUserBySubscribedId() gin.HandlerFunc FindOneAndUpdateUser() gin.HandlerFunc FindOneAndDeleteUser() gin.HandlerFunc }
type Repository ¶
type Repository interface { Create(ctx context.Context, user *models.User) (*mongo.InsertOneResult, error) GetUsers(ctx context.Context) ([]*models.User, error) Find(ctx context.Context, filter interface{}) ([]*models.User, error) FindOneUserByCondition(ctx context.Context, filter interface{}) (*models.User, error) FindOneAndUpdate(ctx context.Context, filter, update bson.M) (*models.User, error) FindOneAndDelete(ctx context.Context, filter interface{}) *mongo.SingleResult }
type UseCase ¶
type UseCase interface { CreateNewUser(ctx context.Context, user *models.User) (*mongo.InsertOneResult, error) GetUsers(ctx context.Context) ([]*models.User, error) GetUserBySubscribedId(ctx context.Context, subscribedId string) (*models.User, error) GetUserByUsername(ctx context.Context, username string) (*models.User, error) FindOneAndUpdateUser(ctx context.Context, filter, update bson.M) (*models.User, error) FindOneAndDeleteUser(ctx context.Context, filter interface{}) (*mongo.SingleResult, error) GetVip(ctx context.Context) ([]*models.User, error) }
Click to show internal directories.
Click to hide internal directories.