usecase

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthUsecase

type AuthUsecase struct {
	// contains filtered or unexported fields
}

func NewAuthUsecase

func NewAuthUsecase(userRepository internal.UserRepository) *AuthUsecase

func (AuthUsecase) GenerateAuthToken

func (service AuthUsecase) GenerateAuthToken(user entity.User, tokenizer internal.Tokenizer) (string, error)

func (AuthUsecase) SSO

func (service AuthUsecase) SSO(token string, authenticator internal.SSOAuthenticator) (*entity.User, error)

type TodoUsecase

type TodoUsecase struct {
	// contains filtered or unexported fields
}

func NewTodoUsecase

func NewTodoUsecase(todoRepository internal.TodoRepository) *TodoUsecase

func (TodoUsecase) CreateTodo

func (service TodoUsecase) CreateTodo(t entity.CreateTodoParam) (*entity.Todo, error)

func (TodoUsecase) DeleteTodo

func (service TodoUsecase) DeleteTodo(ID primitive.ObjectID) (bool, error)

func (TodoUsecase) GetAllUserTodos

func (service TodoUsecase) GetAllUserTodos(ID primitive.ObjectID) ([]*entity.Todo, error)

func (TodoUsecase) GetTodo

func (service TodoUsecase) GetTodo(ID primitive.ObjectID) (*entity.Todo, error)

func (TodoUsecase) UpdateTodo

func (service TodoUsecase) UpdateTodo(ID primitive.ObjectID, t entity.UpdateTodoParam) (bool, error)

Jump to

Keyboard shortcuts

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