http

package
v0.0.0-...-e3b22c1 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterShortenerRoutes

func RegisterShortenerRoutes(shortener *Shortener, engine *gin.Engine)

Types

type ErrorResponse

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

type RedirectRequest

type RedirectRequest struct {
	Key string `uri:"key" binding:"required,ascii"`
}

type ShortenRequest

type ShortenRequest struct {
	URL string `json:"url" binding:"required,http_url"`
}

type ShortenResponse

type ShortenResponse struct {
	Key string `json:"key"`
}

type Shortener

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

func NewShortenerAdapter

func NewShortenerAdapter(shortenerService ports.ShortenerService, validate *validator.Validate) *Shortener

func (*Shortener) Redirect

func (s *Shortener) Redirect(c *gin.Context)

func (*Shortener) Shorten

func (s *Shortener) Shorten(c *gin.Context)

Jump to

Keyboard shortcuts

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