Documentation ¶
Index ¶
- Variables
- type BlockContact
- type CRUDInteractor
- func (i *CRUDInteractor) Add(bcs ...*BlockContact) error
- func (i *CRUDInteractor) Delete(blockID int, cs ...string) error
- func (i *CRUDInteractor) Get(blockID int, contact string) (*BlockContact, error)
- func (i *CRUDInteractor) GetRange(blockID, limit, offset int) ([]*BlockContact, error)
- func (i *CRUDInteractor) Update(prevContact string, bc *BlockContact) error
- type DTO
- type DTOItem
- type Handler
- func (h *Handler) BlockContact(w http.ResponseWriter, r *http.Request)
- func (h *Handler) BlockContacts(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 Repo
- func (r *Repo) Find(blockID int, contact string) (*BlockContact, error)
- func (r *Repo) FindRange(blockID, limit, offset int) ([]*BlockContact, error)
- func (r *Repo) Remove(blockID int, cs ...string) error
- func (r *Repo) Store(bcs ...*BlockContact) error
- func (r *Repo) Update(prevContact string, bc *BlockContact) error
- type Repository
- type Usecase
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type BlockContact ¶
type CRUDInteractor ¶
type CRUDInteractor struct {
// contains filtered or unexported fields
}
func NewCRUDInteractor ¶
func NewCRUDInteractor(repo Repository) *CRUDInteractor
func (*CRUDInteractor) Add ¶
func (i *CRUDInteractor) Add(bcs ...*BlockContact) error
func (*CRUDInteractor) Get ¶
func (i *CRUDInteractor) Get(blockID int, contact string) (*BlockContact, error)
func (*CRUDInteractor) GetRange ¶
func (i *CRUDInteractor) GetRange(blockID, limit, offset int) ([]*BlockContact, error)
func (*CRUDInteractor) Update ¶
func (i *CRUDInteractor) Update(prevContact string, bc *BlockContact) error
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
func NewHandler ¶
func (*Handler) BlockContact ¶
func (h *Handler) BlockContact(w http.ResponseWriter, r *http.Request)
func (*Handler) BlockContacts ¶
func (h *Handler) BlockContacts(w http.ResponseWriter, r *http.Request)
type Repo ¶
type Repo struct {
// contains filtered or unexported fields
}
func NewSQLRepository ¶
func NewSQLRepository(db sqlutil.SQLTxDatabase) *Repo
func (*Repo) FindRange ¶
func (r *Repo) FindRange(blockID, limit, offset int) ([]*BlockContact, error)
func (*Repo) Store ¶
func (r *Repo) Store(bcs ...*BlockContact) error
type Repository ¶
type Repository interface { Find(blockID int, contact string) (*BlockContact, error) FindRange(blockID int, limit, offset int) ([]*BlockContact, error) Store(bcs ...*BlockContact) error Remove(blockID int, cs ...string) error Update(prevContact string, bc *BlockContact) error }
type Usecase ¶
type Usecase interface { Get(blockID int, contact string) (*BlockContact, error) GetRange(blockID int, limit, offset int) ([]*BlockContact, error) Add(bcs ...*BlockContact) error Delete(blockID int, cs ...string) error Update(prevContact string, bc *BlockContact) error }
Click to show internal directories.
Click to hide internal directories.