mirror of
https://github.com/safing/portbase
synced 2025-09-01 10:09:50 +00:00
31 lines
516 B
Go
31 lines
516 B
Go
// Copyright Safing ICS Technologies GmbH. Use of this source code is governed by the AGPL license that can be found in the LICENSE file.
|
|
|
|
package api
|
|
|
|
import (
|
|
"net/http"
|
|
)
|
|
|
|
type Route struct {
|
|
Name string
|
|
Method string
|
|
Path string
|
|
Handler http.Handler
|
|
}
|
|
|
|
type Routes []Route
|
|
|
|
var routes = Routes{
|
|
Route{
|
|
"Index",
|
|
"GET",
|
|
"/test",
|
|
http.StripPrefix("/test", http.FileServer(http.Dir("api/test"))),
|
|
},
|
|
Route{
|
|
"Websockets",
|
|
"GET",
|
|
"/api/v1",
|
|
http.HandlerFunc(apiVersionOneHandler),
|
|
},
|
|
}
|