Initial commit
This commit is contained in:
18
vendor/github.com/hyperhq/hypercli/api/server/router/router.go
generated
vendored
Normal file
18
vendor/github.com/hyperhq/hypercli/api/server/router/router.go
generated
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
package router
|
||||
|
||||
import "github.com/hyperhq/hypercli/api/server/httputils"
|
||||
|
||||
// Router defines an interface to specify a group of routes to add the the docker server.
|
||||
type Router interface {
|
||||
Routes() []Route
|
||||
}
|
||||
|
||||
// Route defines an individual API route in the docker server.
|
||||
type Route interface {
|
||||
// Handler returns the raw function to create the http handler.
|
||||
Handler() httputils.APIFunc
|
||||
// Method returns the http method that the route responds to.
|
||||
Method() string
|
||||
// Path returns the subpath where the route responds to.
|
||||
Path() string
|
||||
}
|
||||
Reference in New Issue
Block a user