Documentation ¶
Index ¶
- func CreateLink(env *Env, w http.ResponseWriter, r *http.Request) error
- func Exists(name string) (bool, error)
- func Favicon(env *Env, w http.ResponseWriter, r *http.Request) error
- func GetIndex(env *Env, w http.ResponseWriter, r *http.Request) error
- func Index(env *Env, w http.ResponseWriter, r *http.Request) error
- func ParseQueryParameter(param string) (int, int)
- type Env
- type Error
- type Handler
- type StatusError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateLink ¶
GET ?http://link creates the link and redirect to the link
func GetIndex ¶
/ Single endpoint / / When there's a query we're using it's value to save the link in the database / If there's a code (eg: hostname.com/EnYQkRXzK30d) we redirect to the given value
func ParseQueryParameter ¶ added in v1.0.7
Types ¶
type Handler ¶
func (Handler) ServeHTTP ¶
func (h Handler) ServeHTTP(w http.ResponseWriter, r *http.Request)
Adapted from https://blog.questionable.services/article/http-handler-error-handling-revisited/
type StatusError ¶
func (StatusError) Error ¶
func (se StatusError) Error() string
func (StatusError) Status ¶
func (se StatusError) Status() int
Click to show internal directories.
Click to hide internal directories.