github.com/cilium/cilium@v1.16.2/api/v1/server/restapi/endpoint/get_endpoint_id_healthz_responses.go (about) 1 // Code generated by go-swagger; DO NOT EDIT. 2 3 // Copyright Authors of Cilium 4 // SPDX-License-Identifier: Apache-2.0 5 6 package endpoint 7 8 // This file was generated by the swagger tool. 9 // Editing this file might prove futile when you re-run the swagger generate command 10 11 import ( 12 "net/http" 13 14 "github.com/go-openapi/runtime" 15 16 "github.com/cilium/cilium/api/v1/models" 17 ) 18 19 // GetEndpointIDHealthzOKCode is the HTTP code returned for type GetEndpointIDHealthzOK 20 const GetEndpointIDHealthzOKCode int = 200 21 22 /* 23 GetEndpointIDHealthzOK Success 24 25 swagger:response getEndpointIdHealthzOK 26 */ 27 type GetEndpointIDHealthzOK struct { 28 29 /* 30 In: Body 31 */ 32 Payload *models.EndpointHealth `json:"body,omitempty"` 33 } 34 35 // NewGetEndpointIDHealthzOK creates GetEndpointIDHealthzOK with default headers values 36 func NewGetEndpointIDHealthzOK() *GetEndpointIDHealthzOK { 37 38 return &GetEndpointIDHealthzOK{} 39 } 40 41 // WithPayload adds the payload to the get endpoint Id healthz o k response 42 func (o *GetEndpointIDHealthzOK) WithPayload(payload *models.EndpointHealth) *GetEndpointIDHealthzOK { 43 o.Payload = payload 44 return o 45 } 46 47 // SetPayload sets the payload to the get endpoint Id healthz o k response 48 func (o *GetEndpointIDHealthzOK) SetPayload(payload *models.EndpointHealth) { 49 o.Payload = payload 50 } 51 52 // WriteResponse to the client 53 func (o *GetEndpointIDHealthzOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { 54 55 rw.WriteHeader(200) 56 if o.Payload != nil { 57 payload := o.Payload 58 if err := producer.Produce(rw, payload); err != nil { 59 panic(err) // let the recovery middleware deal with this 60 } 61 } 62 } 63 64 // GetEndpointIDHealthzInvalidCode is the HTTP code returned for type GetEndpointIDHealthzInvalid 65 const GetEndpointIDHealthzInvalidCode int = 400 66 67 /* 68 GetEndpointIDHealthzInvalid Invalid identity provided 69 70 swagger:response getEndpointIdHealthzInvalid 71 */ 72 type GetEndpointIDHealthzInvalid struct { 73 } 74 75 // NewGetEndpointIDHealthzInvalid creates GetEndpointIDHealthzInvalid with default headers values 76 func NewGetEndpointIDHealthzInvalid() *GetEndpointIDHealthzInvalid { 77 78 return &GetEndpointIDHealthzInvalid{} 79 } 80 81 // WriteResponse to the client 82 func (o *GetEndpointIDHealthzInvalid) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { 83 84 rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses 85 86 rw.WriteHeader(400) 87 } 88 89 // GetEndpointIDHealthzNotFoundCode is the HTTP code returned for type GetEndpointIDHealthzNotFound 90 const GetEndpointIDHealthzNotFoundCode int = 404 91 92 /* 93 GetEndpointIDHealthzNotFound Endpoint not found 94 95 swagger:response getEndpointIdHealthzNotFound 96 */ 97 type GetEndpointIDHealthzNotFound struct { 98 } 99 100 // NewGetEndpointIDHealthzNotFound creates GetEndpointIDHealthzNotFound with default headers values 101 func NewGetEndpointIDHealthzNotFound() *GetEndpointIDHealthzNotFound { 102 103 return &GetEndpointIDHealthzNotFound{} 104 } 105 106 // WriteResponse to the client 107 func (o *GetEndpointIDHealthzNotFound) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { 108 109 rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses 110 111 rw.WriteHeader(404) 112 } 113 114 // GetEndpointIDHealthzTooManyRequestsCode is the HTTP code returned for type GetEndpointIDHealthzTooManyRequests 115 const GetEndpointIDHealthzTooManyRequestsCode int = 429 116 117 /* 118 GetEndpointIDHealthzTooManyRequests Rate-limiting too many requests in the given time frame 119 120 swagger:response getEndpointIdHealthzTooManyRequests 121 */ 122 type GetEndpointIDHealthzTooManyRequests struct { 123 } 124 125 // NewGetEndpointIDHealthzTooManyRequests creates GetEndpointIDHealthzTooManyRequests with default headers values 126 func NewGetEndpointIDHealthzTooManyRequests() *GetEndpointIDHealthzTooManyRequests { 127 128 return &GetEndpointIDHealthzTooManyRequests{} 129 } 130 131 // WriteResponse to the client 132 func (o *GetEndpointIDHealthzTooManyRequests) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { 133 134 rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses 135 136 rw.WriteHeader(429) 137 }