Documentation
¶
Index ¶
- type IDGenerator
- type MemoryStorage
- func (m MemoryStorage) Delete(ctx context.Context, id string) error
- func (m MemoryStorage) DeleteAll(ctx context.Context) error
- func (m MemoryStorage) Read(ctx context.Context, id string) (*pb.Todo, error)
- func (m MemoryStorage) ReadAll(ctx context.Context) ([]*pb.Todo, error)
- func (m MemoryStorage) Save(ctx context.Context, todo *pb.Todo) error
- type Server
- func (s *Server) CreateTodo(ctx context.Context, in *pb.CreateTodoRequest) (*pb.Todo, error)
- func (s *Server) DeleteAllTodos(ctx context.Context, in *empty.Empty) (*empty.Empty, error)
- func (s *Server) DeleteTodo(ctx context.Context, in *pb.DeleteTodoRequest) (*empty.Empty, error)
- func (s *Server) GetTodo(ctx context.Context, in *pb.GetTodoRequest) (*pb.Todo, error)
- func (s *Server) ListTodos(ctx context.Context, in *pb.ListTodosRequest) (*pb.ListTodosResponse, error)
- func (s *Server) UpdateTodo(ctx context.Context, in *pb.UpdateTodoRequest) (*pb.Todo, error)
- type Storage
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IDGenerator ¶
type IDGenerator func() string
type Server ¶
type Server struct {
pb.UnimplementedTodosServer
// contains filtered or unexported fields
}
func (*Server) CreateTodo ¶
func (*Server) DeleteAllTodos ¶
func (*Server) DeleteTodo ¶
func (*Server) ListTodos ¶
func (s *Server) ListTodos(ctx context.Context, in *pb.ListTodosRequest) (*pb.ListTodosResponse, error)
func (*Server) UpdateTodo ¶
Click to show internal directories.
Click to hide internal directories.