Documentation ¶
Index ¶
- type AuthService
- type Autorization
- type Service
- type TodoItem
- type TodoItemService
- func (s *TodoItemService) Create(userId int, listId int, item todo.TodoItem) (int, error)
- func (s *TodoItemService) Delete(userId, itemId int) error
- func (s *TodoItemService) GetAll(userId, listId int) ([]todo.TodoItem, error)
- func (s *TodoItemService) GetById(userId, itemId int) (todo.TodoItem, error)
- func (s *TodoItemService) Update(userId int, listId int, input todo.UpdateItemInput) error
- type TodoList
- type TodoListService
- func (s *TodoListService) Create(userId int, list todo.TodoList) (int, error)
- func (s *TodoListService) Delete(userId, listId int) error
- func (s *TodoListService) GetAll(userId int) ([]todo.TodoList, error)
- func (s *TodoListService) GetById(userId, listId int) (todo.TodoList, error)
- func (s *TodoListService) Update(userId int, listId int, input todo.UpdateListInput) error
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.Autorization) *AuthService
func (*AuthService) CreateUser ¶
func (s *AuthService) CreateUser(user todo.User) (int, error)
func (*AuthService) GeneratePasswordHash ¶
func (s *AuthService) GeneratePasswordHash(password string) string
func (*AuthService) GenerateToken ¶
func (s *AuthService) GenerateToken(username, password string) (string, error)
func (*AuthService) ParseToken ¶
func (s *AuthService) ParseToken(accessToken string) (int, error)
type Autorization ¶
type Service ¶
type Service struct { Autorization TodoList TodoItem }
func NewService ¶
func NewService(repos *repository.Repository) *Service
type TodoItemService ¶
type TodoItemService struct {
// contains filtered or unexported fields
}
func NewTodoItemService ¶
func NewTodoItemService(repo repository.TodoItem, listRepo repository.TodoList) *TodoItemService
func (*TodoItemService) Create ¶
func (s *TodoItemService) Create(userId int, listId int, item todo.TodoItem) (int, error)
func (*TodoItemService) Delete ¶
func (s *TodoItemService) Delete(userId, itemId int) error
func (*TodoItemService) GetAll ¶
func (s *TodoItemService) GetAll(userId, listId int) ([]todo.TodoItem, error)
func (*TodoItemService) GetById ¶
func (s *TodoItemService) GetById(userId, itemId int) (todo.TodoItem, error)
type TodoListService ¶
type TodoListService struct {
// contains filtered or unexported fields
}
func NewTodoListSerevice ¶
func NewTodoListSerevice(repo repository.TodoList) *TodoListService
func (*TodoListService) Create ¶
func (s *TodoListService) Create(userId int, list todo.TodoList) (int, error)
func (*TodoListService) Delete ¶
func (s *TodoListService) Delete(userId, listId int) error
func (*TodoListService) GetAll ¶
func (s *TodoListService) GetAll(userId int) ([]todo.TodoList, error)
func (*TodoListService) GetById ¶
func (s *TodoListService) GetById(userId, listId int) (todo.TodoList, error)
Click to show internal directories.
Click to hide internal directories.