Documentation ¶
Index ¶
- type Config
- type TodoEntry
- type TodoManagerServer
- func (t *TodoManagerServer) CreateTodo(ctx context.Context, todo *todomgrpb.Todo) (*todomgrpb.Todo, error)
- func (t *TodoManagerServer) DeleteTodo(ctx context.Context, grpcTodo *todomgrpb.TodoIdReq) (*todomgrpb.DeleteTodoRes, error)
- func (t *TodoManagerServer) GetTodo(ctx context.Context, grpcTodo *todomgrpb.TodoIdReq) (*todomgrpb.Todo, error)
- func (t *TodoManagerServer) ListTodos(req *todomgrpb.ListTodosReq, srv todomgrpb.TodoManager_ListTodosServer) error
- func (t *TodoManagerServer) Stop()
- func (t *TodoManagerServer) UpdateTodo(ctx context.Context, grpcTodo *todomgrpb.Todo) (*todomgrpb.Todo, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TodoEntry ¶
TodoEntry is an object used for ORM mapping into the DB
type TodoManagerServer ¶
type TodoManagerServer struct {
// contains filtered or unexported fields
}
TodoManagerServer implements gRPC server for todo manager
func NewTodoManagerServer ¶
func NewTodoManagerServer(config *Config) *TodoManagerServer
NewTodoManagerServer creates a new TodoManagerServer
func (*TodoManagerServer) CreateTodo ¶
func (t *TodoManagerServer) CreateTodo(ctx context.Context, todo *todomgrpb.Todo) (*todomgrpb.Todo, error)
CreateTodo stores new todo in database
func (*TodoManagerServer) DeleteTodo ¶
func (t *TodoManagerServer) DeleteTodo(ctx context.Context, grpcTodo *todomgrpb.TodoIdReq) (*todomgrpb.DeleteTodoRes, error)
DeleteTodo deletes a todo with a specified ID and owner, if it exists
func (*TodoManagerServer) GetTodo ¶
func (t *TodoManagerServer) GetTodo(ctx context.Context, grpcTodo *todomgrpb.TodoIdReq) (*todomgrpb.Todo, error)
GetTodo returns todo with specified ID and owner, if it exists
func (*TodoManagerServer) ListTodos ¶
func (t *TodoManagerServer) ListTodos(req *todomgrpb.ListTodosReq, srv todomgrpb.TodoManager_ListTodosServer) error
ListTodos lists all todos owned by the user sent in request
func (*TodoManagerServer) Stop ¶
func (t *TodoManagerServer) Stop()
Stop stops the server and frees resources
func (*TodoManagerServer) UpdateTodo ¶
func (t *TodoManagerServer) UpdateTodo(ctx context.Context, grpcTodo *todomgrpb.Todo) (*todomgrpb.Todo, error)
UpdateTodo updates a todo with a specified ID and owner, if it exists
Click to show internal directories.
Click to hide internal directories.