Documentation ¶
Index ¶
- type URLHandler
- func (uh *URLHandler) Delete(c echo.Context) error
- func (uh *URLHandler) GetByID(c echo.Context) error
- func (uh *URLHandler) Redirect(c echo.Context) error
- func (uh *URLHandler) RegisterRoutes(e *echo.Echo)
- func (uh *URLHandler) RegisterValidation() error
- func (uh *URLHandler) Store(c echo.Context) error
- func (uh *URLHandler) StoreUserURL(c echo.Context) error
- func (uh *URLHandler) Update(c echo.Context) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type URLHandler ¶
type URLHandler struct {
// contains filtered or unexported fields
}
URLHandler represent the http handler for url
func NewURLHandler ¶
func NewURLHandler(us domain.URLUsecase, authenticator *auth.Authenticator, v *web.AppValidator, logger *zap.Logger, tracer trace.Tracer) (*URLHandler, error)
NewURLHandler will initialize the url/ resources endpoint
func (*URLHandler) Delete ¶
func (uh *URLHandler) Delete(c echo.Context) error
Delete will delete URL by given id
func (*URLHandler) GetByID ¶
func (uh *URLHandler) GetByID(c echo.Context) error
GetByID will get url by given id
func (*URLHandler) Redirect ¶
func (uh *URLHandler) Redirect(c echo.Context) error
Redirect will redirect to link by given id
func (*URLHandler) RegisterRoutes ¶
func (uh *URLHandler) RegisterRoutes(e *echo.Echo)
RegisterRoutes registers routes for a path with matching handler
func (*URLHandler) RegisterValidation ¶
func (uh *URLHandler) RegisterValidation() error
RegisterValidation will initialize validation for url handler
func (*URLHandler) Store ¶
func (uh *URLHandler) Store(c echo.Context) error
Store will store the URL by given request body
func (*URLHandler) StoreUserURL ¶
func (uh *URLHandler) StoreUserURL(c echo.Context) error
StoreUserURL will store the URL of authenticated user by given request body
func (*URLHandler) Update ¶
func (uh *URLHandler) Update(c echo.Context) error
Update will update the URL by given request body
Click to show internal directories.
Click to hide internal directories.