| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 |
- package types
- type APIVerb string
- const (
- APIVerbGet APIVerb = "get"
- APIVerbCreate APIVerb = "create"
- APIVerbList APIVerb = "list"
- APIVerbUpdate APIVerb = "update"
- APIVerbDelete APIVerb = "delete"
- )
- type APIVerbGroup []APIVerb
- func ReadVerbGroup() APIVerbGroup {
- return []APIVerb{APIVerbGet, APIVerbList}
- }
- func ReadWriteVerbGroup() APIVerbGroup {
- return []APIVerb{APIVerbGet, APIVerbList, APIVerbCreate, APIVerbUpdate, APIVerbDelete}
- }
- type HTTPVerb string
- const (
- HTTPVerbGet HTTPVerb = "GET"
- HTTPVerbPost HTTPVerb = "POST"
- HTTPVerbPut HTTPVerb = "PUT"
- HTTPVerbPatch HTTPVerb = "PUT"
- HTTPVerbDelete HTTPVerb = "DELETE"
- )
- type URLParam string
- const (
- URLParamProjectID URLParam = "project_id"
- URLParamClusterID URLParam = "cluster_id"
- URLParamNamespace URLParam = "namespace"
- URLParamApplication URLParam = "application"
- )
- type Path struct {
- Parent *Path
- RelativePath string
- }
- type APIRequestMetadata struct {
- Verb APIVerb
- Method HTTPVerb
- Path *Path
- Scopes []PermissionScope
- ShouldRedirect bool
- }
|