Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ErrorResponse ¶
type ErrorResponse struct {
Error string `json:"error"`
}
type RedirectUrlRequest ¶
type RedirectUrlRequest struct {
ShortUrl string `json:"short_url"`
}
type ShortenUrlRequest ¶
type ShortenUrlRequest struct {
Url string `json:"url"`
}
type ShortenUrlResponse ¶
type ShortenUrlResponse struct {
ShortUrl string `json:"short_url"`
}
type UrlHandler ¶
type UrlHandler struct {
RedisClient *redis.Client
}
func (*UrlHandler) DeleteUrl ¶
func (h *UrlHandler) DeleteUrl(w http.ResponseWriter, r *http.Request)
func (*UrlHandler) RedirectUrl ¶
func (h *UrlHandler) RedirectUrl(w http.ResponseWriter, r *http.Request)
func (*UrlHandler) ShortenUrl ¶
func (h *UrlHandler) ShortenUrl(w http.ResponseWriter, r *http.Request)
Click to show internal directories.
Click to hide internal directories.