This repository has been archived by the owner on Feb 2, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 16
/
routes.go
45 lines (36 loc) · 1.64 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
package baggageclaim
import "github.com/tedsuo/rata"
const (
ListVolumes = "ListVolumes"
GetVolume = "GetVolume"
CreateVolume = "CreateVolume"
DestroyVolume = "DestroyVolume"
DestroyVolumes = "DestroyVolumes"
CreateVolumeAsync = "CreateVolumeAsync"
CreateVolumeAsyncCancel = "CreateVolumeAsyncCancel"
CreateVolumeAsyncCheck = "CreateVolumeAsyncCheck"
SetProperty = "SetProperty"
GetPrivileged = "GetPrivileged"
SetPrivileged = "SetPrivileged"
StreamIn = "StreamIn"
StreamOut = "StreamOut"
StreamP2pOut = "StreamP2pOut"
GetP2pUrl = "GetP2pUrl"
)
var Routes = rata.Routes{
{Path: "/volumes", Method: "GET", Name: ListVolumes},
{Path: "/volumes", Method: "POST", Name: CreateVolume},
{Path: "/volumes-async", Method: "POST", Name: CreateVolumeAsync},
{Path: "/volumes-async/:handle", Method: "GET", Name: CreateVolumeAsyncCheck},
{Path: "/volumes-async/:handle", Method: "DELETE", Name: CreateVolumeAsyncCancel},
{Path: "/volumes/:handle", Method: "GET", Name: GetVolume},
{Path: "/volumes/:handle/properties/:property", Method: "PUT", Name: SetProperty},
{Path: "/volumes/:handle/privileged", Method: "GET", Name: GetPrivileged},
{Path: "/volumes/:handle/privileged", Method: "PUT", Name: SetPrivileged},
{Path: "/volumes/:handle/stream-in", Method: "PUT", Name: StreamIn},
{Path: "/volumes/:handle/stream-out", Method: "PUT", Name: StreamOut},
{Path: "/volumes/:handle/stream-p2p-out", Method: "PUT", Name: StreamP2pOut},
{Path: "/volumes/destroy", Method: "DELETE", Name: DestroyVolumes},
{Path: "/volumes/:handle", Method: "DELETE", Name: DestroyVolume},
{Path: "/p2p-url", Method: "GET", Name: GetP2pUrl},
}