handler

package
v0.0.0-...-d12243e Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2024 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 URLShortener

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

URLShortener represents the URL shortener application

func NewURLShortener

func NewURLShortener(redisCli urlgenerator.RedisClientProvider) *URLShortener

NewURLShortener creates a new instance of URLShortener

func (*URLShortener) RedirectHandler

func (u *URLShortener) RedirectHandler(w http.ResponseWriter, r *http.Request)

RedirectHandler handles the redirect route

func (*URLShortener) ShortenHandler

func (u *URLShortener) ShortenHandler(w http.ResponseWriter, r *http.Request)

ShortenHandler handles the shorten route

func (*URLShortener) WelcomeHandler

func (u *URLShortener) WelcomeHandler(w http.ResponseWriter, r *http.Request)

WelcomeHandler handles the welcome route

Jump to

Keyboard shortcuts

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