handler

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2022 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Healthz

type Healthz struct {
	Logger *zap.Logger
	Tracer trace.Tracer
}

func (Healthz) Handle

func (h Healthz) Handle(c echo.Context) error

Handle shows server is up and running. nolint: wrapcheck

func (Healthz) Register

func (h Healthz) Register(g *echo.Group)

Register registers the routes of healthz handler on given echo group.

type URL

type URL struct {
	Store  store.URL
	Logger *zap.Logger
	Tracer trace.Tracer
}

URL handles interaction with URLs.

func (URL) Count

func (h URL) Count(c echo.Context) error

Count retrieves the access count for the given short URL. nolint: wrapcheck

func (URL) Create

func (h URL) Create(c echo.Context) error

Create generates short URL and save it on database. nolint: wrapcheck

func (URL) Register

func (h URL) Register(g *echo.Group)

Register registers the routes of URL handler on given group.

func (URL) Retrieve

func (h URL) Retrieve(c echo.Context) error

Retrieve retrieves URL for given short URL and redirect to it. nolint: wrapcheck

Jump to

Keyboard shortcuts

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