aboutsummaryrefslogtreecommitdiff
path: root/http.go
diff options
context:
space:
mode:
Diffstat (limited to 'http.go')
-rw-r--r--http.go15
1 files changed, 5 insertions, 10 deletions
diff --git a/http.go b/http.go
index 7b79aca..8efe657 100644
--- a/http.go
+++ b/http.go
@@ -4,25 +4,20 @@ import (
"net/url"
)
-type (
- GetNotSupported struct{}
- PostNotSupported struct{}
- PutNotSupported struct{}
- DeleteNotSupported struct{}
-)
+type BaseResource struct{}
-func (GetNotSupported) Get(values url.Values) (int, interface{}) {
+func (BaseResource) Get(values url.Values) (int, interface{}) {
return 405, ""
}
-func (PostNotSupported) Post(values url.Values) (int, interface{}) {
+func (BaseResource) Post(values url.Values) (int, interface{}) {
return 405, ""
}
-func (PutNotSupported) Put(values url.Values) (int, interface{}) {
+func (BaseResource) Put(values url.Values) (int, interface{}) {
return 405, ""
}
-func (DeleteNotSupported) Delete(values url.Values) (int, interface{}) {
+func (BaseResource) Delete(values url.Values) (int, interface{}) {
return 405, ""
}
bgstack15