controller

package
v0.0.0-...-8ac899c Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2024 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 IUrlShortener

type IUrlShortener interface {
	Shorten(w http.ResponseWriter, r *http.Request)
	Redirect(w http.ResponseWriter, r *http.Request)
}

type UrlShortener

type UrlShortener struct {
	UrlShortenerService service.IUrlShortener
	Validator           *validator.Validate
}

func New

func New(service service.IUrlShortener, validate *validator.Validate) *UrlShortener

func (*UrlShortener) Redirect

func (c *UrlShortener) Redirect(w http.ResponseWriter, r *http.Request)

func (*UrlShortener) Shorten

func (c *UrlShortener) Shorten(w http.ResponseWriter, r *http.Request)

Jump to

Keyboard shortcuts

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