handler

package
v1.3.4 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2020 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type InternalHandler

type InternalHandler struct {
}

InternalHandler will handle internal, non public requests

func (*InternalHandler) StatusHandler

func (h *InternalHandler) StatusHandler(ctx *fasthttp.RequestCtx)

StatusHandler handles requests to api's status route

type ShortenerHandler

type ShortenerHandler struct {
	LinkService shortener.LinkService
}

ShortenerHandler is a route handler for link service

func (*ShortenerHandler) List added in v1.3.0

func (h *ShortenerHandler) List(ctx *fasthttp.RequestCtx)

List is a handler for listing link entities

func (h *ShortenerHandler) NewLink(ctx *fasthttp.RequestCtx)

NewLink is a handler for creating a new Link

func (*ShortenerHandler) Redirect

func (h *ShortenerHandler) Redirect(ctx *fasthttp.RequestCtx)

Redirect is a handler for redirecting to a Link.URL, given a slug from path

Jump to

Keyboard shortcuts

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