Get basic HTTP server working

This commit is contained in:
2016-07-11 00:51:48 +01:00
parent 0ddf94c504
commit 76145b3969
4 changed files with 251 additions and 5 deletions

15
web/responses.go Normal file
View File

@@ -0,0 +1,15 @@
package web
//go:generate easyjson -all responses.go
// ShortenedResponse contains shortened URL info.
type ShortenedResponse struct {
UID string `json:"uid"`
ShortURL string `json:"short_url"`
URL string `json:"url"`
}
// ErrorResponse contains error info.
type ErrorResponse struct {
Error string `json:"error"`
}