Documentation ¶
Index ¶
- Variables
- type Option
- type ToDoService
- func (s *ToDoService) AddTask(ctx context.Context, userID, content string) (*storages.Task, error)
- func (s *ToDoService) ListTasks(ctx context.Context, userID, createDate string) ([]*storages.Task, error)
- func (s *ToDoService) Login(ctx context.Context, userID, pw string, jwtKey string) (string, error)
- func (s *ToDoService) ValidToken(token, jwtKey string) (string, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var Now = time.Now
Functions ¶
This section is empty.
Types ¶
type Option ¶
type Option func(service *ToDoService)
func WithConfig ¶
func WithStore ¶
func WithStore(db storages.StoreInterface) Option
type ToDoService ¶
type ToDoService struct { Store storages.StoreInterface Cache cache.Cache // contains filtered or unexported fields }
ToDoService implement HTTserver
func NewToDoService ¶
func NewToDoService(opts ...Option) *ToDoService
func (*ToDoService) ValidToken ¶
func (s *ToDoService) ValidToken(token, jwtKey string) (string, error)
Click to show internal directories.
Click to hide internal directories.