service

package
v0.0.21 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Service added in v0.0.13

type Service interface {
	HealthCheck(ctx context.Context) error
	GetTaskList(ctx context.Context, id model.UserID) (model.TaskList, error)
	AddTask(ctx context.Context, id model.UserID, title string) (*model.Task, error)
	AddUser(ctx context.Context, name string, password string) (model.UserID, error)
	GetUser(ctx context.Context, name string) (*model.User, error)
	Login(ctx context.Context, name string, password string) (string, error)
	ValidateToken(ctx context.Context, r *http.Request) (model.UserID, error)
}

type TodoService added in v0.0.14

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

func NewTodoService added in v0.0.14

func NewTodoService(ctx context.Context, db repository.Database, kvs repository.KVS, jwter *jwter.JWTer, logger log.Logger) *TodoService

func (*TodoService) AddTask added in v0.0.14

func (st *TodoService) AddTask(ctx context.Context, id model.UserID, title string) (*model.Task, error)

func (*TodoService) AddUser added in v0.0.16

func (st *TodoService) AddUser(ctx context.Context, name string, password string) (model.UserID, error)

func (*TodoService) GetTaskList added in v0.0.14

func (st *TodoService) GetTaskList(ctx context.Context, id model.UserID) (model.TaskList, error)

func (*TodoService) GetUser added in v0.0.17

func (st *TodoService) GetUser(ctx context.Context, name string) (*model.User, error)

func (*TodoService) HealthCheck added in v0.0.14

func (st *TodoService) HealthCheck(ctx context.Context) error

func (*TodoService) Login added in v0.0.17

func (st *TodoService) Login(ctx context.Context, name string, password string) (string, error)

func (*TodoService) ValidateToken added in v0.0.19

func (st *TodoService) ValidateToken(ctx context.Context, r *http.Request) (model.UserID, error)

Jump to

Keyboard shortcuts

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