Documentation ¶
Index ¶
- Variables
- type Block
- type CRUDInteractor
- type DTO
- type Handler
- func (h *Handler) Block(w http.ResponseWriter, r *http.Request)
- func (h *Handler) Blocks(w http.ResponseWriter, r *http.Request)
- func (h *Handler) Create(w http.ResponseWriter, r *http.Request)
- func (h *Handler) Delete(w http.ResponseWriter, r *http.Request)
- func (h *Handler) Update(w http.ResponseWriter, r *http.Request)
- type Reader
- type Repo
- type Repository
- type Usecases
- type Writer
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrBlockNotFound = errors.New("block not found") ErrBlockNotCreated = errors.New("block not created") ErrBlockNotDeleted = errors.New("block not deleted") ErrBlockNotUpdated = errors.New("block not updated") ErrEmptyBlockName = errors.New("empty block name") ErrEmptyBlockFormfactor = errors.New("empty block formfactor") ErrEmptyBlockType = errors.New("empty block type") )
Functions ¶
This section is empty.
Types ¶
type CRUDInteractor ¶
type CRUDInteractor struct {
// contains filtered or unexported fields
}
func NewCRUDInteractor ¶
func NewCRUDInteractor(repo Repository) *CRUDInteractor
func (*CRUDInteractor) Delete ¶
func (i *CRUDInteractor) Delete(blockID int) error
func (*CRUDInteractor) GetRange ¶
func (i *CRUDInteractor) GetRange(limit, offset int) ([]*Block, error)
func (*CRUDInteractor) Update ¶
func (i *CRUDInteractor) Update(newBlock *Block) error
type DTO ¶
type Repo ¶
type Repo struct {
// contains filtered or unexported fields
}
func NewSQLRepository ¶
func NewSQLRepository(db sqlutil.SQLDatabase) *Repo
type Repository ¶
Click to show internal directories.
Click to hide internal directories.