151 lines
4.4 KiB
Go
151 lines
4.4 KiB
Go
// Code generated by go-swagger; DO NOT EDIT.
|
|
|
|
package admin
|
|
|
|
// This file was generated by the swagger tool.
|
|
// Editing this file might prove futile when you re-run the swagger generate command
|
|
|
|
import (
|
|
"fmt"
|
|
|
|
"github.com/go-openapi/runtime"
|
|
"github.com/go-openapi/strfmt"
|
|
)
|
|
|
|
// AdminCronRunReader is a Reader for the AdminCronRun structure.
|
|
type AdminCronRunReader struct {
|
|
formats strfmt.Registry
|
|
}
|
|
|
|
// ReadResponse reads a server response into the received o.
|
|
func (o *AdminCronRunReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
|
|
switch response.Code() {
|
|
case 204:
|
|
result := NewAdminCronRunNoContent()
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
return nil, err
|
|
}
|
|
return result, nil
|
|
case 404:
|
|
result := NewAdminCronRunNotFound()
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
return nil, err
|
|
}
|
|
return nil, result
|
|
default:
|
|
return nil, runtime.NewAPIError("[POST /admin/cron/{task}] adminCronRun", response, response.Code())
|
|
}
|
|
}
|
|
|
|
// NewAdminCronRunNoContent creates a AdminCronRunNoContent with default headers values
|
|
func NewAdminCronRunNoContent() *AdminCronRunNoContent {
|
|
return &AdminCronRunNoContent{}
|
|
}
|
|
|
|
/*
|
|
AdminCronRunNoContent describes a response with status code 204, with default header values.
|
|
|
|
APIEmpty is an empty response
|
|
*/
|
|
type AdminCronRunNoContent struct {
|
|
}
|
|
|
|
// IsSuccess returns true when this admin cron run no content response has a 2xx status code
|
|
func (o *AdminCronRunNoContent) IsSuccess() bool {
|
|
return true
|
|
}
|
|
|
|
// IsRedirect returns true when this admin cron run no content response has a 3xx status code
|
|
func (o *AdminCronRunNoContent) IsRedirect() bool {
|
|
return false
|
|
}
|
|
|
|
// IsClientError returns true when this admin cron run no content response has a 4xx status code
|
|
func (o *AdminCronRunNoContent) IsClientError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsServerError returns true when this admin cron run no content response has a 5xx status code
|
|
func (o *AdminCronRunNoContent) IsServerError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsCode returns true when this admin cron run no content response a status code equal to that given
|
|
func (o *AdminCronRunNoContent) IsCode(code int) bool {
|
|
return code == 204
|
|
}
|
|
|
|
// Code gets the status code for the admin cron run no content response
|
|
func (o *AdminCronRunNoContent) Code() int {
|
|
return 204
|
|
}
|
|
|
|
func (o *AdminCronRunNoContent) Error() string {
|
|
return fmt.Sprintf("[POST /admin/cron/{task}][%d] adminCronRunNoContent", 204)
|
|
}
|
|
|
|
func (o *AdminCronRunNoContent) String() string {
|
|
return fmt.Sprintf("[POST /admin/cron/{task}][%d] adminCronRunNoContent", 204)
|
|
}
|
|
|
|
func (o *AdminCronRunNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
|
|
|
return nil
|
|
}
|
|
|
|
// NewAdminCronRunNotFound creates a AdminCronRunNotFound with default headers values
|
|
func NewAdminCronRunNotFound() *AdminCronRunNotFound {
|
|
return &AdminCronRunNotFound{}
|
|
}
|
|
|
|
/*
|
|
AdminCronRunNotFound describes a response with status code 404, with default header values.
|
|
|
|
APINotFound is a not found empty response
|
|
*/
|
|
type AdminCronRunNotFound struct {
|
|
}
|
|
|
|
// IsSuccess returns true when this admin cron run not found response has a 2xx status code
|
|
func (o *AdminCronRunNotFound) IsSuccess() bool {
|
|
return false
|
|
}
|
|
|
|
// IsRedirect returns true when this admin cron run not found response has a 3xx status code
|
|
func (o *AdminCronRunNotFound) IsRedirect() bool {
|
|
return false
|
|
}
|
|
|
|
// IsClientError returns true when this admin cron run not found response has a 4xx status code
|
|
func (o *AdminCronRunNotFound) IsClientError() bool {
|
|
return true
|
|
}
|
|
|
|
// IsServerError returns true when this admin cron run not found response has a 5xx status code
|
|
func (o *AdminCronRunNotFound) IsServerError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsCode returns true when this admin cron run not found response a status code equal to that given
|
|
func (o *AdminCronRunNotFound) IsCode(code int) bool {
|
|
return code == 404
|
|
}
|
|
|
|
// Code gets the status code for the admin cron run not found response
|
|
func (o *AdminCronRunNotFound) Code() int {
|
|
return 404
|
|
}
|
|
|
|
func (o *AdminCronRunNotFound) Error() string {
|
|
return fmt.Sprintf("[POST /admin/cron/{task}][%d] adminCronRunNotFound", 404)
|
|
}
|
|
|
|
func (o *AdminCronRunNotFound) String() string {
|
|
return fmt.Sprintf("[POST /admin/cron/{task}][%d] adminCronRunNotFound", 404)
|
|
}
|
|
|
|
func (o *AdminCronRunNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
|
|
|
return nil
|
|
}
|