Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrDeserializingReq = errors.New("Error reading request body")
ErrDeserializingReq Error deserializing request body
View Source
var ErrInvalidReqBody error = errors.New("Error validating request body")
ErrInvalidReqBody error validating request body
View Source
var ErrInvalidURL error = errors.New("invalid URL")
ErrInvalidURL URL given to be shortened is not valid
View Source
var ErrShortenedNotExist = errors.New("shortened URL does not exist")
ErrShortenedNotExist shortened URL does not exist
Functions ¶
This section is empty.
Types ¶
type GenericError ¶
type GenericError struct {
Message string `json:"message"`
}
GenericError is a generic error message returned by a server
type Urls ¶
type Urls struct {
// contains filtered or unexported fields
}
Urls is a http.Handler
func (*Urls) AddURL ¶
func (u *Urls) AddURL(rw http.ResponseWriter, r *http.Request)
AddURL adds a new URL struct in urlList
type ValidationError ¶
type ValidationError struct {
Messages []string `json:"messages"`
}
ValidationError is a collection of validation error messages
Click to show internal directories.
Click to hide internal directories.