api

package
v0.0.0-...-3a39eda Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2023 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HandleCreateShorty

func HandleCreateShorty(shortener shortener) echo.HandlerFunc

func HandleGetShorty

func HandleGetShorty(shortener shortener) echo.HandlerFunc

func HandleRedirect

func HandleRedirect(shortener shortener) echo.HandlerFunc

func NewValidator

func NewValidator() *requestValidator

Types

type Api

type Api struct {
	// contains filtered or unexported fields
}

func New

func New(shortener shortener) *Api

func (*Api) AddCloser

func (a *Api) AddCloser(closer CloseFunc)

func (*Api) ServeHTTP

func (s *Api) ServeHTTP(w http.ResponseWriter, r *http.Request)

func (*Api) Shutdown

func (a *Api) Shutdown(ctx context.Context) error

type CloseFunc

type CloseFunc func(context.Context) error

Jump to

Keyboard shortcuts

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