Documentation ¶
Index ¶
- Variables
- type Service
- func (service *Service) CreateNote(ctx context.Context, n *entity.Note) error
- func (service *Service) CreateTodo(ctx context.Context, t *entity.Todo) error
- func (service *Service) DeleteTodo(ctx context.Context, id string) error
- func (service *Service) GetAllNotes(ctx context.Context, userId string) (*[]entity.Note, error)
- func (service *Service) GetAllPendingTodos(ctx context.Context, userId string) (*[]entity.Todo, error)
- func (service *Service) GetAllPosts(ctx context.Context, directory string) ([]entity.Post, error)
- func (service *Service) GetNote(ctx context.Context, id string, userId string) (*[]entity.Note, error)
- func (service *Service) Login(ctx context.Context, u *entity.User) (string, error)
- func (service *Service) Logout(ctx context.Context, token string) error
- func (service *Service) Signup(ctx context.Context, u *entity.User) error
- func (service *Service) UpdateNote(ctx context.Context, n *entity.Note) error
- func (service *Service) UpdateTodo(ctx context.Context, t *entity.Todo) error
- func (service *Service) VerifyAndDecodeToken(ctx context.Context, token string) (string, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrInvalidEmailFormat = errors.New("Invalid email format. Check RFC 5322.") ErrInvalidPasswordFormat = errors.New("Password format: Min. 8 chars, atleast 1 number" + "1 lowercase char, 1 uppercase char, 1 special char") ErrEmailExists = errors.New("This email already exists.") ErrInvalidEmailPassword = errors.New("Invalid email/password combination.") ErrNilUser = errors.New("Nil user.") ErrInvalidToken = errors.New("Invalid token.") ErrNoInsert = errors.New("Insertion failed, check logs.") ErrNoFetch = errors.New("Fetching failed, check logs.") ErrNoRemove = errors.New("Removal failed, check logs.") ErrNoPostList = errors.New("Could not get a list of posts, check logs.") )
Functions ¶
This section is empty.
Types ¶
type Service ¶
func (*Service) CreateNote ¶
func (*Service) CreateTodo ¶
func (*Service) DeleteTodo ¶
func (*Service) GetAllNotes ¶
func (*Service) GetAllPendingTodos ¶
func (*Service) GetAllPosts ¶
GeAllPosts will read through a directory of posts and list out all the entries, sorted by their first commit date in descending order.
func (*Service) UpdateNote ¶
func (*Service) UpdateTodo ¶
Click to show internal directories.
Click to hide internal directories.