| 123456789101112131415161718192021222324252627282930313233343536373839404142 |
- 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 Path struct {
- Parent *Path
- RelativePath string
- }
- type APIRequestMetadata struct {
- Verb APIVerb
- Method HTTPVerb
- Path *Path
- }
|