Documentation ¶
Index ¶
- type AuthService
- type Authorization
- type Service
- type Todo
- type TodoService
- func (s *TodoService) Create(ctx context.Context, todo model.Todo) error
- func (s *TodoService) Delete(ctx context.Context, todoID primitive.ObjectID, userID primitive.ObjectID) error
- func (s *TodoService) GetAll(ctx context.Context, userID primitive.ObjectID) ([]*model.Todo, error)
- func (s *TodoService) GetCompletedTodos(ctx context.Context, userID primitive.ObjectID) ([]*model.Todo, error)
- func (s *TodoService) GetImportantTodos(ctx context.Context, userID primitive.ObjectID) ([]*model.Todo, error)
- func (s *TodoService) GetUncompletedTodos(ctx context.Context, userID primitive.ObjectID) ([]*model.Todo, error)
- func (s *TodoService) Update(ctx context.Context, todoID primitive.ObjectID, userID primitive.ObjectID, ...) error
- type User
- type UserService
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthService ¶
type AuthService struct {
// contains filtered or unexported fields
}
func NewAuthService ¶
func NewAuthService(repo *repository.Repository) *AuthService
type Authorization ¶
type Service ¶
type Service struct { Authorization User Todo }
func New ¶
func New(repo *repository.Repository) *Service
type Todo ¶
type Todo interface { Create(ctx context.Context, todo model.Todo) error GetAll(ctx context.Context, userID primitive.ObjectID) ([]*model.Todo, error) Update(ctx context.Context, todoID primitive.ObjectID, userID primitive.ObjectID, options model.TodoUpdateOptions) error Delete(ctx context.Context, todoID primitive.ObjectID, userID primitive.ObjectID) error GetCompletedTodos(ctx context.Context, userID primitive.ObjectID) ([]*model.Todo, error) GetImportantTodos(ctx context.Context, userID primitive.ObjectID) ([]*model.Todo, error) GetUncompletedTodos(ctx context.Context, userID primitive.ObjectID) ([]*model.Todo, error) }
type TodoService ¶
type TodoService struct {
// contains filtered or unexported fields
}
func NewTodoService ¶
func NewTodoService(repo *repository.Repository) *TodoService
func (*TodoService) GetCompletedTodos ¶
func (*TodoService) GetImportantTodos ¶
func (*TodoService) GetUncompletedTodos ¶
type UserService ¶
type UserService struct {
// contains filtered or unexported fields
}
func NewUserService ¶
func NewUserService(repo *repository.Repository) *UserService
func (*UserService) UpdateUsername ¶
Click to show internal directories.
Click to hide internal directories.