Documentation ¶
Index ¶
- type AuthRepository
- func (authRepository *AuthRepository) CreateUser(ctx context.Context, user *models.User) error
- func (authRepository *AuthRepository) DeleteUser(ctx context.Context, id string) error
- func (authRepository *AuthRepository) FindUserByEmail(ctx context.Context, email string) (*models.User, error)
- func (authRepository *AuthRepository) FindUserByID(ctx context.Context, id string) (*models.User, error)
- func (authRepository *AuthRepository) FindUserByUsername(ctx context.Context, username string) (*models.User, error)
- func (authRepository *AuthRepository) UpdateUser(ctx context.Context, user *models.User) error
- type AuthRepositoryInterface
- type AuthService
- type AuthServiceInterface
- type TaskRepository
- func (taskRepository *TaskRepository) CreateTask(ctx context.Context, task *models.Task) error
- func (taskRepository *TaskRepository) DeleteTask(ctx context.Context, id string, userID string) error
- func (taskRepository *TaskRepository) GetTask(ctx context.Context, id string, userID string) (*models.Task, error)
- func (taskRepository *TaskRepository) ListTasks(ctx context.Context, userID string) ([]*models.Task, error)
- func (taskRepository *TaskRepository) UpdateTask(ctx context.Context, task *models.Task) error
- type TaskRepositoryInterface
- type TaskService
- func (taskService *TaskService) CreateTask(c *fiber.Ctx, req *types.CreateTaskRequest) error
- func (taskService *TaskService) DeleteTask(c *fiber.Ctx) error
- func (taskService *TaskService) GetTask(c *fiber.Ctx) error
- func (taskService *TaskService) ListTasks(c *fiber.Ctx, req *types.ListTasksRequest) error
- func (taskService *TaskService) UpdateTask(c *fiber.Ctx, req *types.UpdateTaskRequest) error
- type TaskServiceInterface
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthRepository ¶
type AuthRepository struct {
// contains filtered or unexported fields
}
func (*AuthRepository) CreateUser ¶
func (*AuthRepository) DeleteUser ¶
func (authRepository *AuthRepository) DeleteUser(ctx context.Context, id string) error
func (*AuthRepository) FindUserByEmail ¶
func (*AuthRepository) FindUserByID ¶
func (*AuthRepository) FindUserByUsername ¶
func (*AuthRepository) UpdateUser ¶
type AuthRepositoryInterface ¶
type AuthRepositoryInterface interface { FindUserByEmail(ctx context.Context, email string) (*models.User, error) FindUserByUsername(ctx context.Context, username string) (*models.User, error) FindUserByID(ctx context.Context, id string) (*models.User, error) CreateUser(ctx context.Context, user *models.User) error UpdateUser(ctx context.Context, user *models.User) error DeleteUser(ctx context.Context, id string) error }
func GetAuthRepository ¶
func GetAuthRepository(database *mongo.Database) AuthRepositoryInterface
func NewAuthRepository ¶
func NewAuthRepository(database *mongo.Database) AuthRepositoryInterface
type AuthService ¶
type AuthService struct {
// contains filtered or unexported fields
}
func (*AuthService) SignIn ¶
func (authService *AuthService) SignIn(c *fiber.Ctx, req *types.SignInRequest) error
func (*AuthService) SignOut ¶
func (authService *AuthService) SignOut(c *fiber.Ctx) error
func (*AuthService) SignUp ¶
func (authService *AuthService) SignUp(c *fiber.Ctx, req *types.SignUpRequest) error
SignUp creates a new user in the database
type AuthServiceInterface ¶
type AuthServiceInterface interface { SignUp(c *fiber.Ctx, req *types.SignUpRequest) error SignIn(c *fiber.Ctx, req *types.SignInRequest) error SignOut(c *fiber.Ctx) error }
func GetAuthService ¶
func GetAuthService(ctx context.Context, database *mongo.Database) AuthServiceInterface
func InitializeAuthService ¶
func InitializeAuthService(ctx context.Context, database *mongo.Database) AuthServiceInterface
type TaskRepository ¶
type TaskRepository struct {
// contains filtered or unexported fields
}
func (*TaskRepository) CreateTask ¶
func (*TaskRepository) DeleteTask ¶
func (*TaskRepository) UpdateTask ¶
type TaskRepositoryInterface ¶
type TaskRepositoryInterface interface { CreateTask(ctx context.Context, task *models.Task) error UpdateTask(ctx context.Context, task *models.Task) error DeleteTask(ctx context.Context, id string, userID string) error GetTask(ctx context.Context, id string, userID string) (*models.Task, error) ListTasks(ctx context.Context, userID string) ([]*models.Task, error) }
func GetTaskRepository ¶
func GetTaskRepository(database *mongo.Database) TaskRepositoryInterface
func NewTaskRepository ¶
func NewTaskRepository(database *mongo.Database) TaskRepositoryInterface
type TaskService ¶
type TaskService struct {
// contains filtered or unexported fields
}
func (*TaskService) CreateTask ¶
func (taskService *TaskService) CreateTask(c *fiber.Ctx, req *types.CreateTaskRequest) error
func (*TaskService) DeleteTask ¶
func (taskService *TaskService) DeleteTask(c *fiber.Ctx) error
func (*TaskService) GetTask ¶
func (taskService *TaskService) GetTask(c *fiber.Ctx) error
func (*TaskService) ListTasks ¶
func (taskService *TaskService) ListTasks(c *fiber.Ctx, req *types.ListTasksRequest) error
func (*TaskService) UpdateTask ¶
func (taskService *TaskService) UpdateTask(c *fiber.Ctx, req *types.UpdateTaskRequest) error
type TaskServiceInterface ¶
type TaskServiceInterface interface { CreateTask(c *fiber.Ctx, req *types.CreateTaskRequest) error UpdateTask(c *fiber.Ctx, req *types.UpdateTaskRequest) error GetTask(c *fiber.Ctx) error DeleteTask(c *fiber.Ctx) error ListTasks(c *fiber.Ctx, req *types.ListTasksRequest) error }
func GetTaskService ¶
func GetTaskService(taskRepository TaskRepositoryInterface) TaskServiceInterface
func NewTaskService ¶
func NewTaskService(taskRepository TaskRepositoryInterface) TaskServiceInterface
Click to show internal directories.
Click to hide internal directories.