Documentation ¶
Index ¶
- type TodoInMemoryStore
- func (s *TodoInMemoryStore) Create(description string) error
- func (s *TodoInMemoryStore) Delete(id string) error
- func (s *TodoInMemoryStore) Find(id string) (*domain.Todo, error)
- func (s *TodoInMemoryStore) FindAll() ([]*domain.Todo, error)
- func (s *TodoInMemoryStore) IsAvailable() bool
- func (s *TodoInMemoryStore) Update(id, description string, complete bool) error
- type TodoPostgresStore
- func (s *TodoPostgresStore) Create(description string) error
- func (s *TodoPostgresStore) Delete(id string) error
- func (s *TodoPostgresStore) Find(id string) (*domain.Todo, error)
- func (s *TodoPostgresStore) FindAll() ([]*domain.Todo, error)
- func (s *TodoPostgresStore) IsAvailable() bool
- func (s *TodoPostgresStore) Update(id, description string, complete bool) error
- type TodoStore
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TodoInMemoryStore ¶
type TodoInMemoryStore struct {
// contains filtered or unexported fields
}
func NewTodoInMemoryStore ¶
func NewTodoInMemoryStore(available ...bool) *TodoInMemoryStore
func (*TodoInMemoryStore) Create ¶
func (s *TodoInMemoryStore) Create(description string) error
func (*TodoInMemoryStore) Delete ¶
func (s *TodoInMemoryStore) Delete(id string) error
func (*TodoInMemoryStore) IsAvailable ¶
func (s *TodoInMemoryStore) IsAvailable() bool
type TodoPostgresStore ¶
type TodoPostgresStore struct {
// contains filtered or unexported fields
}
func NewTodoPostsgresStore ¶
func NewTodoPostsgresStore(db *sql.DB, isAvailable bool) *TodoPostgresStore
func (*TodoPostgresStore) Create ¶
func (s *TodoPostgresStore) Create(description string) error
func (*TodoPostgresStore) Delete ¶
func (s *TodoPostgresStore) Delete(id string) error
func (*TodoPostgresStore) IsAvailable ¶
func (s *TodoPostgresStore) IsAvailable() bool
Click to show internal directories.
Click to hide internal directories.