http

package
v0.0.0-...-0efd02e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 18, 2023 License: MIT Imports: 16 Imported by: 0

Documentation

Index

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL