/
entry.go
35 lines (27 loc) · 830 Bytes
/
entry.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
package main
import (
"net/http"
"github.com/krhancoc/frud/config"
)
type EntryEndpoint struct {
Data *config.Endpoint
}
var EntryEndpointObject EntryEndpoint = EntryEndpoint{
Data: &config.Endpoint{
Name: "Entry",
Description: "Entry object description",
Path: "/entry",
},
}
func (*EntryEndpoint) Get(w http.ResponseWriter, req *http.Request, ctx config.AppContext) {
ctx.Render.Text(w, 200, "HELLO")
}
func (*EntryEndpoint) Post(w http.ResponseWriter, req *http.Request, ctx config.AppContext) {
ctx.Render.Text(w, 200, "HELLO")
}
func (*EntryEndpoint) Delete(w http.ResponseWriter, req *http.Request, ctx config.AppContext) {
ctx.Render.Text(w, 200, "HELLO")
}
func (*EntryEndpoint) Put(w http.ResponseWriter, req *http.Request, ctx config.AppContext) {
ctx.Render.Text(w, 200, "HELLO")
}