代码拉取完成,页面将自动刷新
// Code generated by go-swagger; DO NOT EDIT.
package scan
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
import (
"fmt"
"io"
"github.com/go-openapi/runtime"
"github.com/go-openapi/strfmt"
"gitee.com/nanjo-fan/goharbor-client/model"
)
// StopScanArtifactReader is a Reader for the StopScanArtifact structure.
type StopScanArtifactReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *StopScanArtifactReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 202:
result := NewStopScanArtifactAccepted()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
case 400:
result := NewStopScanArtifactBadRequest()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 401:
result := NewStopScanArtifactUnauthorized()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 403:
result := NewStopScanArtifactForbidden()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 404:
result := NewStopScanArtifactNotFound()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 500:
result := NewStopScanArtifactInternalServerError()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
default:
return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
// NewStopScanArtifactAccepted creates a StopScanArtifactAccepted with default headers values
func NewStopScanArtifactAccepted() *StopScanArtifactAccepted {
return &StopScanArtifactAccepted{}
}
/*
StopScanArtifactAccepted handles this case with default header values.
Accepted
*/
type StopScanArtifactAccepted struct {
/*The ID of the corresponding request for the response
*/
XRequestID string
}
func (o *StopScanArtifactAccepted) Error() string {
return fmt.Sprintf("[POST /projects/{project_name}/repositories/{repository_name}/artifacts/{reference}/scan/stop][%d] stopScanArtifactAccepted ", 202)
}
func (o *StopScanArtifactAccepted) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
// response header X-Request-Id
o.XRequestID = response.GetHeader("X-Request-Id")
return nil
}
// NewStopScanArtifactBadRequest creates a StopScanArtifactBadRequest with default headers values
func NewStopScanArtifactBadRequest() *StopScanArtifactBadRequest {
return &StopScanArtifactBadRequest{}
}
/*
StopScanArtifactBadRequest handles this case with default header values.
Bad request
*/
type StopScanArtifactBadRequest struct {
/*The ID of the corresponding request for the response
*/
XRequestID string
Payload *model.Errors
}
func (o *StopScanArtifactBadRequest) Error() string {
return fmt.Sprintf("[POST /projects/{project_name}/repositories/{repository_name}/artifacts/{reference}/scan/stop][%d] stopScanArtifactBadRequest %+v", 400, o.Payload)
}
func (o *StopScanArtifactBadRequest) GetPayload() *model.Errors {
return o.Payload
}
func (o *StopScanArtifactBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
// response header X-Request-Id
o.XRequestID = response.GetHeader("X-Request-Id")
o.Payload = new(model.Errors)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewStopScanArtifactUnauthorized creates a StopScanArtifactUnauthorized with default headers values
func NewStopScanArtifactUnauthorized() *StopScanArtifactUnauthorized {
return &StopScanArtifactUnauthorized{}
}
/*
StopScanArtifactUnauthorized handles this case with default header values.
Unauthorized
*/
type StopScanArtifactUnauthorized struct {
/*The ID of the corresponding request for the response
*/
XRequestID string
Payload *model.Errors
}
func (o *StopScanArtifactUnauthorized) Error() string {
return fmt.Sprintf("[POST /projects/{project_name}/repositories/{repository_name}/artifacts/{reference}/scan/stop][%d] stopScanArtifactUnauthorized %+v", 401, o.Payload)
}
func (o *StopScanArtifactUnauthorized) GetPayload() *model.Errors {
return o.Payload
}
func (o *StopScanArtifactUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
// response header X-Request-Id
o.XRequestID = response.GetHeader("X-Request-Id")
o.Payload = new(model.Errors)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewStopScanArtifactForbidden creates a StopScanArtifactForbidden with default headers values
func NewStopScanArtifactForbidden() *StopScanArtifactForbidden {
return &StopScanArtifactForbidden{}
}
/*
StopScanArtifactForbidden handles this case with default header values.
Forbidden
*/
type StopScanArtifactForbidden struct {
/*The ID of the corresponding request for the response
*/
XRequestID string
Payload *model.Errors
}
func (o *StopScanArtifactForbidden) Error() string {
return fmt.Sprintf("[POST /projects/{project_name}/repositories/{repository_name}/artifacts/{reference}/scan/stop][%d] stopScanArtifactForbidden %+v", 403, o.Payload)
}
func (o *StopScanArtifactForbidden) GetPayload() *model.Errors {
return o.Payload
}
func (o *StopScanArtifactForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
// response header X-Request-Id
o.XRequestID = response.GetHeader("X-Request-Id")
o.Payload = new(model.Errors)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewStopScanArtifactNotFound creates a StopScanArtifactNotFound with default headers values
func NewStopScanArtifactNotFound() *StopScanArtifactNotFound {
return &StopScanArtifactNotFound{}
}
/*
StopScanArtifactNotFound handles this case with default header values.
Not found
*/
type StopScanArtifactNotFound struct {
/*The ID of the corresponding request for the response
*/
XRequestID string
Payload *model.Errors
}
func (o *StopScanArtifactNotFound) Error() string {
return fmt.Sprintf("[POST /projects/{project_name}/repositories/{repository_name}/artifacts/{reference}/scan/stop][%d] stopScanArtifactNotFound %+v", 404, o.Payload)
}
func (o *StopScanArtifactNotFound) GetPayload() *model.Errors {
return o.Payload
}
func (o *StopScanArtifactNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
// response header X-Request-Id
o.XRequestID = response.GetHeader("X-Request-Id")
o.Payload = new(model.Errors)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewStopScanArtifactInternalServerError creates a StopScanArtifactInternalServerError with default headers values
func NewStopScanArtifactInternalServerError() *StopScanArtifactInternalServerError {
return &StopScanArtifactInternalServerError{}
}
/*
StopScanArtifactInternalServerError handles this case with default header values.
Internal server error
*/
type StopScanArtifactInternalServerError struct {
/*The ID of the corresponding request for the response
*/
XRequestID string
Payload *model.Errors
}
func (o *StopScanArtifactInternalServerError) Error() string {
return fmt.Sprintf("[POST /projects/{project_name}/repositories/{repository_name}/artifacts/{reference}/scan/stop][%d] stopScanArtifactInternalServerError %+v", 500, o.Payload)
}
func (o *StopScanArtifactInternalServerError) GetPayload() *model.Errors {
return o.Payload
}
func (o *StopScanArtifactInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
// response header X-Request-Id
o.XRequestID = response.GetHeader("X-Request-Id")
o.Payload = new(model.Errors)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。