Documentation ¶
Index ¶
- func Connect() *gorm.DB
- type TodoDBInterface
- func (tdb *TodoDBInterface) Create(todo *entity.TodoEntity) error
- func (tdb *TodoDBInterface) Delete(todo *entity.TodoEntity) error
- func (tdb *TodoDBInterface) FindAll() ([]entity.TodoEntity, error)
- func (tdb *TodoDBInterface) FindByID(id uint) (*entity.TodoEntity, error)
- func (tdb *TodoDBInterface) Update(todo *entity.TodoEntity) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type TodoDBInterface ¶
type TodoDBInterface struct {
// contains filtered or unexported fields
}
func NewTodoDBInterface ¶
func NewTodoDBInterface(db *gorm.DB) *TodoDBInterface
func (*TodoDBInterface) Create ¶
func (tdb *TodoDBInterface) Create(todo *entity.TodoEntity) error
func (*TodoDBInterface) Delete ¶
func (tdb *TodoDBInterface) Delete(todo *entity.TodoEntity) error
func (*TodoDBInterface) FindAll ¶
func (tdb *TodoDBInterface) FindAll() ([]entity.TodoEntity, error)
func (*TodoDBInterface) FindByID ¶
func (tdb *TodoDBInterface) FindByID(id uint) (*entity.TodoEntity, error)
func (*TodoDBInterface) Update ¶
func (tdb *TodoDBInterface) Update(todo *entity.TodoEntity) error
Click to show internal directories.
Click to hide internal directories.