Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterHandlers ¶
Types ¶
type CreateRequest ¶
func (CreateRequest) Validate ¶
func (r CreateRequest) Validate() error
type Service ¶
type Service interface { Get(id string) (entity.Post, error) Count() (int, error) Query(offset, limit int) ([]entity.Post, error) Create(req CreateRequest) (entity.Post, error) Update(id string, req UpdateRequest) (entity.Post, error) Delete(id string) (entity.Post, error) IncrementViewCount(post entity.Post) error }
func NewService ¶
type UpdateRequest ¶
Click to show internal directories.
Click to hide internal directories.