Split Handler into Handler and APIHandler

This commit is contained in:
2016-07-17 17:03:50 +01:00
parent 5065c3178d
commit bb44578173
6 changed files with 125 additions and 99 deletions

15
web/api_responses.go Normal file
View File

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