Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GoogleCloudStorer ¶
type GoogleCloudStorer struct {
// contains filtered or unexported fields
}
func NewGoogleCloudStorer ¶
func NewGoogleCloudStorer(projectID string, bucketName string, ctx context.Context) *GoogleCloudStorer
func (*GoogleCloudStorer) CreateTodo ¶
func (s *GoogleCloudStorer) CreateTodo(t types.Todo) types.Todo
CreateTodo stores a new Todo in Google Cloud Storage
func (*GoogleCloudStorer) DestroyTodo ¶
func (s *GoogleCloudStorer) DestroyTodo(id string) error
DestroyTodo removes a Todo from Google Cloud Storage
func (*GoogleCloudStorer) FindTodo ¶
func (s *GoogleCloudStorer) FindTodo(id string) types.Todo
FindTodo retrieves a Todo obj from Google Cloud Storage if it exists. If it doesn't, the method will return an empty Todo
func (*GoogleCloudStorer) ListTodos ¶
func (s *GoogleCloudStorer) ListTodos() types.Todos
type InMemoryStorer ¶
type InMemoryStorer struct {
// contains filtered or unexported fields
}
func NewInMemoryStorer ¶
func NewInMemoryStorer() *InMemoryStorer
func (*InMemoryStorer) CreateTodo ¶
func (s *InMemoryStorer) CreateTodo(t types.Todo) types.Todo
func (*InMemoryStorer) DestroyTodo ¶
func (s *InMemoryStorer) DestroyTodo(id string) error
func (*InMemoryStorer) ListTodos ¶
func (s *InMemoryStorer) ListTodos() types.Todos
Click to show internal directories.
Click to hide internal directories.