Versions in this module Expand all Collapse all v0 v0.1.0 Oct 9, 2022 Changes in this version + var ErrEmailExists = errors.New("This email already exists.") + var ErrInvalidEmailFormat = errors.New("Invalid email format. Check RFC 5322.") + var ErrInvalidEmailPassword = errors.New("Invalid email/password combination.") + var ErrInvalidPasswordFormat = errors.New(...) + var ErrInvalidToken = errors.New("Invalid token.") + var ErrNilUser = errors.New("Nil user.") + var ErrNoFetch = errors.New("Fetching failed, check logs.") + var ErrNoInsert = errors.New("Insertion failed, check logs.") + var ErrNoPostList = errors.New("Could not get a list of posts, check logs.") + var ErrNoRemove = errors.New("Removal failed, check logs.") + type Service struct + Conn redis.Conn + JwtSecret []byte + Logger *zap.Logger + Repo *database.Database + 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)