forked from cloudfoundry-attic/receptor
-
Notifications
You must be signed in to change notification settings - Fork 0
/
routes.go
67 lines (54 loc) · 2.35 KB
/
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
package receptor
import "github.com/tedsuo/rata"
const (
// Tasks
CreateTaskRoute = "CreateTask"
TasksRoute = "Tasks"
GetTaskRoute = "GetTask"
DeleteTaskRoute = "DeleteTask"
CancelTaskRoute = "CancelTask"
// DesiredLRPs
CreateDesiredLRPRoute = "CreateDesiredLRP"
GetDesiredLRPRoute = "GetDesiredLRP"
UpdateDesiredLRPRoute = "UpdateDesiredLRP"
DeleteDesiredLRPRoute = "DeleteDesiredLRP"
DesiredLRPsRoute = "DesiredLRPs"
// ActualLRPs
ActualLRPsRoute = "ActualLRPs"
ActualLRPsByProcessGuidRoute = "ActualLRPsByProcessGuid"
ActualLRPByProcessGuidAndIndexRoute = "ActualLRPByProcessGuidAndIndex"
KillActualLRPByProcessGuidAndIndexRoute = "KillActualLRPByProcessGuidAndIndex"
// Cells
CellsRoute = "Cells"
// Domains
UpsertDomainRoute = "UpsertDomain"
DomainsRoute = "Domains"
// Event Streaming
EventStream = "EventStream"
)
var Routes = rata.Routes{
// Tasks
{Path: "/v1/tasks", Method: "POST", Name: CreateTaskRoute},
{Path: "/v1/tasks", Method: "GET", Name: TasksRoute},
{Path: "/v1/tasks/:task_guid", Method: "GET", Name: GetTaskRoute},
{Path: "/v1/tasks/:task_guid", Method: "DELETE", Name: DeleteTaskRoute},
{Path: "/v1/tasks/:task_guid/cancel", Method: "POST", Name: CancelTaskRoute},
// DesiredLRPs
{Path: "/v1/desired_lrps", Method: "GET", Name: DesiredLRPsRoute},
{Path: "/v1/desired_lrps", Method: "POST", Name: CreateDesiredLRPRoute},
{Path: "/v1/desired_lrps/:process_guid", Method: "GET", Name: GetDesiredLRPRoute},
{Path: "/v1/desired_lrps/:process_guid", Method: "PUT", Name: UpdateDesiredLRPRoute},
{Path: "/v1/desired_lrps/:process_guid", Method: "DELETE", Name: DeleteDesiredLRPRoute},
// ActualLRPs
{Path: "/v1/actual_lrps", Method: "GET", Name: ActualLRPsRoute},
{Path: "/v1/actual_lrps/:process_guid", Method: "GET", Name: ActualLRPsByProcessGuidRoute},
{Path: "/v1/actual_lrps/:process_guid/index/:index", Method: "GET", Name: ActualLRPByProcessGuidAndIndexRoute},
{Path: "/v1/actual_lrps/:process_guid/index/:index", Method: "DELETE", Name: KillActualLRPByProcessGuidAndIndexRoute},
// Cells
{Path: "/v1/cells", Method: "GET", Name: CellsRoute},
// Domains
{Path: "/v1/domains/:domain", Method: "PUT", Name: UpsertDomainRoute},
{Path: "/v1/domains", Method: "GET", Name: DomainsRoute},
// Event Streaming
{Path: "/v1/events", Method: "GET", Name: EventStream},
}