users

package
v0.0.0-...-cbf5b65 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2023 License: MIT Imports: 5 Imported by: 0

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)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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