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)
Click to show internal directories.
Click to hide internal directories.