Server data model
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
package model
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
"sync"
|
||||
)
|
||||
|
||||
type Handler struct {
|
||||
Id string
|
||||
Route *Route
|
||||
Writing sync.Mutex
|
||||
Writer http.ResponseWriter
|
||||
Request *http.Request
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
package model
|
||||
|
||||
type Route struct {
|
||||
Id string `json:"id"`
|
||||
Method string `json:"method"`
|
||||
Pattern string `json:"url_pattern"`
|
||||
Entrypoint string `json:"entrypoint"`
|
||||
Command string `json:"command"`
|
||||
}
|
||||
Reference in New Issue
Block a user