linkerDeliveryHttp

package
v0.0.0-...-704a905 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

type Handler struct {
	LinkerUseCase LinkerUseCase.LinkerUseCase
}

func MakeHandler

func MakeHandler(linker LinkerUseCase.LinkerUseCase) Handler

func (Handler) Count

func (h Handler) Count(ctx echo.Context) error

Count godoc @Summary Count @Description getting counting by bash @Tags linker @Produce application/json @Param hash path string true "hash to be counted" @Success 200 {object} webUtils.Success @Failure 404 {object} webUtils.Error "Not found" @Router /count/{hash} [get]

func (Handler) Create

func (h Handler) Create(ctx echo.Context) error

Create godoc @Summary Create @Description creating hash by url or return existing hash @Tags linker @Accept application/json @Produce application/json @Param Url body linkerProto.UrlWrapper true "url to hash" @Success 200 {object} webUtils.Success @Failure 400 {object} webUtils.Error "Data is invalid" @Router / [post]

func (Handler) Get

func (h Handler) Get(ctx echo.Context) error

Get godoc @Summary Get @Description getting hash by url @Tags linker @Produce application/json @Param hash path string true "hash to be converted to url" @Success 301 {object} webUtils.Success @Failure 404 {object} webUtils.Error "Not found" @Router /{hash} [get]

Jump to

Keyboard shortcuts

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