-
Notifications
You must be signed in to change notification settings - Fork 0
/
api_routes.go
37 lines (33 loc) · 1.79 KB
/
api_routes.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
36
37
package internal
import (
"net/http"
"github.com/tedsuo/rata"
)
const (
AppsFromRouteRequest = "AppsFromRoute"
AppsRequest = "Apps"
DeleteRouteRequest = "DeleteRoute"
DeleteServiceBindingRequest = "DeleteServiceBinding"
InfoRequest = "Info"
PrivateDomainRequest = "PrivateDomain"
RouteMappingsFromRouteRequest = "RouteMappingsFromRoute"
RoutesFromSpaceRequest = "RoutesFromSpace"
ServiceBindingsRequest = "ServiceBindings"
ServiceInstancesRequest = "ServiceInstances"
SharedDomainRequest = "SharedDomain"
SpaceServiceInstancesRequest = "SpaceServiceInstances"
)
var APIRoutes = rata.Routes{
{Path: "/v2/apps", Method: http.MethodGet, Name: AppsRequest},
{Path: "/v2/info", Method: http.MethodGet, Name: InfoRequest},
{Path: "/v2/private_domains/:private_domain_guid", Method: http.MethodGet, Name: PrivateDomainRequest},
{Path: "/v2/routes/:route_guid", Method: http.MethodDelete, Name: DeleteRouteRequest},
{Path: "/v2/routes/:route_guid/apps", Method: http.MethodGet, Name: AppsFromRouteRequest},
{Path: "/v2/routes/:route_guid/route_mappings", Method: http.MethodGet, Name: RouteMappingsFromRouteRequest},
{Path: "/v2/service_bindings", Method: http.MethodGet, Name: ServiceBindingsRequest},
{Path: "/v2/service_bindings/:service_binding_guid", Method: http.MethodDelete, Name: DeleteServiceBindingRequest},
{Path: "/v2/service_instances", Method: http.MethodGet, Name: ServiceInstancesRequest},
{Path: "/v2/shared_domains/:shared_domain_guid", Method: http.MethodGet, Name: SharedDomainRequest},
{Path: "/v2/spaces/:guid/service_instances", Method: http.MethodGet, Name: SpaceServiceInstancesRequest},
{Path: "/v2/spaces/:space_guid/routes", Method: http.MethodGet, Name: RoutesFromSpaceRequest},
}