Documentation ¶
Index ¶
- func ErrMessages(err error) *api.ErrorResponse
- type Controller
- func (c *Controller) AddLink(w http.ResponseWriter, r *http.Request)
- func (c *Controller) DeleteLink(w http.ResponseWriter, r *http.Request, hash string)
- func (c *Controller) GetLink(w http.ResponseWriter, r *http.Request, hash string)
- func (c *Controller) GetLinks(w http.ResponseWriter, r *http.Request, params api.GetLinksParams)
- func (c *Controller) UpdateLinks(w http.ResponseWriter, r *http.Request)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ErrMessages ¶
func ErrMessages(err error) *api.ErrorResponse
ErrMessages - helper for create error messages
Types ¶
type Controller ¶
type Controller struct {
// contains filtered or unexported fields
}
func NewController ¶
func NewController(log logger.Logger, linkServiceClient link_rpc.LinkServiceClient) Controller
NewController - create new link controller
func (*Controller) AddLink ¶
func (c *Controller) AddLink(w http.ResponseWriter, r *http.Request)
AddLink - add link
func (*Controller) DeleteLink ¶
func (c *Controller) DeleteLink(w http.ResponseWriter, r *http.Request, hash string)
DeleteLink - delete link
func (*Controller) GetLink ¶
func (c *Controller) GetLink(w http.ResponseWriter, r *http.Request, hash string)
GetLink - get link by hash
func (*Controller) GetLinks ¶
func (c *Controller) GetLinks(w http.ResponseWriter, r *http.Request, params api.GetLinksParams)
GetLinks - get links
func (*Controller) UpdateLinks ¶
func (c *Controller) UpdateLinks(w http.ResponseWriter, r *http.Request)
UpdateLinks - update link
Click to show internal directories.
Click to hide internal directories.