Merge pull request #968 from RainbowMango/pr_add_exploreresponse_status
Add status of explore response
This commit is contained in:
commit
30803c9b8c
|
|
@ -69,6 +69,15 @@ type ExploreResponse struct {
|
|||
// +required
|
||||
UID types.UID `json:"uid"`
|
||||
|
||||
// Successful indicates whether the request be processed successfully.
|
||||
// +required
|
||||
Successful bool `json:"successful"`
|
||||
|
||||
// Status contains extra details information about why the request not successful.
|
||||
// This filed is not consulted in any way if "Successful" is "true".
|
||||
// +optional
|
||||
Status *RequestStatus `json:"status,omitempty"`
|
||||
|
||||
// The patch body. We only support "JSONPatch" currently which implements RFC 6902.
|
||||
// +optional
|
||||
Patch []byte `json:"patch,omitempty"`
|
||||
|
|
@ -102,6 +111,17 @@ type ExploreResponse struct {
|
|||
Healthy *bool `json:"healthy,omitempty"`
|
||||
}
|
||||
|
||||
// RequestStatus holds the status of a request.
|
||||
type RequestStatus struct {
|
||||
// Message is human-readable description of the status of this operation.
|
||||
// +optional
|
||||
Message string `json:"message,omitempty"`
|
||||
|
||||
// Code is the HTTP return code of this status.
|
||||
// +optional
|
||||
Code int32 `json:"code,omitempty"`
|
||||
}
|
||||
|
||||
// PatchType is the type of patch being used to represent the mutated object
|
||||
type PatchType string
|
||||
|
||||
|
|
|
|||
|
|
@ -60,6 +60,11 @@ func (in *ExploreRequest) DeepCopy() *ExploreRequest {
|
|||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *ExploreResponse) DeepCopyInto(out *ExploreResponse) {
|
||||
*out = *in
|
||||
if in.Status != nil {
|
||||
in, out := &in.Status, &out.Status
|
||||
*out = new(RequestStatus)
|
||||
**out = **in
|
||||
}
|
||||
if in.Patch != nil {
|
||||
in, out := &in.Patch, &out.Patch
|
||||
*out = make([]byte, len(*in))
|
||||
|
|
@ -143,6 +148,22 @@ func (in *ExploreReview) DeepCopyObject() runtime.Object {
|
|||
return nil
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *RequestStatus) DeepCopyInto(out *RequestStatus) {
|
||||
*out = *in
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RequestStatus.
|
||||
func (in *RequestStatus) DeepCopy() *RequestStatus {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(RequestStatus)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *ResourceExploringWebhook) DeepCopyInto(out *ResourceExploringWebhook) {
|
||||
*out = *in
|
||||
|
|
|
|||
Loading…
Reference in New Issue