MCPcopy Create free account
hub / github.com/docker/go-plugins-helpers / Request

Struct Request

authorization/api.go:53–83  ·  view source on GitHub ↗

Request holds data required for authZ plugins

Source from the content-addressed store, hash-verified

51
52// Request holds data required for authZ plugins
53type Request struct {
54 // User holds the user extracted by AuthN mechanism
55 User string `json:"User,omitempty"`
56
57 // UserAuthNMethod holds the mechanism used to extract user details (e.g., krb)
58 UserAuthNMethod string `json:"UserAuthNMethod,omitempty"`
59
60 // RequestMethod holds the HTTP method (GET/POST/PUT)
61 RequestMethod string `json:"RequestMethod,omitempty"`
62
63 // RequestUri holds the full HTTP uri (e.g., /v1.21/version)
64 RequestURI string `json:"RequestUri,omitempty"`
65
66 // RequestBody stores the raw request body sent to the docker daemon
67 RequestBody []byte `json:"RequestBody,omitempty"`
68
69 // RequestHeaders stores the raw request headers sent to the docker daemon
70 RequestHeaders map[string]string `json:"RequestHeaders,omitempty"`
71
72 // RequestPeerCertificates stores the request's TLS peer certificates in PEM format
73 RequestPeerCertificates []*PeerCertificate `json:"RequestPeerCertificates,omitempty"`
74
75 // ResponseStatusCode stores the status code returned from docker daemon
76 ResponseStatusCode int `json:"ResponseStatusCode,omitempty"`
77
78 // ResponseBody stores the raw response body sent from docker daemon
79 ResponseBody []byte `json:"ResponseBody,omitempty"`
80
81 // ResponseHeaders stores the response headers sent to the docker daemon
82 ResponseHeaders map[string]string `json:"ResponseHeaders,omitempty"`
83}
84
85// Response represents authZ plugin response
86type Response struct {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected