mirror of https://github.com/vernonkeenan/lib
parent
81977c9efb
commit
b3ea30b2bf
|
@ -42,18 +42,6 @@ type ClientService interface {
|
|||
|
||||
DatabasesOptions(params *DatabasesOptionsParams, opts ...ClientOption) (*DatabasesOptionsOK, error)
|
||||
|
||||
IngestOptions(params *IngestOptionsParams, opts ...ClientOption) (*IngestOptionsOK, error)
|
||||
|
||||
IngestsOptions(params *IngestsOptionsParams, opts ...ClientOption) (*IngestsOptionsOK, error)
|
||||
|
||||
JobOptions(params *JobOptionsParams, opts ...ClientOption) (*JobOptionsOK, error)
|
||||
|
||||
JobsOptions(params *JobsOptionsParams, opts ...ClientOption) (*JobsOptionsOK, error)
|
||||
|
||||
ServiceOptions(params *ServiceOptionsParams, opts ...ClientOption) (*ServiceOptionsOK, error)
|
||||
|
||||
ServicesOptions(params *ServicesOptionsParams, opts ...ClientOption) (*ServicesOptionsOK, error)
|
||||
|
||||
TemplateOptions(params *TemplateOptionsParams, opts ...ClientOption) (*TemplateOptionsOK, error)
|
||||
|
||||
TemplatesOptions(params *TemplatesOptionsParams, opts ...ClientOption) (*TemplatesOptionsOK, error)
|
||||
|
@ -221,234 +209,6 @@ func (a *Client) DatabasesOptions(params *DatabasesOptionsParams, opts ...Client
|
|||
panic(msg)
|
||||
}
|
||||
|
||||
/*
|
||||
IngestOptions CORS support
|
||||
*/
|
||||
func (a *Client) IngestOptions(params *IngestOptionsParams, opts ...ClientOption) (*IngestOptionsOK, error) {
|
||||
// TODO: Validate the params before sending
|
||||
if params == nil {
|
||||
params = NewIngestOptionsParams()
|
||||
}
|
||||
op := &runtime.ClientOperation{
|
||||
ID: "ingestOptions",
|
||||
Method: "OPTIONS",
|
||||
PathPattern: "/ingests/observable",
|
||||
ProducesMediaTypes: []string{"application/json"},
|
||||
ConsumesMediaTypes: []string{"application/json"},
|
||||
Schemes: []string{"http"},
|
||||
Params: params,
|
||||
Reader: &IngestOptionsReader{formats: a.formats},
|
||||
Context: params.Context,
|
||||
Client: params.HTTPClient,
|
||||
}
|
||||
for _, opt := range opts {
|
||||
opt(op)
|
||||
}
|
||||
|
||||
result, err := a.transport.Submit(op)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
success, ok := result.(*IngestOptionsOK)
|
||||
if ok {
|
||||
return success, nil
|
||||
}
|
||||
// unexpected success response
|
||||
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
||||
msg := fmt.Sprintf("unexpected success response for ingestOptions: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||||
panic(msg)
|
||||
}
|
||||
|
||||
/*
|
||||
IngestsOptions CORS support
|
||||
*/
|
||||
func (a *Client) IngestsOptions(params *IngestsOptionsParams, opts ...ClientOption) (*IngestsOptionsOK, error) {
|
||||
// TODO: Validate the params before sending
|
||||
if params == nil {
|
||||
params = NewIngestsOptionsParams()
|
||||
}
|
||||
op := &runtime.ClientOperation{
|
||||
ID: "ingestsOptions",
|
||||
Method: "OPTIONS",
|
||||
PathPattern: "/ingests",
|
||||
ProducesMediaTypes: []string{"application/json"},
|
||||
ConsumesMediaTypes: []string{"application/json"},
|
||||
Schemes: []string{"http"},
|
||||
Params: params,
|
||||
Reader: &IngestsOptionsReader{formats: a.formats},
|
||||
Context: params.Context,
|
||||
Client: params.HTTPClient,
|
||||
}
|
||||
for _, opt := range opts {
|
||||
opt(op)
|
||||
}
|
||||
|
||||
result, err := a.transport.Submit(op)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
success, ok := result.(*IngestsOptionsOK)
|
||||
if ok {
|
||||
return success, nil
|
||||
}
|
||||
// unexpected success response
|
||||
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
||||
msg := fmt.Sprintf("unexpected success response for ingestsOptions: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||||
panic(msg)
|
||||
}
|
||||
|
||||
/*
|
||||
JobOptions CORS support
|
||||
*/
|
||||
func (a *Client) JobOptions(params *JobOptionsParams, opts ...ClientOption) (*JobOptionsOK, error) {
|
||||
// TODO: Validate the params before sending
|
||||
if params == nil {
|
||||
params = NewJobOptionsParams()
|
||||
}
|
||||
op := &runtime.ClientOperation{
|
||||
ID: "jobOptions",
|
||||
Method: "OPTIONS",
|
||||
PathPattern: "/jobs/observable",
|
||||
ProducesMediaTypes: []string{"application/json"},
|
||||
ConsumesMediaTypes: []string{"application/json"},
|
||||
Schemes: []string{"http"},
|
||||
Params: params,
|
||||
Reader: &JobOptionsReader{formats: a.formats},
|
||||
Context: params.Context,
|
||||
Client: params.HTTPClient,
|
||||
}
|
||||
for _, opt := range opts {
|
||||
opt(op)
|
||||
}
|
||||
|
||||
result, err := a.transport.Submit(op)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
success, ok := result.(*JobOptionsOK)
|
||||
if ok {
|
||||
return success, nil
|
||||
}
|
||||
// unexpected success response
|
||||
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
||||
msg := fmt.Sprintf("unexpected success response for jobOptions: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||||
panic(msg)
|
||||
}
|
||||
|
||||
/*
|
||||
JobsOptions CORS support
|
||||
*/
|
||||
func (a *Client) JobsOptions(params *JobsOptionsParams, opts ...ClientOption) (*JobsOptionsOK, error) {
|
||||
// TODO: Validate the params before sending
|
||||
if params == nil {
|
||||
params = NewJobsOptionsParams()
|
||||
}
|
||||
op := &runtime.ClientOperation{
|
||||
ID: "jobsOptions",
|
||||
Method: "OPTIONS",
|
||||
PathPattern: "/jobs",
|
||||
ProducesMediaTypes: []string{"application/json"},
|
||||
ConsumesMediaTypes: []string{"application/json"},
|
||||
Schemes: []string{"http"},
|
||||
Params: params,
|
||||
Reader: &JobsOptionsReader{formats: a.formats},
|
||||
Context: params.Context,
|
||||
Client: params.HTTPClient,
|
||||
}
|
||||
for _, opt := range opts {
|
||||
opt(op)
|
||||
}
|
||||
|
||||
result, err := a.transport.Submit(op)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
success, ok := result.(*JobsOptionsOK)
|
||||
if ok {
|
||||
return success, nil
|
||||
}
|
||||
// unexpected success response
|
||||
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
||||
msg := fmt.Sprintf("unexpected success response for jobsOptions: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||||
panic(msg)
|
||||
}
|
||||
|
||||
/*
|
||||
ServiceOptions CORS support
|
||||
*/
|
||||
func (a *Client) ServiceOptions(params *ServiceOptionsParams, opts ...ClientOption) (*ServiceOptionsOK, error) {
|
||||
// TODO: Validate the params before sending
|
||||
if params == nil {
|
||||
params = NewServiceOptionsParams()
|
||||
}
|
||||
op := &runtime.ClientOperation{
|
||||
ID: "serviceOptions",
|
||||
Method: "OPTIONS",
|
||||
PathPattern: "/services/observable",
|
||||
ProducesMediaTypes: []string{"application/json"},
|
||||
ConsumesMediaTypes: []string{"application/json"},
|
||||
Schemes: []string{"http"},
|
||||
Params: params,
|
||||
Reader: &ServiceOptionsReader{formats: a.formats},
|
||||
Context: params.Context,
|
||||
Client: params.HTTPClient,
|
||||
}
|
||||
for _, opt := range opts {
|
||||
opt(op)
|
||||
}
|
||||
|
||||
result, err := a.transport.Submit(op)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
success, ok := result.(*ServiceOptionsOK)
|
||||
if ok {
|
||||
return success, nil
|
||||
}
|
||||
// unexpected success response
|
||||
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
||||
msg := fmt.Sprintf("unexpected success response for serviceOptions: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||||
panic(msg)
|
||||
}
|
||||
|
||||
/*
|
||||
ServicesOptions CORS support
|
||||
*/
|
||||
func (a *Client) ServicesOptions(params *ServicesOptionsParams, opts ...ClientOption) (*ServicesOptionsOK, error) {
|
||||
// TODO: Validate the params before sending
|
||||
if params == nil {
|
||||
params = NewServicesOptionsParams()
|
||||
}
|
||||
op := &runtime.ClientOperation{
|
||||
ID: "servicesOptions",
|
||||
Method: "OPTIONS",
|
||||
PathPattern: "/services",
|
||||
ProducesMediaTypes: []string{"application/json"},
|
||||
ConsumesMediaTypes: []string{"application/json"},
|
||||
Schemes: []string{"http"},
|
||||
Params: params,
|
||||
Reader: &ServicesOptionsReader{formats: a.formats},
|
||||
Context: params.Context,
|
||||
Client: params.HTTPClient,
|
||||
}
|
||||
for _, opt := range opts {
|
||||
opt(op)
|
||||
}
|
||||
|
||||
result, err := a.transport.Submit(op)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
success, ok := result.(*ServicesOptionsOK)
|
||||
if ok {
|
||||
return success, nil
|
||||
}
|
||||
// unexpected success response
|
||||
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
||||
msg := fmt.Sprintf("unexpected success response for servicesOptions: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||||
panic(msg)
|
||||
}
|
||||
|
||||
/*
|
||||
TemplateOptions CORS support
|
||||
*/
|
||||
|
|
|
@ -1,130 +0,0 @@
|
|||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
// (c) 2012-2020 by Taxnexus, Inc.
|
||||
// All rights reserved worldwide.
|
||||
// Proprietary product; unlicensed use is not allowed
|
||||
|
||||
package cors
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
// Editing this file might prove futile when you re-run the swagger generate command
|
||||
|
||||
import (
|
||||
"context"
|
||||
"net/http"
|
||||
"time"
|
||||
|
||||
"github.com/go-openapi/errors"
|
||||
"github.com/go-openapi/runtime"
|
||||
cr "github.com/go-openapi/runtime/client"
|
||||
"github.com/go-openapi/strfmt"
|
||||
)
|
||||
|
||||
// NewIngestOptionsParams creates a new IngestOptionsParams object,
|
||||
// with the default timeout for this client.
|
||||
//
|
||||
// Default values are not hydrated, since defaults are normally applied by the API server side.
|
||||
//
|
||||
// To enforce default values in parameter, use SetDefaults or WithDefaults.
|
||||
func NewIngestOptionsParams() *IngestOptionsParams {
|
||||
return &IngestOptionsParams{
|
||||
timeout: cr.DefaultTimeout,
|
||||
}
|
||||
}
|
||||
|
||||
// NewIngestOptionsParamsWithTimeout creates a new IngestOptionsParams object
|
||||
// with the ability to set a timeout on a request.
|
||||
func NewIngestOptionsParamsWithTimeout(timeout time.Duration) *IngestOptionsParams {
|
||||
return &IngestOptionsParams{
|
||||
timeout: timeout,
|
||||
}
|
||||
}
|
||||
|
||||
// NewIngestOptionsParamsWithContext creates a new IngestOptionsParams object
|
||||
// with the ability to set a context for a request.
|
||||
func NewIngestOptionsParamsWithContext(ctx context.Context) *IngestOptionsParams {
|
||||
return &IngestOptionsParams{
|
||||
Context: ctx,
|
||||
}
|
||||
}
|
||||
|
||||
// NewIngestOptionsParamsWithHTTPClient creates a new IngestOptionsParams object
|
||||
// with the ability to set a custom HTTPClient for a request.
|
||||
func NewIngestOptionsParamsWithHTTPClient(client *http.Client) *IngestOptionsParams {
|
||||
return &IngestOptionsParams{
|
||||
HTTPClient: client,
|
||||
}
|
||||
}
|
||||
|
||||
/* IngestOptionsParams contains all the parameters to send to the API endpoint
|
||||
for the ingest options operation.
|
||||
|
||||
Typically these are written to a http.Request.
|
||||
*/
|
||||
type IngestOptionsParams struct {
|
||||
timeout time.Duration
|
||||
Context context.Context
|
||||
HTTPClient *http.Client
|
||||
}
|
||||
|
||||
// WithDefaults hydrates default values in the ingest options params (not the query body).
|
||||
//
|
||||
// All values with no default are reset to their zero value.
|
||||
func (o *IngestOptionsParams) WithDefaults() *IngestOptionsParams {
|
||||
o.SetDefaults()
|
||||
return o
|
||||
}
|
||||
|
||||
// SetDefaults hydrates default values in the ingest options params (not the query body).
|
||||
//
|
||||
// All values with no default are reset to their zero value.
|
||||
func (o *IngestOptionsParams) SetDefaults() {
|
||||
// no default values defined for this parameter
|
||||
}
|
||||
|
||||
// WithTimeout adds the timeout to the ingest options params
|
||||
func (o *IngestOptionsParams) WithTimeout(timeout time.Duration) *IngestOptionsParams {
|
||||
o.SetTimeout(timeout)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetTimeout adds the timeout to the ingest options params
|
||||
func (o *IngestOptionsParams) SetTimeout(timeout time.Duration) {
|
||||
o.timeout = timeout
|
||||
}
|
||||
|
||||
// WithContext adds the context to the ingest options params
|
||||
func (o *IngestOptionsParams) WithContext(ctx context.Context) *IngestOptionsParams {
|
||||
o.SetContext(ctx)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetContext adds the context to the ingest options params
|
||||
func (o *IngestOptionsParams) SetContext(ctx context.Context) {
|
||||
o.Context = ctx
|
||||
}
|
||||
|
||||
// WithHTTPClient adds the HTTPClient to the ingest options params
|
||||
func (o *IngestOptionsParams) WithHTTPClient(client *http.Client) *IngestOptionsParams {
|
||||
o.SetHTTPClient(client)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetHTTPClient adds the HTTPClient to the ingest options params
|
||||
func (o *IngestOptionsParams) SetHTTPClient(client *http.Client) {
|
||||
o.HTTPClient = client
|
||||
}
|
||||
|
||||
// WriteToRequest writes these params to a swagger request
|
||||
func (o *IngestOptionsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
|
||||
|
||||
if err := r.SetTimeout(o.timeout); err != nil {
|
||||
return err
|
||||
}
|
||||
var res []error
|
||||
|
||||
if len(res) > 0 {
|
||||
return errors.CompositeValidationError(res...)
|
||||
}
|
||||
return nil
|
||||
}
|
|
@ -1,113 +0,0 @@
|
|||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
// (c) 2012-2020 by Taxnexus, Inc.
|
||||
// All rights reserved worldwide.
|
||||
// Proprietary product; unlicensed use is not allowed
|
||||
|
||||
package cors
|
||||
|
||||
// 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"
|
||||
)
|
||||
|
||||
// IngestOptionsReader is a Reader for the IngestOptions structure.
|
||||
type IngestOptionsReader struct {
|
||||
formats strfmt.Registry
|
||||
}
|
||||
|
||||
// ReadResponse reads a server response into the received o.
|
||||
func (o *IngestOptionsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
|
||||
switch response.Code() {
|
||||
case 200:
|
||||
result := NewIngestOptionsOK()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return result, nil
|
||||
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())
|
||||
}
|
||||
}
|
||||
|
||||
// NewIngestOptionsOK creates a IngestOptionsOK with default headers values
|
||||
func NewIngestOptionsOK() *IngestOptionsOK {
|
||||
return &IngestOptionsOK{}
|
||||
}
|
||||
|
||||
/* IngestOptionsOK describes a response with status code 200, with default header values.
|
||||
|
||||
CORS OPTIONS response
|
||||
*/
|
||||
type IngestOptionsOK struct {
|
||||
AccessControlAllowCredentials string
|
||||
AccessControlAllowHeaders string
|
||||
AccessControlAllowMethods string
|
||||
AccessControlAllowOrigin string
|
||||
AccessControlExposeHeaders string
|
||||
AccessControlMaxAge string
|
||||
CacheControl string
|
||||
}
|
||||
|
||||
func (o *IngestOptionsOK) Error() string {
|
||||
return fmt.Sprintf("[OPTIONS /ingests/observable][%d] ingestOptionsOK ", 200)
|
||||
}
|
||||
|
||||
func (o *IngestOptionsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
// hydrates response header Access-Control-Allow-Credentials
|
||||
hdrAccessControlAllowCredentials := response.GetHeader("Access-Control-Allow-Credentials")
|
||||
|
||||
if hdrAccessControlAllowCredentials != "" {
|
||||
o.AccessControlAllowCredentials = hdrAccessControlAllowCredentials
|
||||
}
|
||||
|
||||
// hydrates response header Access-Control-Allow-Headers
|
||||
hdrAccessControlAllowHeaders := response.GetHeader("Access-Control-Allow-Headers")
|
||||
|
||||
if hdrAccessControlAllowHeaders != "" {
|
||||
o.AccessControlAllowHeaders = hdrAccessControlAllowHeaders
|
||||
}
|
||||
|
||||
// hydrates response header Access-Control-Allow-Methods
|
||||
hdrAccessControlAllowMethods := response.GetHeader("Access-Control-Allow-Methods")
|
||||
|
||||
if hdrAccessControlAllowMethods != "" {
|
||||
o.AccessControlAllowMethods = hdrAccessControlAllowMethods
|
||||
}
|
||||
|
||||
// hydrates response header Access-Control-Allow-Origin
|
||||
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
|
||||
|
||||
if hdrAccessControlAllowOrigin != "" {
|
||||
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
|
||||
}
|
||||
|
||||
// hydrates response header Access-Control-Expose-Headers
|
||||
hdrAccessControlExposeHeaders := response.GetHeader("Access-Control-Expose-Headers")
|
||||
|
||||
if hdrAccessControlExposeHeaders != "" {
|
||||
o.AccessControlExposeHeaders = hdrAccessControlExposeHeaders
|
||||
}
|
||||
|
||||
// hydrates response header Access-Control-Max-Age
|
||||
hdrAccessControlMaxAge := response.GetHeader("Access-Control-Max-Age")
|
||||
|
||||
if hdrAccessControlMaxAge != "" {
|
||||
o.AccessControlMaxAge = hdrAccessControlMaxAge
|
||||
}
|
||||
|
||||
// hydrates response header Cache-Control
|
||||
hdrCacheControl := response.GetHeader("Cache-Control")
|
||||
|
||||
if hdrCacheControl != "" {
|
||||
o.CacheControl = hdrCacheControl
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
|
@ -1,130 +0,0 @@
|
|||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
// (c) 2012-2020 by Taxnexus, Inc.
|
||||
// All rights reserved worldwide.
|
||||
// Proprietary product; unlicensed use is not allowed
|
||||
|
||||
package cors
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
// Editing this file might prove futile when you re-run the swagger generate command
|
||||
|
||||
import (
|
||||
"context"
|
||||
"net/http"
|
||||
"time"
|
||||
|
||||
"github.com/go-openapi/errors"
|
||||
"github.com/go-openapi/runtime"
|
||||
cr "github.com/go-openapi/runtime/client"
|
||||
"github.com/go-openapi/strfmt"
|
||||
)
|
||||
|
||||
// NewIngestsOptionsParams creates a new IngestsOptionsParams object,
|
||||
// with the default timeout for this client.
|
||||
//
|
||||
// Default values are not hydrated, since defaults are normally applied by the API server side.
|
||||
//
|
||||
// To enforce default values in parameter, use SetDefaults or WithDefaults.
|
||||
func NewIngestsOptionsParams() *IngestsOptionsParams {
|
||||
return &IngestsOptionsParams{
|
||||
timeout: cr.DefaultTimeout,
|
||||
}
|
||||
}
|
||||
|
||||
// NewIngestsOptionsParamsWithTimeout creates a new IngestsOptionsParams object
|
||||
// with the ability to set a timeout on a request.
|
||||
func NewIngestsOptionsParamsWithTimeout(timeout time.Duration) *IngestsOptionsParams {
|
||||
return &IngestsOptionsParams{
|
||||
timeout: timeout,
|
||||
}
|
||||
}
|
||||
|
||||
// NewIngestsOptionsParamsWithContext creates a new IngestsOptionsParams object
|
||||
// with the ability to set a context for a request.
|
||||
func NewIngestsOptionsParamsWithContext(ctx context.Context) *IngestsOptionsParams {
|
||||
return &IngestsOptionsParams{
|
||||
Context: ctx,
|
||||
}
|
||||
}
|
||||
|
||||
// NewIngestsOptionsParamsWithHTTPClient creates a new IngestsOptionsParams object
|
||||
// with the ability to set a custom HTTPClient for a request.
|
||||
func NewIngestsOptionsParamsWithHTTPClient(client *http.Client) *IngestsOptionsParams {
|
||||
return &IngestsOptionsParams{
|
||||
HTTPClient: client,
|
||||
}
|
||||
}
|
||||
|
||||
/* IngestsOptionsParams contains all the parameters to send to the API endpoint
|
||||
for the ingests options operation.
|
||||
|
||||
Typically these are written to a http.Request.
|
||||
*/
|
||||
type IngestsOptionsParams struct {
|
||||
timeout time.Duration
|
||||
Context context.Context
|
||||
HTTPClient *http.Client
|
||||
}
|
||||
|
||||
// WithDefaults hydrates default values in the ingests options params (not the query body).
|
||||
//
|
||||
// All values with no default are reset to their zero value.
|
||||
func (o *IngestsOptionsParams) WithDefaults() *IngestsOptionsParams {
|
||||
o.SetDefaults()
|
||||
return o
|
||||
}
|
||||
|
||||
// SetDefaults hydrates default values in the ingests options params (not the query body).
|
||||
//
|
||||
// All values with no default are reset to their zero value.
|
||||
func (o *IngestsOptionsParams) SetDefaults() {
|
||||
// no default values defined for this parameter
|
||||
}
|
||||
|
||||
// WithTimeout adds the timeout to the ingests options params
|
||||
func (o *IngestsOptionsParams) WithTimeout(timeout time.Duration) *IngestsOptionsParams {
|
||||
o.SetTimeout(timeout)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetTimeout adds the timeout to the ingests options params
|
||||
func (o *IngestsOptionsParams) SetTimeout(timeout time.Duration) {
|
||||
o.timeout = timeout
|
||||
}
|
||||
|
||||
// WithContext adds the context to the ingests options params
|
||||
func (o *IngestsOptionsParams) WithContext(ctx context.Context) *IngestsOptionsParams {
|
||||
o.SetContext(ctx)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetContext adds the context to the ingests options params
|
||||
func (o *IngestsOptionsParams) SetContext(ctx context.Context) {
|
||||
o.Context = ctx
|
||||
}
|
||||
|
||||
// WithHTTPClient adds the HTTPClient to the ingests options params
|
||||
func (o *IngestsOptionsParams) WithHTTPClient(client *http.Client) *IngestsOptionsParams {
|
||||
o.SetHTTPClient(client)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetHTTPClient adds the HTTPClient to the ingests options params
|
||||
func (o *IngestsOptionsParams) SetHTTPClient(client *http.Client) {
|
||||
o.HTTPClient = client
|
||||
}
|
||||
|
||||
// WriteToRequest writes these params to a swagger request
|
||||
func (o *IngestsOptionsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
|
||||
|
||||
if err := r.SetTimeout(o.timeout); err != nil {
|
||||
return err
|
||||
}
|
||||
var res []error
|
||||
|
||||
if len(res) > 0 {
|
||||
return errors.CompositeValidationError(res...)
|
||||
}
|
||||
return nil
|
||||
}
|
|
@ -1,113 +0,0 @@
|
|||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
// (c) 2012-2020 by Taxnexus, Inc.
|
||||
// All rights reserved worldwide.
|
||||
// Proprietary product; unlicensed use is not allowed
|
||||
|
||||
package cors
|
||||
|
||||
// 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"
|
||||
)
|
||||
|
||||
// IngestsOptionsReader is a Reader for the IngestsOptions structure.
|
||||
type IngestsOptionsReader struct {
|
||||
formats strfmt.Registry
|
||||
}
|
||||
|
||||
// ReadResponse reads a server response into the received o.
|
||||
func (o *IngestsOptionsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
|
||||
switch response.Code() {
|
||||
case 200:
|
||||
result := NewIngestsOptionsOK()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return result, nil
|
||||
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())
|
||||
}
|
||||
}
|
||||
|
||||
// NewIngestsOptionsOK creates a IngestsOptionsOK with default headers values
|
||||
func NewIngestsOptionsOK() *IngestsOptionsOK {
|
||||
return &IngestsOptionsOK{}
|
||||
}
|
||||
|
||||
/* IngestsOptionsOK describes a response with status code 200, with default header values.
|
||||
|
||||
CORS OPTIONS response
|
||||
*/
|
||||
type IngestsOptionsOK struct {
|
||||
AccessControlAllowCredentials string
|
||||
AccessControlAllowHeaders string
|
||||
AccessControlAllowMethods string
|
||||
AccessControlAllowOrigin string
|
||||
AccessControlExposeHeaders string
|
||||
AccessControlMaxAge string
|
||||
CacheControl string
|
||||
}
|
||||
|
||||
func (o *IngestsOptionsOK) Error() string {
|
||||
return fmt.Sprintf("[OPTIONS /ingests][%d] ingestsOptionsOK ", 200)
|
||||
}
|
||||
|
||||
func (o *IngestsOptionsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
// hydrates response header Access-Control-Allow-Credentials
|
||||
hdrAccessControlAllowCredentials := response.GetHeader("Access-Control-Allow-Credentials")
|
||||
|
||||
if hdrAccessControlAllowCredentials != "" {
|
||||
o.AccessControlAllowCredentials = hdrAccessControlAllowCredentials
|
||||
}
|
||||
|
||||
// hydrates response header Access-Control-Allow-Headers
|
||||
hdrAccessControlAllowHeaders := response.GetHeader("Access-Control-Allow-Headers")
|
||||
|
||||
if hdrAccessControlAllowHeaders != "" {
|
||||
o.AccessControlAllowHeaders = hdrAccessControlAllowHeaders
|
||||
}
|
||||
|
||||
// hydrates response header Access-Control-Allow-Methods
|
||||
hdrAccessControlAllowMethods := response.GetHeader("Access-Control-Allow-Methods")
|
||||
|
||||
if hdrAccessControlAllowMethods != "" {
|
||||
o.AccessControlAllowMethods = hdrAccessControlAllowMethods
|
||||
}
|
||||
|
||||
// hydrates response header Access-Control-Allow-Origin
|
||||
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
|
||||
|
||||
if hdrAccessControlAllowOrigin != "" {
|
||||
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
|
||||
}
|
||||
|
||||
// hydrates response header Access-Control-Expose-Headers
|
||||
hdrAccessControlExposeHeaders := response.GetHeader("Access-Control-Expose-Headers")
|
||||
|
||||
if hdrAccessControlExposeHeaders != "" {
|
||||
o.AccessControlExposeHeaders = hdrAccessControlExposeHeaders
|
||||
}
|
||||
|
||||
// hydrates response header Access-Control-Max-Age
|
||||
hdrAccessControlMaxAge := response.GetHeader("Access-Control-Max-Age")
|
||||
|
||||
if hdrAccessControlMaxAge != "" {
|
||||
o.AccessControlMaxAge = hdrAccessControlMaxAge
|
||||
}
|
||||
|
||||
// hydrates response header Cache-Control
|
||||
hdrCacheControl := response.GetHeader("Cache-Control")
|
||||
|
||||
if hdrCacheControl != "" {
|
||||
o.CacheControl = hdrCacheControl
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
|
@ -1,130 +0,0 @@
|
|||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
// (c) 2012-2020 by Taxnexus, Inc.
|
||||
// All rights reserved worldwide.
|
||||
// Proprietary product; unlicensed use is not allowed
|
||||
|
||||
package cors
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
// Editing this file might prove futile when you re-run the swagger generate command
|
||||
|
||||
import (
|
||||
"context"
|
||||
"net/http"
|
||||
"time"
|
||||
|
||||
"github.com/go-openapi/errors"
|
||||
"github.com/go-openapi/runtime"
|
||||
cr "github.com/go-openapi/runtime/client"
|
||||
"github.com/go-openapi/strfmt"
|
||||
)
|
||||
|
||||
// NewJobOptionsParams creates a new JobOptionsParams object,
|
||||
// with the default timeout for this client.
|
||||
//
|
||||
// Default values are not hydrated, since defaults are normally applied by the API server side.
|
||||
//
|
||||
// To enforce default values in parameter, use SetDefaults or WithDefaults.
|
||||
func NewJobOptionsParams() *JobOptionsParams {
|
||||
return &JobOptionsParams{
|
||||
timeout: cr.DefaultTimeout,
|
||||
}
|
||||
}
|
||||
|
||||
// NewJobOptionsParamsWithTimeout creates a new JobOptionsParams object
|
||||
// with the ability to set a timeout on a request.
|
||||
func NewJobOptionsParamsWithTimeout(timeout time.Duration) *JobOptionsParams {
|
||||
return &JobOptionsParams{
|
||||
timeout: timeout,
|
||||
}
|
||||
}
|
||||
|
||||
// NewJobOptionsParamsWithContext creates a new JobOptionsParams object
|
||||
// with the ability to set a context for a request.
|
||||
func NewJobOptionsParamsWithContext(ctx context.Context) *JobOptionsParams {
|
||||
return &JobOptionsParams{
|
||||
Context: ctx,
|
||||
}
|
||||
}
|
||||
|
||||
// NewJobOptionsParamsWithHTTPClient creates a new JobOptionsParams object
|
||||
// with the ability to set a custom HTTPClient for a request.
|
||||
func NewJobOptionsParamsWithHTTPClient(client *http.Client) *JobOptionsParams {
|
||||
return &JobOptionsParams{
|
||||
HTTPClient: client,
|
||||
}
|
||||
}
|
||||
|
||||
/* JobOptionsParams contains all the parameters to send to the API endpoint
|
||||
for the job options operation.
|
||||
|
||||
Typically these are written to a http.Request.
|
||||
*/
|
||||
type JobOptionsParams struct {
|
||||
timeout time.Duration
|
||||
Context context.Context
|
||||
HTTPClient *http.Client
|
||||
}
|
||||
|
||||
// WithDefaults hydrates default values in the job options params (not the query body).
|
||||
//
|
||||
// All values with no default are reset to their zero value.
|
||||
func (o *JobOptionsParams) WithDefaults() *JobOptionsParams {
|
||||
o.SetDefaults()
|
||||
return o
|
||||
}
|
||||
|
||||
// SetDefaults hydrates default values in the job options params (not the query body).
|
||||
//
|
||||
// All values with no default are reset to their zero value.
|
||||
func (o *JobOptionsParams) SetDefaults() {
|
||||
// no default values defined for this parameter
|
||||
}
|
||||
|
||||
// WithTimeout adds the timeout to the job options params
|
||||
func (o *JobOptionsParams) WithTimeout(timeout time.Duration) *JobOptionsParams {
|
||||
o.SetTimeout(timeout)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetTimeout adds the timeout to the job options params
|
||||
func (o *JobOptionsParams) SetTimeout(timeout time.Duration) {
|
||||
o.timeout = timeout
|
||||
}
|
||||
|
||||
// WithContext adds the context to the job options params
|
||||
func (o *JobOptionsParams) WithContext(ctx context.Context) *JobOptionsParams {
|
||||
o.SetContext(ctx)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetContext adds the context to the job options params
|
||||
func (o *JobOptionsParams) SetContext(ctx context.Context) {
|
||||
o.Context = ctx
|
||||
}
|
||||
|
||||
// WithHTTPClient adds the HTTPClient to the job options params
|
||||
func (o *JobOptionsParams) WithHTTPClient(client *http.Client) *JobOptionsParams {
|
||||
o.SetHTTPClient(client)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetHTTPClient adds the HTTPClient to the job options params
|
||||
func (o *JobOptionsParams) SetHTTPClient(client *http.Client) {
|
||||
o.HTTPClient = client
|
||||
}
|
||||
|
||||
// WriteToRequest writes these params to a swagger request
|
||||
func (o *JobOptionsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
|
||||
|
||||
if err := r.SetTimeout(o.timeout); err != nil {
|
||||
return err
|
||||
}
|
||||
var res []error
|
||||
|
||||
if len(res) > 0 {
|
||||
return errors.CompositeValidationError(res...)
|
||||
}
|
||||
return nil
|
||||
}
|
|
@ -1,113 +0,0 @@
|
|||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
// (c) 2012-2020 by Taxnexus, Inc.
|
||||
// All rights reserved worldwide.
|
||||
// Proprietary product; unlicensed use is not allowed
|
||||
|
||||
package cors
|
||||
|
||||
// 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"
|
||||
)
|
||||
|
||||
// JobOptionsReader is a Reader for the JobOptions structure.
|
||||
type JobOptionsReader struct {
|
||||
formats strfmt.Registry
|
||||
}
|
||||
|
||||
// ReadResponse reads a server response into the received o.
|
||||
func (o *JobOptionsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
|
||||
switch response.Code() {
|
||||
case 200:
|
||||
result := NewJobOptionsOK()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return result, nil
|
||||
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())
|
||||
}
|
||||
}
|
||||
|
||||
// NewJobOptionsOK creates a JobOptionsOK with default headers values
|
||||
func NewJobOptionsOK() *JobOptionsOK {
|
||||
return &JobOptionsOK{}
|
||||
}
|
||||
|
||||
/* JobOptionsOK describes a response with status code 200, with default header values.
|
||||
|
||||
CORS OPTIONS response
|
||||
*/
|
||||
type JobOptionsOK struct {
|
||||
AccessControlAllowCredentials string
|
||||
AccessControlAllowHeaders string
|
||||
AccessControlAllowMethods string
|
||||
AccessControlAllowOrigin string
|
||||
AccessControlExposeHeaders string
|
||||
AccessControlMaxAge string
|
||||
CacheControl string
|
||||
}
|
||||
|
||||
func (o *JobOptionsOK) Error() string {
|
||||
return fmt.Sprintf("[OPTIONS /jobs/observable][%d] jobOptionsOK ", 200)
|
||||
}
|
||||
|
||||
func (o *JobOptionsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
// hydrates response header Access-Control-Allow-Credentials
|
||||
hdrAccessControlAllowCredentials := response.GetHeader("Access-Control-Allow-Credentials")
|
||||
|
||||
if hdrAccessControlAllowCredentials != "" {
|
||||
o.AccessControlAllowCredentials = hdrAccessControlAllowCredentials
|
||||
}
|
||||
|
||||
// hydrates response header Access-Control-Allow-Headers
|
||||
hdrAccessControlAllowHeaders := response.GetHeader("Access-Control-Allow-Headers")
|
||||
|
||||
if hdrAccessControlAllowHeaders != "" {
|
||||
o.AccessControlAllowHeaders = hdrAccessControlAllowHeaders
|
||||
}
|
||||
|
||||
// hydrates response header Access-Control-Allow-Methods
|
||||
hdrAccessControlAllowMethods := response.GetHeader("Access-Control-Allow-Methods")
|
||||
|
||||
if hdrAccessControlAllowMethods != "" {
|
||||
o.AccessControlAllowMethods = hdrAccessControlAllowMethods
|
||||
}
|
||||
|
||||
// hydrates response header Access-Control-Allow-Origin
|
||||
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
|
||||
|
||||
if hdrAccessControlAllowOrigin != "" {
|
||||
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
|
||||
}
|
||||
|
||||
// hydrates response header Access-Control-Expose-Headers
|
||||
hdrAccessControlExposeHeaders := response.GetHeader("Access-Control-Expose-Headers")
|
||||
|
||||
if hdrAccessControlExposeHeaders != "" {
|
||||
o.AccessControlExposeHeaders = hdrAccessControlExposeHeaders
|
||||
}
|
||||
|
||||
// hydrates response header Access-Control-Max-Age
|
||||
hdrAccessControlMaxAge := response.GetHeader("Access-Control-Max-Age")
|
||||
|
||||
if hdrAccessControlMaxAge != "" {
|
||||
o.AccessControlMaxAge = hdrAccessControlMaxAge
|
||||
}
|
||||
|
||||
// hydrates response header Cache-Control
|
||||
hdrCacheControl := response.GetHeader("Cache-Control")
|
||||
|
||||
if hdrCacheControl != "" {
|
||||
o.CacheControl = hdrCacheControl
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
|
@ -1,130 +0,0 @@
|
|||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
// (c) 2012-2020 by Taxnexus, Inc.
|
||||
// All rights reserved worldwide.
|
||||
// Proprietary product; unlicensed use is not allowed
|
||||
|
||||
package cors
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
// Editing this file might prove futile when you re-run the swagger generate command
|
||||
|
||||
import (
|
||||
"context"
|
||||
"net/http"
|
||||
"time"
|
||||
|
||||
"github.com/go-openapi/errors"
|
||||
"github.com/go-openapi/runtime"
|
||||
cr "github.com/go-openapi/runtime/client"
|
||||
"github.com/go-openapi/strfmt"
|
||||
)
|
||||
|
||||
// NewJobsOptionsParams creates a new JobsOptionsParams object,
|
||||
// with the default timeout for this client.
|
||||
//
|
||||
// Default values are not hydrated, since defaults are normally applied by the API server side.
|
||||
//
|
||||
// To enforce default values in parameter, use SetDefaults or WithDefaults.
|
||||
func NewJobsOptionsParams() *JobsOptionsParams {
|
||||
return &JobsOptionsParams{
|
||||
timeout: cr.DefaultTimeout,
|
||||
}
|
||||
}
|
||||
|
||||
// NewJobsOptionsParamsWithTimeout creates a new JobsOptionsParams object
|
||||
// with the ability to set a timeout on a request.
|
||||
func NewJobsOptionsParamsWithTimeout(timeout time.Duration) *JobsOptionsParams {
|
||||
return &JobsOptionsParams{
|
||||
timeout: timeout,
|
||||
}
|
||||
}
|
||||
|
||||
// NewJobsOptionsParamsWithContext creates a new JobsOptionsParams object
|
||||
// with the ability to set a context for a request.
|
||||
func NewJobsOptionsParamsWithContext(ctx context.Context) *JobsOptionsParams {
|
||||
return &JobsOptionsParams{
|
||||
Context: ctx,
|
||||
}
|
||||
}
|
||||
|
||||
// NewJobsOptionsParamsWithHTTPClient creates a new JobsOptionsParams object
|
||||
// with the ability to set a custom HTTPClient for a request.
|
||||
func NewJobsOptionsParamsWithHTTPClient(client *http.Client) *JobsOptionsParams {
|
||||
return &JobsOptionsParams{
|
||||
HTTPClient: client,
|
||||
}
|
||||
}
|
||||
|
||||
/* JobsOptionsParams contains all the parameters to send to the API endpoint
|
||||
for the jobs options operation.
|
||||
|
||||
Typically these are written to a http.Request.
|
||||
*/
|
||||
type JobsOptionsParams struct {
|
||||
timeout time.Duration
|
||||
Context context.Context
|
||||
HTTPClient *http.Client
|
||||
}
|
||||
|
||||
// WithDefaults hydrates default values in the jobs options params (not the query body).
|
||||
//
|
||||
// All values with no default are reset to their zero value.
|
||||
func (o *JobsOptionsParams) WithDefaults() *JobsOptionsParams {
|
||||
o.SetDefaults()
|
||||
return o
|
||||
}
|
||||
|
||||
// SetDefaults hydrates default values in the jobs options params (not the query body).
|
||||
//
|
||||
// All values with no default are reset to their zero value.
|
||||
func (o *JobsOptionsParams) SetDefaults() {
|
||||
// no default values defined for this parameter
|
||||
}
|
||||
|
||||
// WithTimeout adds the timeout to the jobs options params
|
||||
func (o *JobsOptionsParams) WithTimeout(timeout time.Duration) *JobsOptionsParams {
|
||||
o.SetTimeout(timeout)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetTimeout adds the timeout to the jobs options params
|
||||
func (o *JobsOptionsParams) SetTimeout(timeout time.Duration) {
|
||||
o.timeout = timeout
|
||||
}
|
||||
|
||||
// WithContext adds the context to the jobs options params
|
||||
func (o *JobsOptionsParams) WithContext(ctx context.Context) *JobsOptionsParams {
|
||||
o.SetContext(ctx)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetContext adds the context to the jobs options params
|
||||
func (o *JobsOptionsParams) SetContext(ctx context.Context) {
|
||||
o.Context = ctx
|
||||
}
|
||||
|
||||
// WithHTTPClient adds the HTTPClient to the jobs options params
|
||||
func (o *JobsOptionsParams) WithHTTPClient(client *http.Client) *JobsOptionsParams {
|
||||
o.SetHTTPClient(client)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetHTTPClient adds the HTTPClient to the jobs options params
|
||||
func (o *JobsOptionsParams) SetHTTPClient(client *http.Client) {
|
||||
o.HTTPClient = client
|
||||
}
|
||||
|
||||
// WriteToRequest writes these params to a swagger request
|
||||
func (o *JobsOptionsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
|
||||
|
||||
if err := r.SetTimeout(o.timeout); err != nil {
|
||||
return err
|
||||
}
|
||||
var res []error
|
||||
|
||||
if len(res) > 0 {
|
||||
return errors.CompositeValidationError(res...)
|
||||
}
|
||||
return nil
|
||||
}
|
|
@ -1,113 +0,0 @@
|
|||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
// (c) 2012-2020 by Taxnexus, Inc.
|
||||
// All rights reserved worldwide.
|
||||
// Proprietary product; unlicensed use is not allowed
|
||||
|
||||
package cors
|
||||
|
||||
// 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"
|
||||
)
|
||||
|
||||
// JobsOptionsReader is a Reader for the JobsOptions structure.
|
||||
type JobsOptionsReader struct {
|
||||
formats strfmt.Registry
|
||||
}
|
||||
|
||||
// ReadResponse reads a server response into the received o.
|
||||
func (o *JobsOptionsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
|
||||
switch response.Code() {
|
||||
case 200:
|
||||
result := NewJobsOptionsOK()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return result, nil
|
||||
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())
|
||||
}
|
||||
}
|
||||
|
||||
// NewJobsOptionsOK creates a JobsOptionsOK with default headers values
|
||||
func NewJobsOptionsOK() *JobsOptionsOK {
|
||||
return &JobsOptionsOK{}
|
||||
}
|
||||
|
||||
/* JobsOptionsOK describes a response with status code 200, with default header values.
|
||||
|
||||
CORS OPTIONS response
|
||||
*/
|
||||
type JobsOptionsOK struct {
|
||||
AccessControlAllowCredentials string
|
||||
AccessControlAllowHeaders string
|
||||
AccessControlAllowMethods string
|
||||
AccessControlAllowOrigin string
|
||||
AccessControlExposeHeaders string
|
||||
AccessControlMaxAge string
|
||||
CacheControl string
|
||||
}
|
||||
|
||||
func (o *JobsOptionsOK) Error() string {
|
||||
return fmt.Sprintf("[OPTIONS /jobs][%d] jobsOptionsOK ", 200)
|
||||
}
|
||||
|
||||
func (o *JobsOptionsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
// hydrates response header Access-Control-Allow-Credentials
|
||||
hdrAccessControlAllowCredentials := response.GetHeader("Access-Control-Allow-Credentials")
|
||||
|
||||
if hdrAccessControlAllowCredentials != "" {
|
||||
o.AccessControlAllowCredentials = hdrAccessControlAllowCredentials
|
||||
}
|
||||
|
||||
// hydrates response header Access-Control-Allow-Headers
|
||||
hdrAccessControlAllowHeaders := response.GetHeader("Access-Control-Allow-Headers")
|
||||
|
||||
if hdrAccessControlAllowHeaders != "" {
|
||||
o.AccessControlAllowHeaders = hdrAccessControlAllowHeaders
|
||||
}
|
||||
|
||||
// hydrates response header Access-Control-Allow-Methods
|
||||
hdrAccessControlAllowMethods := response.GetHeader("Access-Control-Allow-Methods")
|
||||
|
||||
if hdrAccessControlAllowMethods != "" {
|
||||
o.AccessControlAllowMethods = hdrAccessControlAllowMethods
|
||||
}
|
||||
|
||||
// hydrates response header Access-Control-Allow-Origin
|
||||
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
|
||||
|
||||
if hdrAccessControlAllowOrigin != "" {
|
||||
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
|
||||
}
|
||||
|
||||
// hydrates response header Access-Control-Expose-Headers
|
||||
hdrAccessControlExposeHeaders := response.GetHeader("Access-Control-Expose-Headers")
|
||||
|
||||
if hdrAccessControlExposeHeaders != "" {
|
||||
o.AccessControlExposeHeaders = hdrAccessControlExposeHeaders
|
||||
}
|
||||
|
||||
// hydrates response header Access-Control-Max-Age
|
||||
hdrAccessControlMaxAge := response.GetHeader("Access-Control-Max-Age")
|
||||
|
||||
if hdrAccessControlMaxAge != "" {
|
||||
o.AccessControlMaxAge = hdrAccessControlMaxAge
|
||||
}
|
||||
|
||||
// hydrates response header Cache-Control
|
||||
hdrCacheControl := response.GetHeader("Cache-Control")
|
||||
|
||||
if hdrCacheControl != "" {
|
||||
o.CacheControl = hdrCacheControl
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
|
@ -1,130 +0,0 @@
|
|||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
// (c) 2012-2020 by Taxnexus, Inc.
|
||||
// All rights reserved worldwide.
|
||||
// Proprietary product; unlicensed use is not allowed
|
||||
|
||||
package cors
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
// Editing this file might prove futile when you re-run the swagger generate command
|
||||
|
||||
import (
|
||||
"context"
|
||||
"net/http"
|
||||
"time"
|
||||
|
||||
"github.com/go-openapi/errors"
|
||||
"github.com/go-openapi/runtime"
|
||||
cr "github.com/go-openapi/runtime/client"
|
||||
"github.com/go-openapi/strfmt"
|
||||
)
|
||||
|
||||
// NewServiceOptionsParams creates a new ServiceOptionsParams object,
|
||||
// with the default timeout for this client.
|
||||
//
|
||||
// Default values are not hydrated, since defaults are normally applied by the API server side.
|
||||
//
|
||||
// To enforce default values in parameter, use SetDefaults or WithDefaults.
|
||||
func NewServiceOptionsParams() *ServiceOptionsParams {
|
||||
return &ServiceOptionsParams{
|
||||
timeout: cr.DefaultTimeout,
|
||||
}
|
||||
}
|
||||
|
||||
// NewServiceOptionsParamsWithTimeout creates a new ServiceOptionsParams object
|
||||
// with the ability to set a timeout on a request.
|
||||
func NewServiceOptionsParamsWithTimeout(timeout time.Duration) *ServiceOptionsParams {
|
||||
return &ServiceOptionsParams{
|
||||
timeout: timeout,
|
||||
}
|
||||
}
|
||||
|
||||
// NewServiceOptionsParamsWithContext creates a new ServiceOptionsParams object
|
||||
// with the ability to set a context for a request.
|
||||
func NewServiceOptionsParamsWithContext(ctx context.Context) *ServiceOptionsParams {
|
||||
return &ServiceOptionsParams{
|
||||
Context: ctx,
|
||||
}
|
||||
}
|
||||
|
||||
// NewServiceOptionsParamsWithHTTPClient creates a new ServiceOptionsParams object
|
||||
// with the ability to set a custom HTTPClient for a request.
|
||||
func NewServiceOptionsParamsWithHTTPClient(client *http.Client) *ServiceOptionsParams {
|
||||
return &ServiceOptionsParams{
|
||||
HTTPClient: client,
|
||||
}
|
||||
}
|
||||
|
||||
/* ServiceOptionsParams contains all the parameters to send to the API endpoint
|
||||
for the service options operation.
|
||||
|
||||
Typically these are written to a http.Request.
|
||||
*/
|
||||
type ServiceOptionsParams struct {
|
||||
timeout time.Duration
|
||||
Context context.Context
|
||||
HTTPClient *http.Client
|
||||
}
|
||||
|
||||
// WithDefaults hydrates default values in the service options params (not the query body).
|
||||
//
|
||||
// All values with no default are reset to their zero value.
|
||||
func (o *ServiceOptionsParams) WithDefaults() *ServiceOptionsParams {
|
||||
o.SetDefaults()
|
||||
return o
|
||||
}
|
||||
|
||||
// SetDefaults hydrates default values in the service options params (not the query body).
|
||||
//
|
||||
// All values with no default are reset to their zero value.
|
||||
func (o *ServiceOptionsParams) SetDefaults() {
|
||||
// no default values defined for this parameter
|
||||
}
|
||||
|
||||
// WithTimeout adds the timeout to the service options params
|
||||
func (o *ServiceOptionsParams) WithTimeout(timeout time.Duration) *ServiceOptionsParams {
|
||||
o.SetTimeout(timeout)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetTimeout adds the timeout to the service options params
|
||||
func (o *ServiceOptionsParams) SetTimeout(timeout time.Duration) {
|
||||
o.timeout = timeout
|
||||
}
|
||||
|
||||
// WithContext adds the context to the service options params
|
||||
func (o *ServiceOptionsParams) WithContext(ctx context.Context) *ServiceOptionsParams {
|
||||
o.SetContext(ctx)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetContext adds the context to the service options params
|
||||
func (o *ServiceOptionsParams) SetContext(ctx context.Context) {
|
||||
o.Context = ctx
|
||||
}
|
||||
|
||||
// WithHTTPClient adds the HTTPClient to the service options params
|
||||
func (o *ServiceOptionsParams) WithHTTPClient(client *http.Client) *ServiceOptionsParams {
|
||||
o.SetHTTPClient(client)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetHTTPClient adds the HTTPClient to the service options params
|
||||
func (o *ServiceOptionsParams) SetHTTPClient(client *http.Client) {
|
||||
o.HTTPClient = client
|
||||
}
|
||||
|
||||
// WriteToRequest writes these params to a swagger request
|
||||
func (o *ServiceOptionsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
|
||||
|
||||
if err := r.SetTimeout(o.timeout); err != nil {
|
||||
return err
|
||||
}
|
||||
var res []error
|
||||
|
||||
if len(res) > 0 {
|
||||
return errors.CompositeValidationError(res...)
|
||||
}
|
||||
return nil
|
||||
}
|
|
@ -1,113 +0,0 @@
|
|||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
// (c) 2012-2020 by Taxnexus, Inc.
|
||||
// All rights reserved worldwide.
|
||||
// Proprietary product; unlicensed use is not allowed
|
||||
|
||||
package cors
|
||||
|
||||
// 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"
|
||||
)
|
||||
|
||||
// ServiceOptionsReader is a Reader for the ServiceOptions structure.
|
||||
type ServiceOptionsReader struct {
|
||||
formats strfmt.Registry
|
||||
}
|
||||
|
||||
// ReadResponse reads a server response into the received o.
|
||||
func (o *ServiceOptionsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
|
||||
switch response.Code() {
|
||||
case 200:
|
||||
result := NewServiceOptionsOK()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return result, nil
|
||||
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())
|
||||
}
|
||||
}
|
||||
|
||||
// NewServiceOptionsOK creates a ServiceOptionsOK with default headers values
|
||||
func NewServiceOptionsOK() *ServiceOptionsOK {
|
||||
return &ServiceOptionsOK{}
|
||||
}
|
||||
|
||||
/* ServiceOptionsOK describes a response with status code 200, with default header values.
|
||||
|
||||
CORS OPTIONS response
|
||||
*/
|
||||
type ServiceOptionsOK struct {
|
||||
AccessControlAllowCredentials string
|
||||
AccessControlAllowHeaders string
|
||||
AccessControlAllowMethods string
|
||||
AccessControlAllowOrigin string
|
||||
AccessControlExposeHeaders string
|
||||
AccessControlMaxAge string
|
||||
CacheControl string
|
||||
}
|
||||
|
||||
func (o *ServiceOptionsOK) Error() string {
|
||||
return fmt.Sprintf("[OPTIONS /services/observable][%d] serviceOptionsOK ", 200)
|
||||
}
|
||||
|
||||
func (o *ServiceOptionsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
// hydrates response header Access-Control-Allow-Credentials
|
||||
hdrAccessControlAllowCredentials := response.GetHeader("Access-Control-Allow-Credentials")
|
||||
|
||||
if hdrAccessControlAllowCredentials != "" {
|
||||
o.AccessControlAllowCredentials = hdrAccessControlAllowCredentials
|
||||
}
|
||||
|
||||
// hydrates response header Access-Control-Allow-Headers
|
||||
hdrAccessControlAllowHeaders := response.GetHeader("Access-Control-Allow-Headers")
|
||||
|
||||
if hdrAccessControlAllowHeaders != "" {
|
||||
o.AccessControlAllowHeaders = hdrAccessControlAllowHeaders
|
||||
}
|
||||
|
||||
// hydrates response header Access-Control-Allow-Methods
|
||||
hdrAccessControlAllowMethods := response.GetHeader("Access-Control-Allow-Methods")
|
||||
|
||||
if hdrAccessControlAllowMethods != "" {
|
||||
o.AccessControlAllowMethods = hdrAccessControlAllowMethods
|
||||
}
|
||||
|
||||
// hydrates response header Access-Control-Allow-Origin
|
||||
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
|
||||
|
||||
if hdrAccessControlAllowOrigin != "" {
|
||||
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
|
||||
}
|
||||
|
||||
// hydrates response header Access-Control-Expose-Headers
|
||||
hdrAccessControlExposeHeaders := response.GetHeader("Access-Control-Expose-Headers")
|
||||
|
||||
if hdrAccessControlExposeHeaders != "" {
|
||||
o.AccessControlExposeHeaders = hdrAccessControlExposeHeaders
|
||||
}
|
||||
|
||||
// hydrates response header Access-Control-Max-Age
|
||||
hdrAccessControlMaxAge := response.GetHeader("Access-Control-Max-Age")
|
||||
|
||||
if hdrAccessControlMaxAge != "" {
|
||||
o.AccessControlMaxAge = hdrAccessControlMaxAge
|
||||
}
|
||||
|
||||
// hydrates response header Cache-Control
|
||||
hdrCacheControl := response.GetHeader("Cache-Control")
|
||||
|
||||
if hdrCacheControl != "" {
|
||||
o.CacheControl = hdrCacheControl
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
|
@ -1,130 +0,0 @@
|
|||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
// (c) 2012-2020 by Taxnexus, Inc.
|
||||
// All rights reserved worldwide.
|
||||
// Proprietary product; unlicensed use is not allowed
|
||||
|
||||
package cors
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
// Editing this file might prove futile when you re-run the swagger generate command
|
||||
|
||||
import (
|
||||
"context"
|
||||
"net/http"
|
||||
"time"
|
||||
|
||||
"github.com/go-openapi/errors"
|
||||
"github.com/go-openapi/runtime"
|
||||
cr "github.com/go-openapi/runtime/client"
|
||||
"github.com/go-openapi/strfmt"
|
||||
)
|
||||
|
||||
// NewServicesOptionsParams creates a new ServicesOptionsParams object,
|
||||
// with the default timeout for this client.
|
||||
//
|
||||
// Default values are not hydrated, since defaults are normally applied by the API server side.
|
||||
//
|
||||
// To enforce default values in parameter, use SetDefaults or WithDefaults.
|
||||
func NewServicesOptionsParams() *ServicesOptionsParams {
|
||||
return &ServicesOptionsParams{
|
||||
timeout: cr.DefaultTimeout,
|
||||
}
|
||||
}
|
||||
|
||||
// NewServicesOptionsParamsWithTimeout creates a new ServicesOptionsParams object
|
||||
// with the ability to set a timeout on a request.
|
||||
func NewServicesOptionsParamsWithTimeout(timeout time.Duration) *ServicesOptionsParams {
|
||||
return &ServicesOptionsParams{
|
||||
timeout: timeout,
|
||||
}
|
||||
}
|
||||
|
||||
// NewServicesOptionsParamsWithContext creates a new ServicesOptionsParams object
|
||||
// with the ability to set a context for a request.
|
||||
func NewServicesOptionsParamsWithContext(ctx context.Context) *ServicesOptionsParams {
|
||||
return &ServicesOptionsParams{
|
||||
Context: ctx,
|
||||
}
|
||||
}
|
||||
|
||||
// NewServicesOptionsParamsWithHTTPClient creates a new ServicesOptionsParams object
|
||||
// with the ability to set a custom HTTPClient for a request.
|
||||
func NewServicesOptionsParamsWithHTTPClient(client *http.Client) *ServicesOptionsParams {
|
||||
return &ServicesOptionsParams{
|
||||
HTTPClient: client,
|
||||
}
|
||||
}
|
||||
|
||||
/* ServicesOptionsParams contains all the parameters to send to the API endpoint
|
||||
for the services options operation.
|
||||
|
||||
Typically these are written to a http.Request.
|
||||
*/
|
||||
type ServicesOptionsParams struct {
|
||||
timeout time.Duration
|
||||
Context context.Context
|
||||
HTTPClient *http.Client
|
||||
}
|
||||
|
||||
// WithDefaults hydrates default values in the services options params (not the query body).
|
||||
//
|
||||
// All values with no default are reset to their zero value.
|
||||
func (o *ServicesOptionsParams) WithDefaults() *ServicesOptionsParams {
|
||||
o.SetDefaults()
|
||||
return o
|
||||
}
|
||||
|
||||
// SetDefaults hydrates default values in the services options params (not the query body).
|
||||
//
|
||||
// All values with no default are reset to their zero value.
|
||||
func (o *ServicesOptionsParams) SetDefaults() {
|
||||
// no default values defined for this parameter
|
||||
}
|
||||
|
||||
// WithTimeout adds the timeout to the services options params
|
||||
func (o *ServicesOptionsParams) WithTimeout(timeout time.Duration) *ServicesOptionsParams {
|
||||
o.SetTimeout(timeout)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetTimeout adds the timeout to the services options params
|
||||
func (o *ServicesOptionsParams) SetTimeout(timeout time.Duration) {
|
||||
o.timeout = timeout
|
||||
}
|
||||
|
||||
// WithContext adds the context to the services options params
|
||||
func (o *ServicesOptionsParams) WithContext(ctx context.Context) *ServicesOptionsParams {
|
||||
o.SetContext(ctx)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetContext adds the context to the services options params
|
||||
func (o *ServicesOptionsParams) SetContext(ctx context.Context) {
|
||||
o.Context = ctx
|
||||
}
|
||||
|
||||
// WithHTTPClient adds the HTTPClient to the services options params
|
||||
func (o *ServicesOptionsParams) WithHTTPClient(client *http.Client) *ServicesOptionsParams {
|
||||
o.SetHTTPClient(client)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetHTTPClient adds the HTTPClient to the services options params
|
||||
func (o *ServicesOptionsParams) SetHTTPClient(client *http.Client) {
|
||||
o.HTTPClient = client
|
||||
}
|
||||
|
||||
// WriteToRequest writes these params to a swagger request
|
||||
func (o *ServicesOptionsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
|
||||
|
||||
if err := r.SetTimeout(o.timeout); err != nil {
|
||||
return err
|
||||
}
|
||||
var res []error
|
||||
|
||||
if len(res) > 0 {
|
||||
return errors.CompositeValidationError(res...)
|
||||
}
|
||||
return nil
|
||||
}
|
|
@ -1,113 +0,0 @@
|
|||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
// (c) 2012-2020 by Taxnexus, Inc.
|
||||
// All rights reserved worldwide.
|
||||
// Proprietary product; unlicensed use is not allowed
|
||||
|
||||
package cors
|
||||
|
||||
// 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"
|
||||
)
|
||||
|
||||
// ServicesOptionsReader is a Reader for the ServicesOptions structure.
|
||||
type ServicesOptionsReader struct {
|
||||
formats strfmt.Registry
|
||||
}
|
||||
|
||||
// ReadResponse reads a server response into the received o.
|
||||
func (o *ServicesOptionsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
|
||||
switch response.Code() {
|
||||
case 200:
|
||||
result := NewServicesOptionsOK()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return result, nil
|
||||
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())
|
||||
}
|
||||
}
|
||||
|
||||
// NewServicesOptionsOK creates a ServicesOptionsOK with default headers values
|
||||
func NewServicesOptionsOK() *ServicesOptionsOK {
|
||||
return &ServicesOptionsOK{}
|
||||
}
|
||||
|
||||
/* ServicesOptionsOK describes a response with status code 200, with default header values.
|
||||
|
||||
CORS OPTIONS response
|
||||
*/
|
||||
type ServicesOptionsOK struct {
|
||||
AccessControlAllowCredentials string
|
||||
AccessControlAllowHeaders string
|
||||
AccessControlAllowMethods string
|
||||
AccessControlAllowOrigin string
|
||||
AccessControlExposeHeaders string
|
||||
AccessControlMaxAge string
|
||||
CacheControl string
|
||||
}
|
||||
|
||||
func (o *ServicesOptionsOK) Error() string {
|
||||
return fmt.Sprintf("[OPTIONS /services][%d] servicesOptionsOK ", 200)
|
||||
}
|
||||
|
||||
func (o *ServicesOptionsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
// hydrates response header Access-Control-Allow-Credentials
|
||||
hdrAccessControlAllowCredentials := response.GetHeader("Access-Control-Allow-Credentials")
|
||||
|
||||
if hdrAccessControlAllowCredentials != "" {
|
||||
o.AccessControlAllowCredentials = hdrAccessControlAllowCredentials
|
||||
}
|
||||
|
||||
// hydrates response header Access-Control-Allow-Headers
|
||||
hdrAccessControlAllowHeaders := response.GetHeader("Access-Control-Allow-Headers")
|
||||
|
||||
if hdrAccessControlAllowHeaders != "" {
|
||||
o.AccessControlAllowHeaders = hdrAccessControlAllowHeaders
|
||||
}
|
||||
|
||||
// hydrates response header Access-Control-Allow-Methods
|
||||
hdrAccessControlAllowMethods := response.GetHeader("Access-Control-Allow-Methods")
|
||||
|
||||
if hdrAccessControlAllowMethods != "" {
|
||||
o.AccessControlAllowMethods = hdrAccessControlAllowMethods
|
||||
}
|
||||
|
||||
// hydrates response header Access-Control-Allow-Origin
|
||||
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
|
||||
|
||||
if hdrAccessControlAllowOrigin != "" {
|
||||
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
|
||||
}
|
||||
|
||||
// hydrates response header Access-Control-Expose-Headers
|
||||
hdrAccessControlExposeHeaders := response.GetHeader("Access-Control-Expose-Headers")
|
||||
|
||||
if hdrAccessControlExposeHeaders != "" {
|
||||
o.AccessControlExposeHeaders = hdrAccessControlExposeHeaders
|
||||
}
|
||||
|
||||
// hydrates response header Access-Control-Max-Age
|
||||
hdrAccessControlMaxAge := response.GetHeader("Access-Control-Max-Age")
|
||||
|
||||
if hdrAccessControlMaxAge != "" {
|
||||
o.AccessControlMaxAge = hdrAccessControlMaxAge
|
||||
}
|
||||
|
||||
// hydrates response header Cache-Control
|
||||
hdrCacheControl := response.GetHeader("Cache-Control")
|
||||
|
||||
if hdrCacheControl != "" {
|
||||
o.CacheControl = hdrCacheControl
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
|
@ -17,9 +17,6 @@ import (
|
|||
"code.tnxs.net/vernonkeenan/lib/api/devops/devops_client/cluster"
|
||||
"code.tnxs.net/vernonkeenan/lib/api/devops/devops_client/cors"
|
||||
"code.tnxs.net/vernonkeenan/lib/api/devops/devops_client/database"
|
||||
"code.tnxs.net/vernonkeenan/lib/api/devops/devops_client/ingest"
|
||||
"code.tnxs.net/vernonkeenan/lib/api/devops/devops_client/job"
|
||||
"code.tnxs.net/vernonkeenan/lib/api/devops/devops_client/service"
|
||||
"code.tnxs.net/vernonkeenan/lib/api/devops/devops_client/template"
|
||||
"code.tnxs.net/vernonkeenan/lib/api/devops/devops_client/tenant"
|
||||
"code.tnxs.net/vernonkeenan/lib/api/devops/devops_client/user"
|
||||
|
@ -70,9 +67,6 @@ func New(transport runtime.ClientTransport, formats strfmt.Registry) *Devops {
|
|||
cli.Cluster = cluster.New(transport, formats)
|
||||
cli.Cors = cors.New(transport, formats)
|
||||
cli.Database = database.New(transport, formats)
|
||||
cli.Ingest = ingest.New(transport, formats)
|
||||
cli.Job = job.New(transport, formats)
|
||||
cli.Service = service.New(transport, formats)
|
||||
cli.Template = template.New(transport, formats)
|
||||
cli.Tenant = tenant.New(transport, formats)
|
||||
cli.User = user.New(transport, formats)
|
||||
|
@ -126,12 +120,6 @@ type Devops struct {
|
|||
|
||||
Database database.ClientService
|
||||
|
||||
Ingest ingest.ClientService
|
||||
|
||||
Job job.ClientService
|
||||
|
||||
Service service.ClientService
|
||||
|
||||
Template template.ClientService
|
||||
|
||||
Tenant tenant.ClientService
|
||||
|
@ -147,9 +135,6 @@ func (c *Devops) SetTransport(transport runtime.ClientTransport) {
|
|||
c.Cluster.SetTransport(transport)
|
||||
c.Cors.SetTransport(transport)
|
||||
c.Database.SetTransport(transport)
|
||||
c.Ingest.SetTransport(transport)
|
||||
c.Job.SetTransport(transport)
|
||||
c.Service.SetTransport(transport)
|
||||
c.Template.SetTransport(transport)
|
||||
c.Tenant.SetTransport(transport)
|
||||
c.User.SetTransport(transport)
|
||||
|
|
|
@ -1,153 +0,0 @@
|
|||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
// (c) 2012-2020 by Taxnexus, Inc.
|
||||
// All rights reserved worldwide.
|
||||
// Proprietary product; unlicensed use is not allowed
|
||||
|
||||
package ingest
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
// Editing this file might prove futile when you re-run the swagger generate command
|
||||
|
||||
import (
|
||||
"context"
|
||||
"net/http"
|
||||
"time"
|
||||
|
||||
"github.com/go-openapi/errors"
|
||||
"github.com/go-openapi/runtime"
|
||||
cr "github.com/go-openapi/runtime/client"
|
||||
"github.com/go-openapi/strfmt"
|
||||
)
|
||||
|
||||
// NewGetIngestParams creates a new GetIngestParams object,
|
||||
// with the default timeout for this client.
|
||||
//
|
||||
// Default values are not hydrated, since defaults are normally applied by the API server side.
|
||||
//
|
||||
// To enforce default values in parameter, use SetDefaults or WithDefaults.
|
||||
func NewGetIngestParams() *GetIngestParams {
|
||||
return &GetIngestParams{
|
||||
timeout: cr.DefaultTimeout,
|
||||
}
|
||||
}
|
||||
|
||||
// NewGetIngestParamsWithTimeout creates a new GetIngestParams object
|
||||
// with the ability to set a timeout on a request.
|
||||
func NewGetIngestParamsWithTimeout(timeout time.Duration) *GetIngestParams {
|
||||
return &GetIngestParams{
|
||||
timeout: timeout,
|
||||
}
|
||||
}
|
||||
|
||||
// NewGetIngestParamsWithContext creates a new GetIngestParams object
|
||||
// with the ability to set a context for a request.
|
||||
func NewGetIngestParamsWithContext(ctx context.Context) *GetIngestParams {
|
||||
return &GetIngestParams{
|
||||
Context: ctx,
|
||||
}
|
||||
}
|
||||
|
||||
// NewGetIngestParamsWithHTTPClient creates a new GetIngestParams object
|
||||
// with the ability to set a custom HTTPClient for a request.
|
||||
func NewGetIngestParamsWithHTTPClient(client *http.Client) *GetIngestParams {
|
||||
return &GetIngestParams{
|
||||
HTTPClient: client,
|
||||
}
|
||||
}
|
||||
|
||||
/* GetIngestParams contains all the parameters to send to the API endpoint
|
||||
for the get ingest operation.
|
||||
|
||||
Typically these are written to a http.Request.
|
||||
*/
|
||||
type GetIngestParams struct {
|
||||
|
||||
/* IngestIDPath.
|
||||
|
||||
Taxnexus Record Id of a Ingest
|
||||
*/
|
||||
IngestIDPath string
|
||||
|
||||
timeout time.Duration
|
||||
Context context.Context
|
||||
HTTPClient *http.Client
|
||||
}
|
||||
|
||||
// WithDefaults hydrates default values in the get ingest params (not the query body).
|
||||
//
|
||||
// All values with no default are reset to their zero value.
|
||||
func (o *GetIngestParams) WithDefaults() *GetIngestParams {
|
||||
o.SetDefaults()
|
||||
return o
|
||||
}
|
||||
|
||||
// SetDefaults hydrates default values in the get ingest params (not the query body).
|
||||
//
|
||||
// All values with no default are reset to their zero value.
|
||||
func (o *GetIngestParams) SetDefaults() {
|
||||
// no default values defined for this parameter
|
||||
}
|
||||
|
||||
// WithTimeout adds the timeout to the get ingest params
|
||||
func (o *GetIngestParams) WithTimeout(timeout time.Duration) *GetIngestParams {
|
||||
o.SetTimeout(timeout)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetTimeout adds the timeout to the get ingest params
|
||||
func (o *GetIngestParams) SetTimeout(timeout time.Duration) {
|
||||
o.timeout = timeout
|
||||
}
|
||||
|
||||
// WithContext adds the context to the get ingest params
|
||||
func (o *GetIngestParams) WithContext(ctx context.Context) *GetIngestParams {
|
||||
o.SetContext(ctx)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetContext adds the context to the get ingest params
|
||||
func (o *GetIngestParams) SetContext(ctx context.Context) {
|
||||
o.Context = ctx
|
||||
}
|
||||
|
||||
// WithHTTPClient adds the HTTPClient to the get ingest params
|
||||
func (o *GetIngestParams) WithHTTPClient(client *http.Client) *GetIngestParams {
|
||||
o.SetHTTPClient(client)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetHTTPClient adds the HTTPClient to the get ingest params
|
||||
func (o *GetIngestParams) SetHTTPClient(client *http.Client) {
|
||||
o.HTTPClient = client
|
||||
}
|
||||
|
||||
// WithIngestIDPath adds the ingestIDPath to the get ingest params
|
||||
func (o *GetIngestParams) WithIngestIDPath(ingestIDPath string) *GetIngestParams {
|
||||
o.SetIngestIDPath(ingestIDPath)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetIngestIDPath adds the ingestIdPath to the get ingest params
|
||||
func (o *GetIngestParams) SetIngestIDPath(ingestIDPath string) {
|
||||
o.IngestIDPath = ingestIDPath
|
||||
}
|
||||
|
||||
// WriteToRequest writes these params to a swagger request
|
||||
func (o *GetIngestParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
|
||||
|
||||
if err := r.SetTimeout(o.timeout); err != nil {
|
||||
return err
|
||||
}
|
||||
var res []error
|
||||
|
||||
// path param ingestIdPath
|
||||
if err := r.SetPathParam("ingestIdPath", o.IngestIDPath); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if len(res) > 0 {
|
||||
return errors.CompositeValidationError(res...)
|
||||
}
|
||||
return nil
|
||||
}
|
|
@ -1,339 +0,0 @@
|
|||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
// (c) 2012-2020 by Taxnexus, Inc.
|
||||
// All rights reserved worldwide.
|
||||
// Proprietary product; unlicensed use is not allowed
|
||||
|
||||
package ingest
|
||||
|
||||
// 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"
|
||||
|
||||
"code.tnxs.net/vernonkeenan/lib/api/devops/devops_models"
|
||||
)
|
||||
|
||||
// GetIngestReader is a Reader for the GetIngest structure.
|
||||
type GetIngestReader struct {
|
||||
formats strfmt.Registry
|
||||
}
|
||||
|
||||
// ReadResponse reads a server response into the received o.
|
||||
func (o *GetIngestReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
|
||||
switch response.Code() {
|
||||
case 200:
|
||||
result := NewGetIngestOK()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return result, nil
|
||||
case 401:
|
||||
result := NewGetIngestUnauthorized()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return nil, result
|
||||
case 403:
|
||||
result := NewGetIngestForbidden()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return nil, result
|
||||
case 404:
|
||||
result := NewGetIngestNotFound()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return nil, result
|
||||
case 422:
|
||||
result := NewGetIngestUnprocessableEntity()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return nil, result
|
||||
case 500:
|
||||
result := NewGetIngestInternalServerError()
|
||||
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())
|
||||
}
|
||||
}
|
||||
|
||||
// NewGetIngestOK creates a GetIngestOK with default headers values
|
||||
func NewGetIngestOK() *GetIngestOK {
|
||||
return &GetIngestOK{}
|
||||
}
|
||||
|
||||
/* GetIngestOK describes a response with status code 200, with default header values.
|
||||
|
||||
Single Ingest record response
|
||||
*/
|
||||
type GetIngestOK struct {
|
||||
AccessControlAllowOrigin string
|
||||
CacheControl string
|
||||
|
||||
Payload *devops_models.Ingest
|
||||
}
|
||||
|
||||
func (o *GetIngestOK) Error() string {
|
||||
return fmt.Sprintf("[GET /ingests/{ingestIdPath}][%d] getIngestOK %+v", 200, o.Payload)
|
||||
}
|
||||
func (o *GetIngestOK) GetPayload() *devops_models.Ingest {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *GetIngestOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
// hydrates response header Access-Control-Allow-Origin
|
||||
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
|
||||
|
||||
if hdrAccessControlAllowOrigin != "" {
|
||||
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
|
||||
}
|
||||
|
||||
// hydrates response header Cache-Control
|
||||
hdrCacheControl := response.GetHeader("Cache-Control")
|
||||
|
||||
if hdrCacheControl != "" {
|
||||
o.CacheControl = hdrCacheControl
|
||||
}
|
||||
|
||||
o.Payload = new(devops_models.Ingest)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewGetIngestUnauthorized creates a GetIngestUnauthorized with default headers values
|
||||
func NewGetIngestUnauthorized() *GetIngestUnauthorized {
|
||||
return &GetIngestUnauthorized{}
|
||||
}
|
||||
|
||||
/* GetIngestUnauthorized describes a response with status code 401, with default header values.
|
||||
|
||||
Access Unauthorized, invalid API-KEY was used
|
||||
*/
|
||||
type GetIngestUnauthorized struct {
|
||||
AccessControlAllowOrigin string
|
||||
CacheControl string
|
||||
|
||||
Payload *devops_models.Error
|
||||
}
|
||||
|
||||
func (o *GetIngestUnauthorized) Error() string {
|
||||
return fmt.Sprintf("[GET /ingests/{ingestIdPath}][%d] getIngestUnauthorized %+v", 401, o.Payload)
|
||||
}
|
||||
func (o *GetIngestUnauthorized) GetPayload() *devops_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *GetIngestUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
// hydrates response header Access-Control-Allow-Origin
|
||||
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
|
||||
|
||||
if hdrAccessControlAllowOrigin != "" {
|
||||
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
|
||||
}
|
||||
|
||||
// hydrates response header Cache-Control
|
||||
hdrCacheControl := response.GetHeader("Cache-Control")
|
||||
|
||||
if hdrCacheControl != "" {
|
||||
o.CacheControl = hdrCacheControl
|
||||
}
|
||||
|
||||
o.Payload = new(devops_models.Error)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewGetIngestForbidden creates a GetIngestForbidden with default headers values
|
||||
func NewGetIngestForbidden() *GetIngestForbidden {
|
||||
return &GetIngestForbidden{}
|
||||
}
|
||||
|
||||
/* GetIngestForbidden describes a response with status code 403, with default header values.
|
||||
|
||||
Access forbidden, account lacks access
|
||||
*/
|
||||
type GetIngestForbidden struct {
|
||||
AccessControlAllowOrigin string
|
||||
|
||||
Payload *devops_models.Error
|
||||
}
|
||||
|
||||
func (o *GetIngestForbidden) Error() string {
|
||||
return fmt.Sprintf("[GET /ingests/{ingestIdPath}][%d] getIngestForbidden %+v", 403, o.Payload)
|
||||
}
|
||||
func (o *GetIngestForbidden) GetPayload() *devops_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *GetIngestForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
// hydrates response header Access-Control-Allow-Origin
|
||||
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
|
||||
|
||||
if hdrAccessControlAllowOrigin != "" {
|
||||
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
|
||||
}
|
||||
|
||||
o.Payload = new(devops_models.Error)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewGetIngestNotFound creates a GetIngestNotFound with default headers values
|
||||
func NewGetIngestNotFound() *GetIngestNotFound {
|
||||
return &GetIngestNotFound{}
|
||||
}
|
||||
|
||||
/* GetIngestNotFound describes a response with status code 404, with default header values.
|
||||
|
||||
Resource was not found
|
||||
*/
|
||||
type GetIngestNotFound struct {
|
||||
AccessControlAllowOrigin string
|
||||
|
||||
Payload *devops_models.Error
|
||||
}
|
||||
|
||||
func (o *GetIngestNotFound) Error() string {
|
||||
return fmt.Sprintf("[GET /ingests/{ingestIdPath}][%d] getIngestNotFound %+v", 404, o.Payload)
|
||||
}
|
||||
func (o *GetIngestNotFound) GetPayload() *devops_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *GetIngestNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
// hydrates response header Access-Control-Allow-Origin
|
||||
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
|
||||
|
||||
if hdrAccessControlAllowOrigin != "" {
|
||||
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
|
||||
}
|
||||
|
||||
o.Payload = new(devops_models.Error)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewGetIngestUnprocessableEntity creates a GetIngestUnprocessableEntity with default headers values
|
||||
func NewGetIngestUnprocessableEntity() *GetIngestUnprocessableEntity {
|
||||
return &GetIngestUnprocessableEntity{}
|
||||
}
|
||||
|
||||
/* GetIngestUnprocessableEntity describes a response with status code 422, with default header values.
|
||||
|
||||
Unprocessable Entity, likely a bad parameter
|
||||
*/
|
||||
type GetIngestUnprocessableEntity struct {
|
||||
AccessControlAllowOrigin string
|
||||
CacheControl string
|
||||
|
||||
Payload *devops_models.Error
|
||||
}
|
||||
|
||||
func (o *GetIngestUnprocessableEntity) Error() string {
|
||||
return fmt.Sprintf("[GET /ingests/{ingestIdPath}][%d] getIngestUnprocessableEntity %+v", 422, o.Payload)
|
||||
}
|
||||
func (o *GetIngestUnprocessableEntity) GetPayload() *devops_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *GetIngestUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
// hydrates response header Access-Control-Allow-Origin
|
||||
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
|
||||
|
||||
if hdrAccessControlAllowOrigin != "" {
|
||||
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
|
||||
}
|
||||
|
||||
// hydrates response header Cache-Control
|
||||
hdrCacheControl := response.GetHeader("Cache-Control")
|
||||
|
||||
if hdrCacheControl != "" {
|
||||
o.CacheControl = hdrCacheControl
|
||||
}
|
||||
|
||||
o.Payload = new(devops_models.Error)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewGetIngestInternalServerError creates a GetIngestInternalServerError with default headers values
|
||||
func NewGetIngestInternalServerError() *GetIngestInternalServerError {
|
||||
return &GetIngestInternalServerError{}
|
||||
}
|
||||
|
||||
/* GetIngestInternalServerError describes a response with status code 500, with default header values.
|
||||
|
||||
Server Internal Error
|
||||
*/
|
||||
type GetIngestInternalServerError struct {
|
||||
AccessControlAllowOrigin string
|
||||
|
||||
Payload *devops_models.Error
|
||||
}
|
||||
|
||||
func (o *GetIngestInternalServerError) Error() string {
|
||||
return fmt.Sprintf("[GET /ingests/{ingestIdPath}][%d] getIngestInternalServerError %+v", 500, o.Payload)
|
||||
}
|
||||
func (o *GetIngestInternalServerError) GetPayload() *devops_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *GetIngestInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
// hydrates response header Access-Control-Allow-Origin
|
||||
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
|
||||
|
||||
if hdrAccessControlAllowOrigin != "" {
|
||||
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
|
||||
}
|
||||
|
||||
o.Payload = new(devops_models.Error)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
|
@ -1,130 +0,0 @@
|
|||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
// (c) 2012-2020 by Taxnexus, Inc.
|
||||
// All rights reserved worldwide.
|
||||
// Proprietary product; unlicensed use is not allowed
|
||||
|
||||
package ingest
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
// Editing this file might prove futile when you re-run the swagger generate command
|
||||
|
||||
import (
|
||||
"context"
|
||||
"net/http"
|
||||
"time"
|
||||
|
||||
"github.com/go-openapi/errors"
|
||||
"github.com/go-openapi/runtime"
|
||||
cr "github.com/go-openapi/runtime/client"
|
||||
"github.com/go-openapi/strfmt"
|
||||
)
|
||||
|
||||
// NewGetIngestsObservableParams creates a new GetIngestsObservableParams object,
|
||||
// with the default timeout for this client.
|
||||
//
|
||||
// Default values are not hydrated, since defaults are normally applied by the API server side.
|
||||
//
|
||||
// To enforce default values in parameter, use SetDefaults or WithDefaults.
|
||||
func NewGetIngestsObservableParams() *GetIngestsObservableParams {
|
||||
return &GetIngestsObservableParams{
|
||||
timeout: cr.DefaultTimeout,
|
||||
}
|
||||
}
|
||||
|
||||
// NewGetIngestsObservableParamsWithTimeout creates a new GetIngestsObservableParams object
|
||||
// with the ability to set a timeout on a request.
|
||||
func NewGetIngestsObservableParamsWithTimeout(timeout time.Duration) *GetIngestsObservableParams {
|
||||
return &GetIngestsObservableParams{
|
||||
timeout: timeout,
|
||||
}
|
||||
}
|
||||
|
||||
// NewGetIngestsObservableParamsWithContext creates a new GetIngestsObservableParams object
|
||||
// with the ability to set a context for a request.
|
||||
func NewGetIngestsObservableParamsWithContext(ctx context.Context) *GetIngestsObservableParams {
|
||||
return &GetIngestsObservableParams{
|
||||
Context: ctx,
|
||||
}
|
||||
}
|
||||
|
||||
// NewGetIngestsObservableParamsWithHTTPClient creates a new GetIngestsObservableParams object
|
||||
// with the ability to set a custom HTTPClient for a request.
|
||||
func NewGetIngestsObservableParamsWithHTTPClient(client *http.Client) *GetIngestsObservableParams {
|
||||
return &GetIngestsObservableParams{
|
||||
HTTPClient: client,
|
||||
}
|
||||
}
|
||||
|
||||
/* GetIngestsObservableParams contains all the parameters to send to the API endpoint
|
||||
for the get ingests observable operation.
|
||||
|
||||
Typically these are written to a http.Request.
|
||||
*/
|
||||
type GetIngestsObservableParams struct {
|
||||
timeout time.Duration
|
||||
Context context.Context
|
||||
HTTPClient *http.Client
|
||||
}
|
||||
|
||||
// WithDefaults hydrates default values in the get ingests observable params (not the query body).
|
||||
//
|
||||
// All values with no default are reset to their zero value.
|
||||
func (o *GetIngestsObservableParams) WithDefaults() *GetIngestsObservableParams {
|
||||
o.SetDefaults()
|
||||
return o
|
||||
}
|
||||
|
||||
// SetDefaults hydrates default values in the get ingests observable params (not the query body).
|
||||
//
|
||||
// All values with no default are reset to their zero value.
|
||||
func (o *GetIngestsObservableParams) SetDefaults() {
|
||||
// no default values defined for this parameter
|
||||
}
|
||||
|
||||
// WithTimeout adds the timeout to the get ingests observable params
|
||||
func (o *GetIngestsObservableParams) WithTimeout(timeout time.Duration) *GetIngestsObservableParams {
|
||||
o.SetTimeout(timeout)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetTimeout adds the timeout to the get ingests observable params
|
||||
func (o *GetIngestsObservableParams) SetTimeout(timeout time.Duration) {
|
||||
o.timeout = timeout
|
||||
}
|
||||
|
||||
// WithContext adds the context to the get ingests observable params
|
||||
func (o *GetIngestsObservableParams) WithContext(ctx context.Context) *GetIngestsObservableParams {
|
||||
o.SetContext(ctx)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetContext adds the context to the get ingests observable params
|
||||
func (o *GetIngestsObservableParams) SetContext(ctx context.Context) {
|
||||
o.Context = ctx
|
||||
}
|
||||
|
||||
// WithHTTPClient adds the HTTPClient to the get ingests observable params
|
||||
func (o *GetIngestsObservableParams) WithHTTPClient(client *http.Client) *GetIngestsObservableParams {
|
||||
o.SetHTTPClient(client)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetHTTPClient adds the HTTPClient to the get ingests observable params
|
||||
func (o *GetIngestsObservableParams) SetHTTPClient(client *http.Client) {
|
||||
o.HTTPClient = client
|
||||
}
|
||||
|
||||
// WriteToRequest writes these params to a swagger request
|
||||
func (o *GetIngestsObservableParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
|
||||
|
||||
if err := r.SetTimeout(o.timeout); err != nil {
|
||||
return err
|
||||
}
|
||||
var res []error
|
||||
|
||||
if len(res) > 0 {
|
||||
return errors.CompositeValidationError(res...)
|
||||
}
|
||||
return nil
|
||||
}
|
|
@ -1,337 +0,0 @@
|
|||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
// (c) 2012-2020 by Taxnexus, Inc.
|
||||
// All rights reserved worldwide.
|
||||
// Proprietary product; unlicensed use is not allowed
|
||||
|
||||
package ingest
|
||||
|
||||
// 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"
|
||||
|
||||
"code.tnxs.net/vernonkeenan/lib/api/devops/devops_models"
|
||||
)
|
||||
|
||||
// GetIngestsObservableReader is a Reader for the GetIngestsObservable structure.
|
||||
type GetIngestsObservableReader struct {
|
||||
formats strfmt.Registry
|
||||
}
|
||||
|
||||
// ReadResponse reads a server response into the received o.
|
||||
func (o *GetIngestsObservableReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
|
||||
switch response.Code() {
|
||||
case 200:
|
||||
result := NewGetIngestsObservableOK()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return result, nil
|
||||
case 401:
|
||||
result := NewGetIngestsObservableUnauthorized()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return nil, result
|
||||
case 403:
|
||||
result := NewGetIngestsObservableForbidden()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return nil, result
|
||||
case 404:
|
||||
result := NewGetIngestsObservableNotFound()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return nil, result
|
||||
case 422:
|
||||
result := NewGetIngestsObservableUnprocessableEntity()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return nil, result
|
||||
case 500:
|
||||
result := NewGetIngestsObservableInternalServerError()
|
||||
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())
|
||||
}
|
||||
}
|
||||
|
||||
// NewGetIngestsObservableOK creates a GetIngestsObservableOK with default headers values
|
||||
func NewGetIngestsObservableOK() *GetIngestsObservableOK {
|
||||
return &GetIngestsObservableOK{}
|
||||
}
|
||||
|
||||
/* GetIngestsObservableOK describes a response with status code 200, with default header values.
|
||||
|
||||
Single Ingest record response
|
||||
*/
|
||||
type GetIngestsObservableOK struct {
|
||||
AccessControlAllowOrigin string
|
||||
CacheControl string
|
||||
|
||||
Payload []*devops_models.Ingest
|
||||
}
|
||||
|
||||
func (o *GetIngestsObservableOK) Error() string {
|
||||
return fmt.Sprintf("[GET /ingests/observable][%d] getIngestsObservableOK %+v", 200, o.Payload)
|
||||
}
|
||||
func (o *GetIngestsObservableOK) GetPayload() []*devops_models.Ingest {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *GetIngestsObservableOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
// hydrates response header Access-Control-Allow-Origin
|
||||
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
|
||||
|
||||
if hdrAccessControlAllowOrigin != "" {
|
||||
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
|
||||
}
|
||||
|
||||
// hydrates response header Cache-Control
|
||||
hdrCacheControl := response.GetHeader("Cache-Control")
|
||||
|
||||
if hdrCacheControl != "" {
|
||||
o.CacheControl = hdrCacheControl
|
||||
}
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewGetIngestsObservableUnauthorized creates a GetIngestsObservableUnauthorized with default headers values
|
||||
func NewGetIngestsObservableUnauthorized() *GetIngestsObservableUnauthorized {
|
||||
return &GetIngestsObservableUnauthorized{}
|
||||
}
|
||||
|
||||
/* GetIngestsObservableUnauthorized describes a response with status code 401, with default header values.
|
||||
|
||||
Access Unauthorized, invalid API-KEY was used
|
||||
*/
|
||||
type GetIngestsObservableUnauthorized struct {
|
||||
AccessControlAllowOrigin string
|
||||
CacheControl string
|
||||
|
||||
Payload *devops_models.Error
|
||||
}
|
||||
|
||||
func (o *GetIngestsObservableUnauthorized) Error() string {
|
||||
return fmt.Sprintf("[GET /ingests/observable][%d] getIngestsObservableUnauthorized %+v", 401, o.Payload)
|
||||
}
|
||||
func (o *GetIngestsObservableUnauthorized) GetPayload() *devops_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *GetIngestsObservableUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
// hydrates response header Access-Control-Allow-Origin
|
||||
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
|
||||
|
||||
if hdrAccessControlAllowOrigin != "" {
|
||||
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
|
||||
}
|
||||
|
||||
// hydrates response header Cache-Control
|
||||
hdrCacheControl := response.GetHeader("Cache-Control")
|
||||
|
||||
if hdrCacheControl != "" {
|
||||
o.CacheControl = hdrCacheControl
|
||||
}
|
||||
|
||||
o.Payload = new(devops_models.Error)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewGetIngestsObservableForbidden creates a GetIngestsObservableForbidden with default headers values
|
||||
func NewGetIngestsObservableForbidden() *GetIngestsObservableForbidden {
|
||||
return &GetIngestsObservableForbidden{}
|
||||
}
|
||||
|
||||
/* GetIngestsObservableForbidden describes a response with status code 403, with default header values.
|
||||
|
||||
Access forbidden, account lacks access
|
||||
*/
|
||||
type GetIngestsObservableForbidden struct {
|
||||
AccessControlAllowOrigin string
|
||||
|
||||
Payload *devops_models.Error
|
||||
}
|
||||
|
||||
func (o *GetIngestsObservableForbidden) Error() string {
|
||||
return fmt.Sprintf("[GET /ingests/observable][%d] getIngestsObservableForbidden %+v", 403, o.Payload)
|
||||
}
|
||||
func (o *GetIngestsObservableForbidden) GetPayload() *devops_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *GetIngestsObservableForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
// hydrates response header Access-Control-Allow-Origin
|
||||
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
|
||||
|
||||
if hdrAccessControlAllowOrigin != "" {
|
||||
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
|
||||
}
|
||||
|
||||
o.Payload = new(devops_models.Error)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewGetIngestsObservableNotFound creates a GetIngestsObservableNotFound with default headers values
|
||||
func NewGetIngestsObservableNotFound() *GetIngestsObservableNotFound {
|
||||
return &GetIngestsObservableNotFound{}
|
||||
}
|
||||
|
||||
/* GetIngestsObservableNotFound describes a response with status code 404, with default header values.
|
||||
|
||||
Resource was not found
|
||||
*/
|
||||
type GetIngestsObservableNotFound struct {
|
||||
AccessControlAllowOrigin string
|
||||
|
||||
Payload *devops_models.Error
|
||||
}
|
||||
|
||||
func (o *GetIngestsObservableNotFound) Error() string {
|
||||
return fmt.Sprintf("[GET /ingests/observable][%d] getIngestsObservableNotFound %+v", 404, o.Payload)
|
||||
}
|
||||
func (o *GetIngestsObservableNotFound) GetPayload() *devops_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *GetIngestsObservableNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
// hydrates response header Access-Control-Allow-Origin
|
||||
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
|
||||
|
||||
if hdrAccessControlAllowOrigin != "" {
|
||||
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
|
||||
}
|
||||
|
||||
o.Payload = new(devops_models.Error)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewGetIngestsObservableUnprocessableEntity creates a GetIngestsObservableUnprocessableEntity with default headers values
|
||||
func NewGetIngestsObservableUnprocessableEntity() *GetIngestsObservableUnprocessableEntity {
|
||||
return &GetIngestsObservableUnprocessableEntity{}
|
||||
}
|
||||
|
||||
/* GetIngestsObservableUnprocessableEntity describes a response with status code 422, with default header values.
|
||||
|
||||
Unprocessable Entity, likely a bad parameter
|
||||
*/
|
||||
type GetIngestsObservableUnprocessableEntity struct {
|
||||
AccessControlAllowOrigin string
|
||||
CacheControl string
|
||||
|
||||
Payload *devops_models.Error
|
||||
}
|
||||
|
||||
func (o *GetIngestsObservableUnprocessableEntity) Error() string {
|
||||
return fmt.Sprintf("[GET /ingests/observable][%d] getIngestsObservableUnprocessableEntity %+v", 422, o.Payload)
|
||||
}
|
||||
func (o *GetIngestsObservableUnprocessableEntity) GetPayload() *devops_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *GetIngestsObservableUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
// hydrates response header Access-Control-Allow-Origin
|
||||
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
|
||||
|
||||
if hdrAccessControlAllowOrigin != "" {
|
||||
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
|
||||
}
|
||||
|
||||
// hydrates response header Cache-Control
|
||||
hdrCacheControl := response.GetHeader("Cache-Control")
|
||||
|
||||
if hdrCacheControl != "" {
|
||||
o.CacheControl = hdrCacheControl
|
||||
}
|
||||
|
||||
o.Payload = new(devops_models.Error)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewGetIngestsObservableInternalServerError creates a GetIngestsObservableInternalServerError with default headers values
|
||||
func NewGetIngestsObservableInternalServerError() *GetIngestsObservableInternalServerError {
|
||||
return &GetIngestsObservableInternalServerError{}
|
||||
}
|
||||
|
||||
/* GetIngestsObservableInternalServerError describes a response with status code 500, with default header values.
|
||||
|
||||
Server Internal Error
|
||||
*/
|
||||
type GetIngestsObservableInternalServerError struct {
|
||||
AccessControlAllowOrigin string
|
||||
|
||||
Payload *devops_models.Error
|
||||
}
|
||||
|
||||
func (o *GetIngestsObservableInternalServerError) Error() string {
|
||||
return fmt.Sprintf("[GET /ingests/observable][%d] getIngestsObservableInternalServerError %+v", 500, o.Payload)
|
||||
}
|
||||
func (o *GetIngestsObservableInternalServerError) GetPayload() *devops_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *GetIngestsObservableInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
// hydrates response header Access-Control-Allow-Origin
|
||||
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
|
||||
|
||||
if hdrAccessControlAllowOrigin != "" {
|
||||
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
|
||||
}
|
||||
|
||||
o.Payload = new(devops_models.Error)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
|
@ -1,306 +0,0 @@
|
|||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
// (c) 2012-2020 by Taxnexus, Inc.
|
||||
// All rights reserved worldwide.
|
||||
// Proprietary product; unlicensed use is not allowed
|
||||
|
||||
package ingest
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
// Editing this file might prove futile when you re-run the swagger generate command
|
||||
|
||||
import (
|
||||
"context"
|
||||
"net/http"
|
||||
"time"
|
||||
|
||||
"github.com/go-openapi/errors"
|
||||
"github.com/go-openapi/runtime"
|
||||
cr "github.com/go-openapi/runtime/client"
|
||||
"github.com/go-openapi/strfmt"
|
||||
"github.com/go-openapi/swag"
|
||||
)
|
||||
|
||||
// NewGetIngestsParams creates a new GetIngestsParams object,
|
||||
// with the default timeout for this client.
|
||||
//
|
||||
// Default values are not hydrated, since defaults are normally applied by the API server side.
|
||||
//
|
||||
// To enforce default values in parameter, use SetDefaults or WithDefaults.
|
||||
func NewGetIngestsParams() *GetIngestsParams {
|
||||
return &GetIngestsParams{
|
||||
timeout: cr.DefaultTimeout,
|
||||
}
|
||||
}
|
||||
|
||||
// NewGetIngestsParamsWithTimeout creates a new GetIngestsParams object
|
||||
// with the ability to set a timeout on a request.
|
||||
func NewGetIngestsParamsWithTimeout(timeout time.Duration) *GetIngestsParams {
|
||||
return &GetIngestsParams{
|
||||
timeout: timeout,
|
||||
}
|
||||
}
|
||||
|
||||
// NewGetIngestsParamsWithContext creates a new GetIngestsParams object
|
||||
// with the ability to set a context for a request.
|
||||
func NewGetIngestsParamsWithContext(ctx context.Context) *GetIngestsParams {
|
||||
return &GetIngestsParams{
|
||||
Context: ctx,
|
||||
}
|
||||
}
|
||||
|
||||
// NewGetIngestsParamsWithHTTPClient creates a new GetIngestsParams object
|
||||
// with the ability to set a custom HTTPClient for a request.
|
||||
func NewGetIngestsParamsWithHTTPClient(client *http.Client) *GetIngestsParams {
|
||||
return &GetIngestsParams{
|
||||
HTTPClient: client,
|
||||
}
|
||||
}
|
||||
|
||||
/* GetIngestsParams contains all the parameters to send to the API endpoint
|
||||
for the get ingests operation.
|
||||
|
||||
Typically these are written to a http.Request.
|
||||
*/
|
||||
type GetIngestsParams struct {
|
||||
|
||||
/* AccountID.
|
||||
|
||||
Taxnexus Record Id of an Account
|
||||
*/
|
||||
AccountID *string
|
||||
|
||||
/* CompanyID.
|
||||
|
||||
Taxnexus Record Id of a Company
|
||||
*/
|
||||
CompanyID *string
|
||||
|
||||
/* IngestID.
|
||||
|
||||
Taxnexus Record Id of an Ingest
|
||||
*/
|
||||
IngestID *string
|
||||
|
||||
/* Limit.
|
||||
|
||||
How many objects to return at one time
|
||||
|
||||
Format: int64
|
||||
*/
|
||||
Limit *int64
|
||||
|
||||
/* Offset.
|
||||
|
||||
How many objects to skip? (default 0)
|
||||
|
||||
Format: int64
|
||||
*/
|
||||
Offset *int64
|
||||
|
||||
timeout time.Duration
|
||||
Context context.Context
|
||||
HTTPClient *http.Client
|
||||
}
|
||||
|
||||
// WithDefaults hydrates default values in the get ingests params (not the query body).
|
||||
//
|
||||
// All values with no default are reset to their zero value.
|
||||
func (o *GetIngestsParams) WithDefaults() *GetIngestsParams {
|
||||
o.SetDefaults()
|
||||
return o
|
||||
}
|
||||
|
||||
// SetDefaults hydrates default values in the get ingests params (not the query body).
|
||||
//
|
||||
// All values with no default are reset to their zero value.
|
||||
func (o *GetIngestsParams) SetDefaults() {
|
||||
// no default values defined for this parameter
|
||||
}
|
||||
|
||||
// WithTimeout adds the timeout to the get ingests params
|
||||
func (o *GetIngestsParams) WithTimeout(timeout time.Duration) *GetIngestsParams {
|
||||
o.SetTimeout(timeout)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetTimeout adds the timeout to the get ingests params
|
||||
func (o *GetIngestsParams) SetTimeout(timeout time.Duration) {
|
||||
o.timeout = timeout
|
||||
}
|
||||
|
||||
// WithContext adds the context to the get ingests params
|
||||
func (o *GetIngestsParams) WithContext(ctx context.Context) *GetIngestsParams {
|
||||
o.SetContext(ctx)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetContext adds the context to the get ingests params
|
||||
func (o *GetIngestsParams) SetContext(ctx context.Context) {
|
||||
o.Context = ctx
|
||||
}
|
||||
|
||||
// WithHTTPClient adds the HTTPClient to the get ingests params
|
||||
func (o *GetIngestsParams) WithHTTPClient(client *http.Client) *GetIngestsParams {
|
||||
o.SetHTTPClient(client)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetHTTPClient adds the HTTPClient to the get ingests params
|
||||
func (o *GetIngestsParams) SetHTTPClient(client *http.Client) {
|
||||
o.HTTPClient = client
|
||||
}
|
||||
|
||||
// WithAccountID adds the accountID to the get ingests params
|
||||
func (o *GetIngestsParams) WithAccountID(accountID *string) *GetIngestsParams {
|
||||
o.SetAccountID(accountID)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetAccountID adds the accountId to the get ingests params
|
||||
func (o *GetIngestsParams) SetAccountID(accountID *string) {
|
||||
o.AccountID = accountID
|
||||
}
|
||||
|
||||
// WithCompanyID adds the companyID to the get ingests params
|
||||
func (o *GetIngestsParams) WithCompanyID(companyID *string) *GetIngestsParams {
|
||||
o.SetCompanyID(companyID)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetCompanyID adds the companyId to the get ingests params
|
||||
func (o *GetIngestsParams) SetCompanyID(companyID *string) {
|
||||
o.CompanyID = companyID
|
||||
}
|
||||
|
||||
// WithIngestID adds the ingestID to the get ingests params
|
||||
func (o *GetIngestsParams) WithIngestID(ingestID *string) *GetIngestsParams {
|
||||
o.SetIngestID(ingestID)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetIngestID adds the ingestId to the get ingests params
|
||||
func (o *GetIngestsParams) SetIngestID(ingestID *string) {
|
||||
o.IngestID = ingestID
|
||||
}
|
||||
|
||||
// WithLimit adds the limit to the get ingests params
|
||||
func (o *GetIngestsParams) WithLimit(limit *int64) *GetIngestsParams {
|
||||
o.SetLimit(limit)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetLimit adds the limit to the get ingests params
|
||||
func (o *GetIngestsParams) SetLimit(limit *int64) {
|
||||
o.Limit = limit
|
||||
}
|
||||
|
||||
// WithOffset adds the offset to the get ingests params
|
||||
func (o *GetIngestsParams) WithOffset(offset *int64) *GetIngestsParams {
|
||||
o.SetOffset(offset)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetOffset adds the offset to the get ingests params
|
||||
func (o *GetIngestsParams) SetOffset(offset *int64) {
|
||||
o.Offset = offset
|
||||
}
|
||||
|
||||
// WriteToRequest writes these params to a swagger request
|
||||
func (o *GetIngestsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
|
||||
|
||||
if err := r.SetTimeout(o.timeout); err != nil {
|
||||
return err
|
||||
}
|
||||
var res []error
|
||||
|
||||
if o.AccountID != nil {
|
||||
|
||||
// query param accountId
|
||||
var qrAccountID string
|
||||
|
||||
if o.AccountID != nil {
|
||||
qrAccountID = *o.AccountID
|
||||
}
|
||||
qAccountID := qrAccountID
|
||||
if qAccountID != "" {
|
||||
|
||||
if err := r.SetQueryParam("accountId", qAccountID); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if o.CompanyID != nil {
|
||||
|
||||
// query param companyId
|
||||
var qrCompanyID string
|
||||
|
||||
if o.CompanyID != nil {
|
||||
qrCompanyID = *o.CompanyID
|
||||
}
|
||||
qCompanyID := qrCompanyID
|
||||
if qCompanyID != "" {
|
||||
|
||||
if err := r.SetQueryParam("companyId", qCompanyID); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if o.IngestID != nil {
|
||||
|
||||
// query param ingestId
|
||||
var qrIngestID string
|
||||
|
||||
if o.IngestID != nil {
|
||||
qrIngestID = *o.IngestID
|
||||
}
|
||||
qIngestID := qrIngestID
|
||||
if qIngestID != "" {
|
||||
|
||||
if err := r.SetQueryParam("ingestId", qIngestID); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if o.Limit != nil {
|
||||
|
||||
// query param limit
|
||||
var qrLimit int64
|
||||
|
||||
if o.Limit != nil {
|
||||
qrLimit = *o.Limit
|
||||
}
|
||||
qLimit := swag.FormatInt64(qrLimit)
|
||||
if qLimit != "" {
|
||||
|
||||
if err := r.SetQueryParam("limit", qLimit); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if o.Offset != nil {
|
||||
|
||||
// query param offset
|
||||
var qrOffset int64
|
||||
|
||||
if o.Offset != nil {
|
||||
qrOffset = *o.Offset
|
||||
}
|
||||
qOffset := swag.FormatInt64(qrOffset)
|
||||
if qOffset != "" {
|
||||
|
||||
if err := r.SetQueryParam("offset", qOffset); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if len(res) > 0 {
|
||||
return errors.CompositeValidationError(res...)
|
||||
}
|
||||
return nil
|
||||
}
|
|
@ -1,339 +0,0 @@
|
|||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
// (c) 2012-2020 by Taxnexus, Inc.
|
||||
// All rights reserved worldwide.
|
||||
// Proprietary product; unlicensed use is not allowed
|
||||
|
||||
package ingest
|
||||
|
||||
// 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"
|
||||
|
||||
"code.tnxs.net/vernonkeenan/lib/api/devops/devops_models"
|
||||
)
|
||||
|
||||
// GetIngestsReader is a Reader for the GetIngests structure.
|
||||
type GetIngestsReader struct {
|
||||
formats strfmt.Registry
|
||||
}
|
||||
|
||||
// ReadResponse reads a server response into the received o.
|
||||
func (o *GetIngestsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
|
||||
switch response.Code() {
|
||||
case 200:
|
||||
result := NewGetIngestsOK()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return result, nil
|
||||
case 401:
|
||||
result := NewGetIngestsUnauthorized()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return nil, result
|
||||
case 403:
|
||||
result := NewGetIngestsForbidden()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return nil, result
|
||||
case 404:
|
||||
result := NewGetIngestsNotFound()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return nil, result
|
||||
case 422:
|
||||
result := NewGetIngestsUnprocessableEntity()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return nil, result
|
||||
case 500:
|
||||
result := NewGetIngestsInternalServerError()
|
||||
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())
|
||||
}
|
||||
}
|
||||
|
||||
// NewGetIngestsOK creates a GetIngestsOK with default headers values
|
||||
func NewGetIngestsOK() *GetIngestsOK {
|
||||
return &GetIngestsOK{}
|
||||
}
|
||||
|
||||
/* GetIngestsOK describes a response with status code 200, with default header values.
|
||||
|
||||
Taxnexus Response with Ingest objects
|
||||
*/
|
||||
type GetIngestsOK struct {
|
||||
AccessControlAllowOrigin string
|
||||
CacheControl string
|
||||
|
||||
Payload *devops_models.IngestResponse
|
||||
}
|
||||
|
||||
func (o *GetIngestsOK) Error() string {
|
||||
return fmt.Sprintf("[GET /ingests][%d] getIngestsOK %+v", 200, o.Payload)
|
||||
}
|
||||
func (o *GetIngestsOK) GetPayload() *devops_models.IngestResponse {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *GetIngestsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
// hydrates response header Access-Control-Allow-Origin
|
||||
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
|
||||
|
||||
if hdrAccessControlAllowOrigin != "" {
|
||||
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
|
||||
}
|
||||
|
||||
// hydrates response header Cache-Control
|
||||
hdrCacheControl := response.GetHeader("Cache-Control")
|
||||
|
||||
if hdrCacheControl != "" {
|
||||
o.CacheControl = hdrCacheControl
|
||||
}
|
||||
|
||||
o.Payload = new(devops_models.IngestResponse)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewGetIngestsUnauthorized creates a GetIngestsUnauthorized with default headers values
|
||||
func NewGetIngestsUnauthorized() *GetIngestsUnauthorized {
|
||||
return &GetIngestsUnauthorized{}
|
||||
}
|
||||
|
||||
/* GetIngestsUnauthorized describes a response with status code 401, with default header values.
|
||||
|
||||
Access Unauthorized, invalid API-KEY was used
|
||||
*/
|
||||
type GetIngestsUnauthorized struct {
|
||||
AccessControlAllowOrigin string
|
||||
CacheControl string
|
||||
|
||||
Payload *devops_models.Error
|
||||
}
|
||||
|
||||
func (o *GetIngestsUnauthorized) Error() string {
|
||||
return fmt.Sprintf("[GET /ingests][%d] getIngestsUnauthorized %+v", 401, o.Payload)
|
||||
}
|
||||
func (o *GetIngestsUnauthorized) GetPayload() *devops_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *GetIngestsUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
// hydrates response header Access-Control-Allow-Origin
|
||||
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
|
||||
|
||||
if hdrAccessControlAllowOrigin != "" {
|
||||
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
|
||||
}
|
||||
|
||||
// hydrates response header Cache-Control
|
||||
hdrCacheControl := response.GetHeader("Cache-Control")
|
||||
|
||||
if hdrCacheControl != "" {
|
||||
o.CacheControl = hdrCacheControl
|
||||
}
|
||||
|
||||
o.Payload = new(devops_models.Error)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewGetIngestsForbidden creates a GetIngestsForbidden with default headers values
|
||||
func NewGetIngestsForbidden() *GetIngestsForbidden {
|
||||
return &GetIngestsForbidden{}
|
||||
}
|
||||
|
||||
/* GetIngestsForbidden describes a response with status code 403, with default header values.
|
||||
|
||||
Access forbidden, account lacks access
|
||||
*/
|
||||
type GetIngestsForbidden struct {
|
||||
AccessControlAllowOrigin string
|
||||
|
||||
Payload *devops_models.Error
|
||||
}
|
||||
|
||||
func (o *GetIngestsForbidden) Error() string {
|
||||
return fmt.Sprintf("[GET /ingests][%d] getIngestsForbidden %+v", 403, o.Payload)
|
||||
}
|
||||
func (o *GetIngestsForbidden) GetPayload() *devops_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *GetIngestsForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
// hydrates response header Access-Control-Allow-Origin
|
||||
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
|
||||
|
||||
if hdrAccessControlAllowOrigin != "" {
|
||||
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
|
||||
}
|
||||
|
||||
o.Payload = new(devops_models.Error)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewGetIngestsNotFound creates a GetIngestsNotFound with default headers values
|
||||
func NewGetIngestsNotFound() *GetIngestsNotFound {
|
||||
return &GetIngestsNotFound{}
|
||||
}
|
||||
|
||||
/* GetIngestsNotFound describes a response with status code 404, with default header values.
|
||||
|
||||
Resource was not found
|
||||
*/
|
||||
type GetIngestsNotFound struct {
|
||||
AccessControlAllowOrigin string
|
||||
|
||||
Payload *devops_models.Error
|
||||
}
|
||||
|
||||
func (o *GetIngestsNotFound) Error() string {
|
||||
return fmt.Sprintf("[GET /ingests][%d] getIngestsNotFound %+v", 404, o.Payload)
|
||||
}
|
||||
func (o *GetIngestsNotFound) GetPayload() *devops_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *GetIngestsNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
// hydrates response header Access-Control-Allow-Origin
|
||||
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
|
||||
|
||||
if hdrAccessControlAllowOrigin != "" {
|
||||
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
|
||||
}
|
||||
|
||||
o.Payload = new(devops_models.Error)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewGetIngestsUnprocessableEntity creates a GetIngestsUnprocessableEntity with default headers values
|
||||
func NewGetIngestsUnprocessableEntity() *GetIngestsUnprocessableEntity {
|
||||
return &GetIngestsUnprocessableEntity{}
|
||||
}
|
||||
|
||||
/* GetIngestsUnprocessableEntity describes a response with status code 422, with default header values.
|
||||
|
||||
Unprocessable Entity, likely a bad parameter
|
||||
*/
|
||||
type GetIngestsUnprocessableEntity struct {
|
||||
AccessControlAllowOrigin string
|
||||
CacheControl string
|
||||
|
||||
Payload *devops_models.Error
|
||||
}
|
||||
|
||||
func (o *GetIngestsUnprocessableEntity) Error() string {
|
||||
return fmt.Sprintf("[GET /ingests][%d] getIngestsUnprocessableEntity %+v", 422, o.Payload)
|
||||
}
|
||||
func (o *GetIngestsUnprocessableEntity) GetPayload() *devops_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *GetIngestsUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
// hydrates response header Access-Control-Allow-Origin
|
||||
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
|
||||
|
||||
if hdrAccessControlAllowOrigin != "" {
|
||||
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
|
||||
}
|
||||
|
||||
// hydrates response header Cache-Control
|
||||
hdrCacheControl := response.GetHeader("Cache-Control")
|
||||
|
||||
if hdrCacheControl != "" {
|
||||
o.CacheControl = hdrCacheControl
|
||||
}
|
||||
|
||||
o.Payload = new(devops_models.Error)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewGetIngestsInternalServerError creates a GetIngestsInternalServerError with default headers values
|
||||
func NewGetIngestsInternalServerError() *GetIngestsInternalServerError {
|
||||
return &GetIngestsInternalServerError{}
|
||||
}
|
||||
|
||||
/* GetIngestsInternalServerError describes a response with status code 500, with default header values.
|
||||
|
||||
Server Internal Error
|
||||
*/
|
||||
type GetIngestsInternalServerError struct {
|
||||
AccessControlAllowOrigin string
|
||||
|
||||
Payload *devops_models.Error
|
||||
}
|
||||
|
||||
func (o *GetIngestsInternalServerError) Error() string {
|
||||
return fmt.Sprintf("[GET /ingests][%d] getIngestsInternalServerError %+v", 500, o.Payload)
|
||||
}
|
||||
func (o *GetIngestsInternalServerError) GetPayload() *devops_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *GetIngestsInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
// hydrates response header Access-Control-Allow-Origin
|
||||
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
|
||||
|
||||
if hdrAccessControlAllowOrigin != "" {
|
||||
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
|
||||
}
|
||||
|
||||
o.Payload = new(devops_models.Error)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
|
@ -1,258 +0,0 @@
|
|||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
// (c) 2012-2020 by Taxnexus, Inc.
|
||||
// All rights reserved worldwide.
|
||||
// Proprietary product; unlicensed use is not allowed
|
||||
|
||||
package ingest
|
||||
|
||||
// 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"
|
||||
)
|
||||
|
||||
// New creates a new ingest API client.
|
||||
func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService {
|
||||
return &Client{transport: transport, formats: formats}
|
||||
}
|
||||
|
||||
/*
|
||||
Client for ingest API
|
||||
*/
|
||||
type Client struct {
|
||||
transport runtime.ClientTransport
|
||||
formats strfmt.Registry
|
||||
}
|
||||
|
||||
// ClientOption is the option for Client methods
|
||||
type ClientOption func(*runtime.ClientOperation)
|
||||
|
||||
// ClientService is the interface for Client methods
|
||||
type ClientService interface {
|
||||
GetIngest(params *GetIngestParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetIngestOK, error)
|
||||
|
||||
GetIngests(params *GetIngestsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetIngestsOK, error)
|
||||
|
||||
GetIngestsObservable(params *GetIngestsObservableParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetIngestsObservableOK, error)
|
||||
|
||||
PostIngests(params *PostIngestsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PostIngestsOK, error)
|
||||
|
||||
PutIngests(params *PutIngestsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PutIngestsOK, error)
|
||||
|
||||
SetTransport(transport runtime.ClientTransport)
|
||||
}
|
||||
|
||||
/*
|
||||
GetIngest gets a single ingest object
|
||||
|
||||
Return a single Ingest object from datastore as a Singleton
|
||||
*/
|
||||
func (a *Client) GetIngest(params *GetIngestParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetIngestOK, error) {
|
||||
// TODO: Validate the params before sending
|
||||
if params == nil {
|
||||
params = NewGetIngestParams()
|
||||
}
|
||||
op := &runtime.ClientOperation{
|
||||
ID: "getIngest",
|
||||
Method: "GET",
|
||||
PathPattern: "/ingests/{ingestIdPath}",
|
||||
ProducesMediaTypes: []string{"application/json"},
|
||||
ConsumesMediaTypes: []string{"application/json"},
|
||||
Schemes: []string{"http"},
|
||||
Params: params,
|
||||
Reader: &GetIngestReader{formats: a.formats},
|
||||
AuthInfo: authInfo,
|
||||
Context: params.Context,
|
||||
Client: params.HTTPClient,
|
||||
}
|
||||
for _, opt := range opts {
|
||||
opt(op)
|
||||
}
|
||||
|
||||
result, err := a.transport.Submit(op)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
success, ok := result.(*GetIngestOK)
|
||||
if ok {
|
||||
return success, nil
|
||||
}
|
||||
// unexpected success response
|
||||
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
||||
msg := fmt.Sprintf("unexpected success response for getIngest: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||||
panic(msg)
|
||||
}
|
||||
|
||||
/*
|
||||
GetIngests gets a list ingests
|
||||
|
||||
Return a list of Ingest records
|
||||
*/
|
||||
func (a *Client) GetIngests(params *GetIngestsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetIngestsOK, error) {
|
||||
// TODO: Validate the params before sending
|
||||
if params == nil {
|
||||
params = NewGetIngestsParams()
|
||||
}
|
||||
op := &runtime.ClientOperation{
|
||||
ID: "getIngests",
|
||||
Method: "GET",
|
||||
PathPattern: "/ingests",
|
||||
ProducesMediaTypes: []string{"application/json"},
|
||||
ConsumesMediaTypes: []string{"application/json"},
|
||||
Schemes: []string{"http"},
|
||||
Params: params,
|
||||
Reader: &GetIngestsReader{formats: a.formats},
|
||||
AuthInfo: authInfo,
|
||||
Context: params.Context,
|
||||
Client: params.HTTPClient,
|
||||
}
|
||||
for _, opt := range opts {
|
||||
opt(op)
|
||||
}
|
||||
|
||||
result, err := a.transport.Submit(op)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
success, ok := result.(*GetIngestsOK)
|
||||
if ok {
|
||||
return success, nil
|
||||
}
|
||||
// unexpected success response
|
||||
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
||||
msg := fmt.Sprintf("unexpected success response for getIngests: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||||
panic(msg)
|
||||
}
|
||||
|
||||
/*
|
||||
GetIngestsObservable gets ingests in an observable array
|
||||
|
||||
Returns a Ingest retrieval in a observable array
|
||||
*/
|
||||
func (a *Client) GetIngestsObservable(params *GetIngestsObservableParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetIngestsObservableOK, error) {
|
||||
// TODO: Validate the params before sending
|
||||
if params == nil {
|
||||
params = NewGetIngestsObservableParams()
|
||||
}
|
||||
op := &runtime.ClientOperation{
|
||||
ID: "getIngestsObservable",
|
||||
Method: "GET",
|
||||
PathPattern: "/ingests/observable",
|
||||
ProducesMediaTypes: []string{"application/json"},
|
||||
ConsumesMediaTypes: []string{"application/json"},
|
||||
Schemes: []string{"http"},
|
||||
Params: params,
|
||||
Reader: &GetIngestsObservableReader{formats: a.formats},
|
||||
AuthInfo: authInfo,
|
||||
Context: params.Context,
|
||||
Client: params.HTTPClient,
|
||||
}
|
||||
for _, opt := range opts {
|
||||
opt(op)
|
||||
}
|
||||
|
||||
result, err := a.transport.Submit(op)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
success, ok := result.(*GetIngestsObservableOK)
|
||||
if ok {
|
||||
return success, nil
|
||||
}
|
||||
// unexpected success response
|
||||
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
||||
msg := fmt.Sprintf("unexpected success response for getIngestsObservable: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||||
panic(msg)
|
||||
}
|
||||
|
||||
/*
|
||||
PostIngests creates new ingests
|
||||
|
||||
Create new Ingests
|
||||
*/
|
||||
func (a *Client) PostIngests(params *PostIngestsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PostIngestsOK, error) {
|
||||
// TODO: Validate the params before sending
|
||||
if params == nil {
|
||||
params = NewPostIngestsParams()
|
||||
}
|
||||
op := &runtime.ClientOperation{
|
||||
ID: "postIngests",
|
||||
Method: "POST",
|
||||
PathPattern: "/ingests",
|
||||
ProducesMediaTypes: []string{"application/json"},
|
||||
ConsumesMediaTypes: []string{"application/json"},
|
||||
Schemes: []string{"http"},
|
||||
Params: params,
|
||||
Reader: &PostIngestsReader{formats: a.formats},
|
||||
AuthInfo: authInfo,
|
||||
Context: params.Context,
|
||||
Client: params.HTTPClient,
|
||||
}
|
||||
for _, opt := range opts {
|
||||
opt(op)
|
||||
}
|
||||
|
||||
result, err := a.transport.Submit(op)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
success, ok := result.(*PostIngestsOK)
|
||||
if ok {
|
||||
return success, nil
|
||||
}
|
||||
// unexpected success response
|
||||
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
||||
msg := fmt.Sprintf("unexpected success response for postIngests: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||||
panic(msg)
|
||||
}
|
||||
|
||||
/*
|
||||
PutIngests updates ingests
|
||||
|
||||
Update Ingests
|
||||
*/
|
||||
func (a *Client) PutIngests(params *PutIngestsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PutIngestsOK, error) {
|
||||
// TODO: Validate the params before sending
|
||||
if params == nil {
|
||||
params = NewPutIngestsParams()
|
||||
}
|
||||
op := &runtime.ClientOperation{
|
||||
ID: "putIngests",
|
||||
Method: "PUT",
|
||||
PathPattern: "/ingests",
|
||||
ProducesMediaTypes: []string{"application/json"},
|
||||
ConsumesMediaTypes: []string{"application/json"},
|
||||
Schemes: []string{"http"},
|
||||
Params: params,
|
||||
Reader: &PutIngestsReader{formats: a.formats},
|
||||
AuthInfo: authInfo,
|
||||
Context: params.Context,
|
||||
Client: params.HTTPClient,
|
||||
}
|
||||
for _, opt := range opts {
|
||||
opt(op)
|
||||
}
|
||||
|
||||
result, err := a.transport.Submit(op)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
success, ok := result.(*PutIngestsOK)
|
||||
if ok {
|
||||
return success, nil
|
||||
}
|
||||
// unexpected success response
|
||||
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
||||
msg := fmt.Sprintf("unexpected success response for putIngests: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||||
panic(msg)
|
||||
}
|
||||
|
||||
// SetTransport changes the transport on the client
|
||||
func (a *Client) SetTransport(transport runtime.ClientTransport) {
|
||||
a.transport = transport
|
||||
}
|
|
@ -1,155 +0,0 @@
|
|||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
// (c) 2012-2020 by Taxnexus, Inc.
|
||||
// All rights reserved worldwide.
|
||||
// Proprietary product; unlicensed use is not allowed
|
||||
|
||||
package ingest
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
// Editing this file might prove futile when you re-run the swagger generate command
|
||||
|
||||
import (
|
||||
"context"
|
||||
"net/http"
|
||||
"time"
|
||||
|
||||
"github.com/go-openapi/errors"
|
||||
"github.com/go-openapi/runtime"
|
||||
cr "github.com/go-openapi/runtime/client"
|
||||
"github.com/go-openapi/strfmt"
|
||||
|
||||
"code.tnxs.net/vernonkeenan/lib/api/devops/devops_models"
|
||||
)
|
||||
|
||||
// NewPostIngestsParams creates a new PostIngestsParams object,
|
||||
// with the default timeout for this client.
|
||||
//
|
||||
// Default values are not hydrated, since defaults are normally applied by the API server side.
|
||||
//
|
||||
// To enforce default values in parameter, use SetDefaults or WithDefaults.
|
||||
func NewPostIngestsParams() *PostIngestsParams {
|
||||
return &PostIngestsParams{
|
||||
timeout: cr.DefaultTimeout,
|
||||
}
|
||||
}
|
||||
|
||||
// NewPostIngestsParamsWithTimeout creates a new PostIngestsParams object
|
||||
// with the ability to set a timeout on a request.
|
||||
func NewPostIngestsParamsWithTimeout(timeout time.Duration) *PostIngestsParams {
|
||||
return &PostIngestsParams{
|
||||
timeout: timeout,
|
||||
}
|
||||
}
|
||||
|
||||
// NewPostIngestsParamsWithContext creates a new PostIngestsParams object
|
||||
// with the ability to set a context for a request.
|
||||
func NewPostIngestsParamsWithContext(ctx context.Context) *PostIngestsParams {
|
||||
return &PostIngestsParams{
|
||||
Context: ctx,
|
||||
}
|
||||
}
|
||||
|
||||
// NewPostIngestsParamsWithHTTPClient creates a new PostIngestsParams object
|
||||
// with the ability to set a custom HTTPClient for a request.
|
||||
func NewPostIngestsParamsWithHTTPClient(client *http.Client) *PostIngestsParams {
|
||||
return &PostIngestsParams{
|
||||
HTTPClient: client,
|
||||
}
|
||||
}
|
||||
|
||||
/* PostIngestsParams contains all the parameters to send to the API endpoint
|
||||
for the post ingests operation.
|
||||
|
||||
Typically these are written to a http.Request.
|
||||
*/
|
||||
type PostIngestsParams struct {
|
||||
|
||||
/* IngestRequest.
|
||||
|
||||
An array of Ingest records
|
||||
*/
|
||||
IngestRequest *devops_models.IngestRequest
|
||||
|
||||
timeout time.Duration
|
||||
Context context.Context
|
||||
HTTPClient *http.Client
|
||||
}
|
||||
|
||||
// WithDefaults hydrates default values in the post ingests params (not the query body).
|
||||
//
|
||||
// All values with no default are reset to their zero value.
|
||||
func (o *PostIngestsParams) WithDefaults() *PostIngestsParams {
|
||||
o.SetDefaults()
|
||||
return o
|
||||
}
|
||||
|
||||
// SetDefaults hydrates default values in the post ingests params (not the query body).
|
||||
//
|
||||
// All values with no default are reset to their zero value.
|
||||
func (o *PostIngestsParams) SetDefaults() {
|
||||
// no default values defined for this parameter
|
||||
}
|
||||
|
||||
// WithTimeout adds the timeout to the post ingests params
|
||||
func (o *PostIngestsParams) WithTimeout(timeout time.Duration) *PostIngestsParams {
|
||||
o.SetTimeout(timeout)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetTimeout adds the timeout to the post ingests params
|
||||
func (o *PostIngestsParams) SetTimeout(timeout time.Duration) {
|
||||
o.timeout = timeout
|
||||
}
|
||||
|
||||
// WithContext adds the context to the post ingests params
|
||||
func (o *PostIngestsParams) WithContext(ctx context.Context) *PostIngestsParams {
|
||||
o.SetContext(ctx)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetContext adds the context to the post ingests params
|
||||
func (o *PostIngestsParams) SetContext(ctx context.Context) {
|
||||
o.Context = ctx
|
||||
}
|
||||
|
||||
// WithHTTPClient adds the HTTPClient to the post ingests params
|
||||
func (o *PostIngestsParams) WithHTTPClient(client *http.Client) *PostIngestsParams {
|
||||
o.SetHTTPClient(client)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetHTTPClient adds the HTTPClient to the post ingests params
|
||||
func (o *PostIngestsParams) SetHTTPClient(client *http.Client) {
|
||||
o.HTTPClient = client
|
||||
}
|
||||
|
||||
// WithIngestRequest adds the ingestRequest to the post ingests params
|
||||
func (o *PostIngestsParams) WithIngestRequest(ingestRequest *devops_models.IngestRequest) *PostIngestsParams {
|
||||
o.SetIngestRequest(ingestRequest)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetIngestRequest adds the ingestRequest to the post ingests params
|
||||
func (o *PostIngestsParams) SetIngestRequest(ingestRequest *devops_models.IngestRequest) {
|
||||
o.IngestRequest = ingestRequest
|
||||
}
|
||||
|
||||
// WriteToRequest writes these params to a swagger request
|
||||
func (o *PostIngestsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
|
||||
|
||||
if err := r.SetTimeout(o.timeout); err != nil {
|
||||
return err
|
||||
}
|
||||
var res []error
|
||||
if o.IngestRequest != nil {
|
||||
if err := r.SetBodyParam(o.IngestRequest); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
if len(res) > 0 {
|
||||
return errors.CompositeValidationError(res...)
|
||||
}
|
||||
return nil
|
||||
}
|
|
@ -1,339 +0,0 @@
|
|||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
// (c) 2012-2020 by Taxnexus, Inc.
|
||||
// All rights reserved worldwide.
|
||||
// Proprietary product; unlicensed use is not allowed
|
||||
|
||||
package ingest
|
||||
|
||||
// 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"
|
||||
|
||||
"code.tnxs.net/vernonkeenan/lib/api/devops/devops_models"
|
||||
)
|
||||
|
||||
// PostIngestsReader is a Reader for the PostIngests structure.
|
||||
type PostIngestsReader struct {
|
||||
formats strfmt.Registry
|
||||
}
|
||||
|
||||
// ReadResponse reads a server response into the received o.
|
||||
func (o *PostIngestsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
|
||||
switch response.Code() {
|
||||
case 200:
|
||||
result := NewPostIngestsOK()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return result, nil
|
||||
case 401:
|
||||
result := NewPostIngestsUnauthorized()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return nil, result
|
||||
case 403:
|
||||
result := NewPostIngestsForbidden()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return nil, result
|
||||
case 404:
|
||||
result := NewPostIngestsNotFound()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return nil, result
|
||||
case 422:
|
||||
result := NewPostIngestsUnprocessableEntity()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return nil, result
|
||||
case 500:
|
||||
result := NewPostIngestsInternalServerError()
|
||||
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())
|
||||
}
|
||||
}
|
||||
|
||||
// NewPostIngestsOK creates a PostIngestsOK with default headers values
|
||||
func NewPostIngestsOK() *PostIngestsOK {
|
||||
return &PostIngestsOK{}
|
||||
}
|
||||
|
||||
/* PostIngestsOK describes a response with status code 200, with default header values.
|
||||
|
||||
Taxnexus Response with Ingest objects
|
||||
*/
|
||||
type PostIngestsOK struct {
|
||||
AccessControlAllowOrigin string
|
||||
CacheControl string
|
||||
|
||||
Payload *devops_models.IngestResponse
|
||||
}
|
||||
|
||||
func (o *PostIngestsOK) Error() string {
|
||||
return fmt.Sprintf("[POST /ingests][%d] postIngestsOK %+v", 200, o.Payload)
|
||||
}
|
||||
func (o *PostIngestsOK) GetPayload() *devops_models.IngestResponse {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *PostIngestsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
// hydrates response header Access-Control-Allow-Origin
|
||||
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
|
||||
|
||||
if hdrAccessControlAllowOrigin != "" {
|
||||
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
|
||||
}
|
||||
|
||||
// hydrates response header Cache-Control
|
||||
hdrCacheControl := response.GetHeader("Cache-Control")
|
||||
|
||||
if hdrCacheControl != "" {
|
||||
o.CacheControl = hdrCacheControl
|
||||
}
|
||||
|
||||
o.Payload = new(devops_models.IngestResponse)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewPostIngestsUnauthorized creates a PostIngestsUnauthorized with default headers values
|
||||
func NewPostIngestsUnauthorized() *PostIngestsUnauthorized {
|
||||
return &PostIngestsUnauthorized{}
|
||||
}
|
||||
|
||||
/* PostIngestsUnauthorized describes a response with status code 401, with default header values.
|
||||
|
||||
Access Unauthorized, invalid API-KEY was used
|
||||
*/
|
||||
type PostIngestsUnauthorized struct {
|
||||
AccessControlAllowOrigin string
|
||||
CacheControl string
|
||||
|
||||
Payload *devops_models.Error
|
||||
}
|
||||
|
||||
func (o *PostIngestsUnauthorized) Error() string {
|
||||
return fmt.Sprintf("[POST /ingests][%d] postIngestsUnauthorized %+v", 401, o.Payload)
|
||||
}
|
||||
func (o *PostIngestsUnauthorized) GetPayload() *devops_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *PostIngestsUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
// hydrates response header Access-Control-Allow-Origin
|
||||
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
|
||||
|
||||
if hdrAccessControlAllowOrigin != "" {
|
||||
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
|
||||
}
|
||||
|
||||
// hydrates response header Cache-Control
|
||||
hdrCacheControl := response.GetHeader("Cache-Control")
|
||||
|
||||
if hdrCacheControl != "" {
|
||||
o.CacheControl = hdrCacheControl
|
||||
}
|
||||
|
||||
o.Payload = new(devops_models.Error)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewPostIngestsForbidden creates a PostIngestsForbidden with default headers values
|
||||
func NewPostIngestsForbidden() *PostIngestsForbidden {
|
||||
return &PostIngestsForbidden{}
|
||||
}
|
||||
|
||||
/* PostIngestsForbidden describes a response with status code 403, with default header values.
|
||||
|
||||
Access forbidden, account lacks access
|
||||
*/
|
||||
type PostIngestsForbidden struct {
|
||||
AccessControlAllowOrigin string
|
||||
|
||||
Payload *devops_models.Error
|
||||
}
|
||||
|
||||
func (o *PostIngestsForbidden) Error() string {
|
||||
return fmt.Sprintf("[POST /ingests][%d] postIngestsForbidden %+v", 403, o.Payload)
|
||||
}
|
||||
func (o *PostIngestsForbidden) GetPayload() *devops_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *PostIngestsForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
// hydrates response header Access-Control-Allow-Origin
|
||||
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
|
||||
|
||||
if hdrAccessControlAllowOrigin != "" {
|
||||
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
|
||||
}
|
||||
|
||||
o.Payload = new(devops_models.Error)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewPostIngestsNotFound creates a PostIngestsNotFound with default headers values
|
||||
func NewPostIngestsNotFound() *PostIngestsNotFound {
|
||||
return &PostIngestsNotFound{}
|
||||
}
|
||||
|
||||
/* PostIngestsNotFound describes a response with status code 404, with default header values.
|
||||
|
||||
Resource was not found
|
||||
*/
|
||||
type PostIngestsNotFound struct {
|
||||
AccessControlAllowOrigin string
|
||||
|
||||
Payload *devops_models.Error
|
||||
}
|
||||
|
||||
func (o *PostIngestsNotFound) Error() string {
|
||||
return fmt.Sprintf("[POST /ingests][%d] postIngestsNotFound %+v", 404, o.Payload)
|
||||
}
|
||||
func (o *PostIngestsNotFound) GetPayload() *devops_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *PostIngestsNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
// hydrates response header Access-Control-Allow-Origin
|
||||
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
|
||||
|
||||
if hdrAccessControlAllowOrigin != "" {
|
||||
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
|
||||
}
|
||||
|
||||
o.Payload = new(devops_models.Error)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewPostIngestsUnprocessableEntity creates a PostIngestsUnprocessableEntity with default headers values
|
||||
func NewPostIngestsUnprocessableEntity() *PostIngestsUnprocessableEntity {
|
||||
return &PostIngestsUnprocessableEntity{}
|
||||
}
|
||||
|
||||
/* PostIngestsUnprocessableEntity describes a response with status code 422, with default header values.
|
||||
|
||||
Unprocessable Entity, likely a bad parameter
|
||||
*/
|
||||
type PostIngestsUnprocessableEntity struct {
|
||||
AccessControlAllowOrigin string
|
||||
CacheControl string
|
||||
|
||||
Payload *devops_models.Error
|
||||
}
|
||||
|
||||
func (o *PostIngestsUnprocessableEntity) Error() string {
|
||||
return fmt.Sprintf("[POST /ingests][%d] postIngestsUnprocessableEntity %+v", 422, o.Payload)
|
||||
}
|
||||
func (o *PostIngestsUnprocessableEntity) GetPayload() *devops_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *PostIngestsUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
// hydrates response header Access-Control-Allow-Origin
|
||||
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
|
||||
|
||||
if hdrAccessControlAllowOrigin != "" {
|
||||
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
|
||||
}
|
||||
|
||||
// hydrates response header Cache-Control
|
||||
hdrCacheControl := response.GetHeader("Cache-Control")
|
||||
|
||||
if hdrCacheControl != "" {
|
||||
o.CacheControl = hdrCacheControl
|
||||
}
|
||||
|
||||
o.Payload = new(devops_models.Error)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewPostIngestsInternalServerError creates a PostIngestsInternalServerError with default headers values
|
||||
func NewPostIngestsInternalServerError() *PostIngestsInternalServerError {
|
||||
return &PostIngestsInternalServerError{}
|
||||
}
|
||||
|
||||
/* PostIngestsInternalServerError describes a response with status code 500, with default header values.
|
||||
|
||||
Server Internal Error
|
||||
*/
|
||||
type PostIngestsInternalServerError struct {
|
||||
AccessControlAllowOrigin string
|
||||
|
||||
Payload *devops_models.Error
|
||||
}
|
||||
|
||||
func (o *PostIngestsInternalServerError) Error() string {
|
||||
return fmt.Sprintf("[POST /ingests][%d] postIngestsInternalServerError %+v", 500, o.Payload)
|
||||
}
|
||||
func (o *PostIngestsInternalServerError) GetPayload() *devops_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *PostIngestsInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
// hydrates response header Access-Control-Allow-Origin
|
||||
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
|
||||
|
||||
if hdrAccessControlAllowOrigin != "" {
|
||||
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
|
||||
}
|
||||
|
||||
o.Payload = new(devops_models.Error)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
|
@ -1,155 +0,0 @@
|
|||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
// (c) 2012-2020 by Taxnexus, Inc.
|
||||
// All rights reserved worldwide.
|
||||
// Proprietary product; unlicensed use is not allowed
|
||||
|
||||
package ingest
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
// Editing this file might prove futile when you re-run the swagger generate command
|
||||
|
||||
import (
|
||||
"context"
|
||||
"net/http"
|
||||
"time"
|
||||
|
||||
"github.com/go-openapi/errors"
|
||||
"github.com/go-openapi/runtime"
|
||||
cr "github.com/go-openapi/runtime/client"
|
||||
"github.com/go-openapi/strfmt"
|
||||
|
||||
"code.tnxs.net/vernonkeenan/lib/api/devops/devops_models"
|
||||
)
|
||||
|
||||
// NewPutIngestsParams creates a new PutIngestsParams object,
|
||||
// with the default timeout for this client.
|
||||
//
|
||||
// Default values are not hydrated, since defaults are normally applied by the API server side.
|
||||
//
|
||||
// To enforce default values in parameter, use SetDefaults or WithDefaults.
|
||||
func NewPutIngestsParams() *PutIngestsParams {
|
||||
return &PutIngestsParams{
|
||||
timeout: cr.DefaultTimeout,
|
||||
}
|
||||
}
|
||||
|
||||
// NewPutIngestsParamsWithTimeout creates a new PutIngestsParams object
|
||||
// with the ability to set a timeout on a request.
|
||||
func NewPutIngestsParamsWithTimeout(timeout time.Duration) *PutIngestsParams {
|
||||
return &PutIngestsParams{
|
||||
timeout: timeout,
|
||||
}
|
||||
}
|
||||
|
||||
// NewPutIngestsParamsWithContext creates a new PutIngestsParams object
|
||||
// with the ability to set a context for a request.
|
||||
func NewPutIngestsParamsWithContext(ctx context.Context) *PutIngestsParams {
|
||||
return &PutIngestsParams{
|
||||
Context: ctx,
|
||||
}
|
||||
}
|
||||
|
||||
// NewPutIngestsParamsWithHTTPClient creates a new PutIngestsParams object
|
||||
// with the ability to set a custom HTTPClient for a request.
|
||||
func NewPutIngestsParamsWithHTTPClient(client *http.Client) *PutIngestsParams {
|
||||
return &PutIngestsParams{
|
||||
HTTPClient: client,
|
||||
}
|
||||
}
|
||||
|
||||
/* PutIngestsParams contains all the parameters to send to the API endpoint
|
||||
for the put ingests operation.
|
||||
|
||||
Typically these are written to a http.Request.
|
||||
*/
|
||||
type PutIngestsParams struct {
|
||||
|
||||
/* IngestRequest.
|
||||
|
||||
An array of Ingest records
|
||||
*/
|
||||
IngestRequest *devops_models.IngestRequest
|
||||
|
||||
timeout time.Duration
|
||||
Context context.Context
|
||||
HTTPClient *http.Client
|
||||
}
|
||||
|
||||
// WithDefaults hydrates default values in the put ingests params (not the query body).
|
||||
//
|
||||
// All values with no default are reset to their zero value.
|
||||
func (o *PutIngestsParams) WithDefaults() *PutIngestsParams {
|
||||
o.SetDefaults()
|
||||
return o
|
||||
}
|
||||
|
||||
// SetDefaults hydrates default values in the put ingests params (not the query body).
|
||||
//
|
||||
// All values with no default are reset to their zero value.
|
||||
func (o *PutIngestsParams) SetDefaults() {
|
||||
// no default values defined for this parameter
|
||||
}
|
||||
|
||||
// WithTimeout adds the timeout to the put ingests params
|
||||
func (o *PutIngestsParams) WithTimeout(timeout time.Duration) *PutIngestsParams {
|
||||
o.SetTimeout(timeout)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetTimeout adds the timeout to the put ingests params
|
||||
func (o *PutIngestsParams) SetTimeout(timeout time.Duration) {
|
||||
o.timeout = timeout
|
||||
}
|
||||
|
||||
// WithContext adds the context to the put ingests params
|
||||
func (o *PutIngestsParams) WithContext(ctx context.Context) *PutIngestsParams {
|
||||
o.SetContext(ctx)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetContext adds the context to the put ingests params
|
||||
func (o *PutIngestsParams) SetContext(ctx context.Context) {
|
||||
o.Context = ctx
|
||||
}
|
||||
|
||||
// WithHTTPClient adds the HTTPClient to the put ingests params
|
||||
func (o *PutIngestsParams) WithHTTPClient(client *http.Client) *PutIngestsParams {
|
||||
o.SetHTTPClient(client)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetHTTPClient adds the HTTPClient to the put ingests params
|
||||
func (o *PutIngestsParams) SetHTTPClient(client *http.Client) {
|
||||
o.HTTPClient = client
|
||||
}
|
||||
|
||||
// WithIngestRequest adds the ingestRequest to the put ingests params
|
||||
func (o *PutIngestsParams) WithIngestRequest(ingestRequest *devops_models.IngestRequest) *PutIngestsParams {
|
||||
o.SetIngestRequest(ingestRequest)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetIngestRequest adds the ingestRequest to the put ingests params
|
||||
func (o *PutIngestsParams) SetIngestRequest(ingestRequest *devops_models.IngestRequest) {
|
||||
o.IngestRequest = ingestRequest
|
||||
}
|
||||
|
||||
// WriteToRequest writes these params to a swagger request
|
||||
func (o *PutIngestsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
|
||||
|
||||
if err := r.SetTimeout(o.timeout); err != nil {
|
||||
return err
|
||||
}
|
||||
var res []error
|
||||
if o.IngestRequest != nil {
|
||||
if err := r.SetBodyParam(o.IngestRequest); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
if len(res) > 0 {
|
||||
return errors.CompositeValidationError(res...)
|
||||
}
|
||||
return nil
|
||||
}
|
|
@ -1,339 +0,0 @@
|
|||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
// (c) 2012-2020 by Taxnexus, Inc.
|
||||
// All rights reserved worldwide.
|
||||
// Proprietary product; unlicensed use is not allowed
|
||||
|
||||
package ingest
|
||||
|
||||
// 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"
|
||||
|
||||
"code.tnxs.net/vernonkeenan/lib/api/devops/devops_models"
|
||||
)
|
||||
|
||||
// PutIngestsReader is a Reader for the PutIngests structure.
|
||||
type PutIngestsReader struct {
|
||||
formats strfmt.Registry
|
||||
}
|
||||
|
||||
// ReadResponse reads a server response into the received o.
|
||||
func (o *PutIngestsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
|
||||
switch response.Code() {
|
||||
case 200:
|
||||
result := NewPutIngestsOK()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return result, nil
|
||||
case 401:
|
||||
result := NewPutIngestsUnauthorized()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return nil, result
|
||||
case 403:
|
||||
result := NewPutIngestsForbidden()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return nil, result
|
||||
case 404:
|
||||
result := NewPutIngestsNotFound()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return nil, result
|
||||
case 422:
|
||||
result := NewPutIngestsUnprocessableEntity()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return nil, result
|
||||
case 500:
|
||||
result := NewPutIngestsInternalServerError()
|
||||
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())
|
||||
}
|
||||
}
|
||||
|
||||
// NewPutIngestsOK creates a PutIngestsOK with default headers values
|
||||
func NewPutIngestsOK() *PutIngestsOK {
|
||||
return &PutIngestsOK{}
|
||||
}
|
||||
|
||||
/* PutIngestsOK describes a response with status code 200, with default header values.
|
||||
|
||||
Taxnexus Response with Ingest objects
|
||||
*/
|
||||
type PutIngestsOK struct {
|
||||
AccessControlAllowOrigin string
|
||||
CacheControl string
|
||||
|
||||
Payload *devops_models.IngestResponse
|
||||
}
|
||||
|
||||
func (o *PutIngestsOK) Error() string {
|
||||
return fmt.Sprintf("[PUT /ingests][%d] putIngestsOK %+v", 200, o.Payload)
|
||||
}
|
||||
func (o *PutIngestsOK) GetPayload() *devops_models.IngestResponse {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *PutIngestsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
// hydrates response header Access-Control-Allow-Origin
|
||||
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
|
||||
|
||||
if hdrAccessControlAllowOrigin != "" {
|
||||
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
|
||||
}
|
||||
|
||||
// hydrates response header Cache-Control
|
||||
hdrCacheControl := response.GetHeader("Cache-Control")
|
||||
|
||||
if hdrCacheControl != "" {
|
||||
o.CacheControl = hdrCacheControl
|
||||
}
|
||||
|
||||
o.Payload = new(devops_models.IngestResponse)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewPutIngestsUnauthorized creates a PutIngestsUnauthorized with default headers values
|
||||
func NewPutIngestsUnauthorized() *PutIngestsUnauthorized {
|
||||
return &PutIngestsUnauthorized{}
|
||||
}
|
||||
|
||||
/* PutIngestsUnauthorized describes a response with status code 401, with default header values.
|
||||
|
||||
Access Unauthorized, invalid API-KEY was used
|
||||
*/
|
||||
type PutIngestsUnauthorized struct {
|
||||
AccessControlAllowOrigin string
|
||||
CacheControl string
|
||||
|
||||
Payload *devops_models.Error
|
||||
}
|
||||
|
||||
func (o *PutIngestsUnauthorized) Error() string {
|
||||
return fmt.Sprintf("[PUT /ingests][%d] putIngestsUnauthorized %+v", 401, o.Payload)
|
||||
}
|
||||
func (o *PutIngestsUnauthorized) GetPayload() *devops_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *PutIngestsUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
// hydrates response header Access-Control-Allow-Origin
|
||||
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
|
||||
|
||||
if hdrAccessControlAllowOrigin != "" {
|
||||
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
|
||||
}
|
||||
|
||||
// hydrates response header Cache-Control
|
||||
hdrCacheControl := response.GetHeader("Cache-Control")
|
||||
|
||||
if hdrCacheControl != "" {
|
||||
o.CacheControl = hdrCacheControl
|
||||
}
|
||||
|
||||
o.Payload = new(devops_models.Error)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewPutIngestsForbidden creates a PutIngestsForbidden with default headers values
|
||||
func NewPutIngestsForbidden() *PutIngestsForbidden {
|
||||
return &PutIngestsForbidden{}
|
||||
}
|
||||
|
||||
/* PutIngestsForbidden describes a response with status code 403, with default header values.
|
||||
|
||||
Access forbidden, account lacks access
|
||||
*/
|
||||
type PutIngestsForbidden struct {
|
||||
AccessControlAllowOrigin string
|
||||
|
||||
Payload *devops_models.Error
|
||||
}
|
||||
|
||||
func (o *PutIngestsForbidden) Error() string {
|
||||
return fmt.Sprintf("[PUT /ingests][%d] putIngestsForbidden %+v", 403, o.Payload)
|
||||
}
|
||||
func (o *PutIngestsForbidden) GetPayload() *devops_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *PutIngestsForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
// hydrates response header Access-Control-Allow-Origin
|
||||
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
|
||||
|
||||
if hdrAccessControlAllowOrigin != "" {
|
||||
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
|
||||
}
|
||||
|
||||
o.Payload = new(devops_models.Error)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewPutIngestsNotFound creates a PutIngestsNotFound with default headers values
|
||||
func NewPutIngestsNotFound() *PutIngestsNotFound {
|
||||
return &PutIngestsNotFound{}
|
||||
}
|
||||
|
||||
/* PutIngestsNotFound describes a response with status code 404, with default header values.
|
||||
|
||||
Resource was not found
|
||||
*/
|
||||
type PutIngestsNotFound struct {
|
||||
AccessControlAllowOrigin string
|
||||
|
||||
Payload *devops_models.Error
|
||||
}
|
||||
|
||||
func (o *PutIngestsNotFound) Error() string {
|
||||
return fmt.Sprintf("[PUT /ingests][%d] putIngestsNotFound %+v", 404, o.Payload)
|
||||
}
|
||||
func (o *PutIngestsNotFound) GetPayload() *devops_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *PutIngestsNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
// hydrates response header Access-Control-Allow-Origin
|
||||
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
|
||||
|
||||
if hdrAccessControlAllowOrigin != "" {
|
||||
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
|
||||
}
|
||||
|
||||
o.Payload = new(devops_models.Error)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewPutIngestsUnprocessableEntity creates a PutIngestsUnprocessableEntity with default headers values
|
||||
func NewPutIngestsUnprocessableEntity() *PutIngestsUnprocessableEntity {
|
||||
return &PutIngestsUnprocessableEntity{}
|
||||
}
|
||||
|
||||
/* PutIngestsUnprocessableEntity describes a response with status code 422, with default header values.
|
||||
|
||||
Unprocessable Entity, likely a bad parameter
|
||||
*/
|
||||
type PutIngestsUnprocessableEntity struct {
|
||||
AccessControlAllowOrigin string
|
||||
CacheControl string
|
||||
|
||||
Payload *devops_models.Error
|
||||
}
|
||||
|
||||
func (o *PutIngestsUnprocessableEntity) Error() string {
|
||||
return fmt.Sprintf("[PUT /ingests][%d] putIngestsUnprocessableEntity %+v", 422, o.Payload)
|
||||
}
|
||||
func (o *PutIngestsUnprocessableEntity) GetPayload() *devops_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *PutIngestsUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
// hydrates response header Access-Control-Allow-Origin
|
||||
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
|
||||
|
||||
if hdrAccessControlAllowOrigin != "" {
|
||||
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
|
||||
}
|
||||
|
||||
// hydrates response header Cache-Control
|
||||
hdrCacheControl := response.GetHeader("Cache-Control")
|
||||
|
||||
if hdrCacheControl != "" {
|
||||
o.CacheControl = hdrCacheControl
|
||||
}
|
||||
|
||||
o.Payload = new(devops_models.Error)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewPutIngestsInternalServerError creates a PutIngestsInternalServerError with default headers values
|
||||
func NewPutIngestsInternalServerError() *PutIngestsInternalServerError {
|
||||
return &PutIngestsInternalServerError{}
|
||||
}
|
||||
|
||||
/* PutIngestsInternalServerError describes a response with status code 500, with default header values.
|
||||
|
||||
Server Internal Error
|
||||
*/
|
||||
type PutIngestsInternalServerError struct {
|
||||
AccessControlAllowOrigin string
|
||||
|
||||
Payload *devops_models.Error
|
||||
}
|
||||
|
||||
func (o *PutIngestsInternalServerError) Error() string {
|
||||
return fmt.Sprintf("[PUT /ingests][%d] putIngestsInternalServerError %+v", 500, o.Payload)
|
||||
}
|
||||
func (o *PutIngestsInternalServerError) GetPayload() *devops_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *PutIngestsInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
// hydrates response header Access-Control-Allow-Origin
|
||||
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
|
||||
|
||||
if hdrAccessControlAllowOrigin != "" {
|
||||
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
|
||||
}
|
||||
|
||||
o.Payload = new(devops_models.Error)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
|
@ -1,153 +0,0 @@
|
|||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
// (c) 2012-2020 by Taxnexus, Inc.
|
||||
// All rights reserved worldwide.
|
||||
// Proprietary product; unlicensed use is not allowed
|
||||
|
||||
package job
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
// Editing this file might prove futile when you re-run the swagger generate command
|
||||
|
||||
import (
|
||||
"context"
|
||||
"net/http"
|
||||
"time"
|
||||
|
||||
"github.com/go-openapi/errors"
|
||||
"github.com/go-openapi/runtime"
|
||||
cr "github.com/go-openapi/runtime/client"
|
||||
"github.com/go-openapi/strfmt"
|
||||
)
|
||||
|
||||
// NewGetJobParams creates a new GetJobParams object,
|
||||
// with the default timeout for this client.
|
||||
//
|
||||
// Default values are not hydrated, since defaults are normally applied by the API server side.
|
||||
//
|
||||
// To enforce default values in parameter, use SetDefaults or WithDefaults.
|
||||
func NewGetJobParams() *GetJobParams {
|
||||
return &GetJobParams{
|
||||
timeout: cr.DefaultTimeout,
|
||||
}
|
||||
}
|
||||
|
||||
// NewGetJobParamsWithTimeout creates a new GetJobParams object
|
||||
// with the ability to set a timeout on a request.
|
||||
func NewGetJobParamsWithTimeout(timeout time.Duration) *GetJobParams {
|
||||
return &GetJobParams{
|
||||
timeout: timeout,
|
||||
}
|
||||
}
|
||||
|
||||
// NewGetJobParamsWithContext creates a new GetJobParams object
|
||||
// with the ability to set a context for a request.
|
||||
func NewGetJobParamsWithContext(ctx context.Context) *GetJobParams {
|
||||
return &GetJobParams{
|
||||
Context: ctx,
|
||||
}
|
||||
}
|
||||
|
||||
// NewGetJobParamsWithHTTPClient creates a new GetJobParams object
|
||||
// with the ability to set a custom HTTPClient for a request.
|
||||
func NewGetJobParamsWithHTTPClient(client *http.Client) *GetJobParams {
|
||||
return &GetJobParams{
|
||||
HTTPClient: client,
|
||||
}
|
||||
}
|
||||
|
||||
/* GetJobParams contains all the parameters to send to the API endpoint
|
||||
for the get job operation.
|
||||
|
||||
Typically these are written to a http.Request.
|
||||
*/
|
||||
type GetJobParams struct {
|
||||
|
||||
/* JobIDPath.
|
||||
|
||||
Taxnexus Record Id of a Job
|
||||
*/
|
||||
JobIDPath string
|
||||
|
||||
timeout time.Duration
|
||||
Context context.Context
|
||||
HTTPClient *http.Client
|
||||
}
|
||||
|
||||
// WithDefaults hydrates default values in the get job params (not the query body).
|
||||
//
|
||||
// All values with no default are reset to their zero value.
|
||||
func (o *GetJobParams) WithDefaults() *GetJobParams {
|
||||
o.SetDefaults()
|
||||
return o
|
||||
}
|
||||
|
||||
// SetDefaults hydrates default values in the get job params (not the query body).
|
||||
//
|
||||
// All values with no default are reset to their zero value.
|
||||
func (o *GetJobParams) SetDefaults() {
|
||||
// no default values defined for this parameter
|
||||
}
|
||||
|
||||
// WithTimeout adds the timeout to the get job params
|
||||
func (o *GetJobParams) WithTimeout(timeout time.Duration) *GetJobParams {
|
||||
o.SetTimeout(timeout)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetTimeout adds the timeout to the get job params
|
||||
func (o *GetJobParams) SetTimeout(timeout time.Duration) {
|
||||
o.timeout = timeout
|
||||
}
|
||||
|
||||
// WithContext adds the context to the get job params
|
||||
func (o *GetJobParams) WithContext(ctx context.Context) *GetJobParams {
|
||||
o.SetContext(ctx)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetContext adds the context to the get job params
|
||||
func (o *GetJobParams) SetContext(ctx context.Context) {
|
||||
o.Context = ctx
|
||||
}
|
||||
|
||||
// WithHTTPClient adds the HTTPClient to the get job params
|
||||
func (o *GetJobParams) WithHTTPClient(client *http.Client) *GetJobParams {
|
||||
o.SetHTTPClient(client)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetHTTPClient adds the HTTPClient to the get job params
|
||||
func (o *GetJobParams) SetHTTPClient(client *http.Client) {
|
||||
o.HTTPClient = client
|
||||
}
|
||||
|
||||
// WithJobIDPath adds the jobIDPath to the get job params
|
||||
func (o *GetJobParams) WithJobIDPath(jobIDPath string) *GetJobParams {
|
||||
o.SetJobIDPath(jobIDPath)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetJobIDPath adds the jobIdPath to the get job params
|
||||
func (o *GetJobParams) SetJobIDPath(jobIDPath string) {
|
||||
o.JobIDPath = jobIDPath
|
||||
}
|
||||
|
||||
// WriteToRequest writes these params to a swagger request
|
||||
func (o *GetJobParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
|
||||
|
||||
if err := r.SetTimeout(o.timeout); err != nil {
|
||||
return err
|
||||
}
|
||||
var res []error
|
||||
|
||||
// path param jobIdPath
|
||||
if err := r.SetPathParam("jobIdPath", o.JobIDPath); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if len(res) > 0 {
|
||||
return errors.CompositeValidationError(res...)
|
||||
}
|
||||
return nil
|
||||
}
|
|
@ -1,339 +0,0 @@
|
|||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
// (c) 2012-2020 by Taxnexus, Inc.
|
||||
// All rights reserved worldwide.
|
||||
// Proprietary product; unlicensed use is not allowed
|
||||
|
||||
package job
|
||||
|
||||
// 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"
|
||||
|
||||
"code.tnxs.net/vernonkeenan/lib/api/devops/devops_models"
|
||||
)
|
||||
|
||||
// GetJobReader is a Reader for the GetJob structure.
|
||||
type GetJobReader struct {
|
||||
formats strfmt.Registry
|
||||
}
|
||||
|
||||
// ReadResponse reads a server response into the received o.
|
||||
func (o *GetJobReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
|
||||
switch response.Code() {
|
||||
case 200:
|
||||
result := NewGetJobOK()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return result, nil
|
||||
case 401:
|
||||
result := NewGetJobUnauthorized()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return nil, result
|
||||
case 403:
|
||||
result := NewGetJobForbidden()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return nil, result
|
||||
case 404:
|
||||
result := NewGetJobNotFound()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return nil, result
|
||||
case 422:
|
||||
result := NewGetJobUnprocessableEntity()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return nil, result
|
||||
case 500:
|
||||
result := NewGetJobInternalServerError()
|
||||
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())
|
||||
}
|
||||
}
|
||||
|
||||
// NewGetJobOK creates a GetJobOK with default headers values
|
||||
func NewGetJobOK() *GetJobOK {
|
||||
return &GetJobOK{}
|
||||
}
|
||||
|
||||
/* GetJobOK describes a response with status code 200, with default header values.
|
||||
|
||||
Single Job record response
|
||||
*/
|
||||
type GetJobOK struct {
|
||||
AccessControlAllowOrigin string
|
||||
CacheControl string
|
||||
|
||||
Payload *devops_models.Job
|
||||
}
|
||||
|
||||
func (o *GetJobOK) Error() string {
|
||||
return fmt.Sprintf("[GET /jobs/{jobIdPath}][%d] getJobOK %+v", 200, o.Payload)
|
||||
}
|
||||
func (o *GetJobOK) GetPayload() *devops_models.Job {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *GetJobOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
// hydrates response header Access-Control-Allow-Origin
|
||||
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
|
||||
|
||||
if hdrAccessControlAllowOrigin != "" {
|
||||
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
|
||||
}
|
||||
|
||||
// hydrates response header Cache-Control
|
||||
hdrCacheControl := response.GetHeader("Cache-Control")
|
||||
|
||||
if hdrCacheControl != "" {
|
||||
o.CacheControl = hdrCacheControl
|
||||
}
|
||||
|
||||
o.Payload = new(devops_models.Job)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewGetJobUnauthorized creates a GetJobUnauthorized with default headers values
|
||||
func NewGetJobUnauthorized() *GetJobUnauthorized {
|
||||
return &GetJobUnauthorized{}
|
||||
}
|
||||
|
||||
/* GetJobUnauthorized describes a response with status code 401, with default header values.
|
||||
|
||||
Access Unauthorized, invalid API-KEY was used
|
||||
*/
|
||||
type GetJobUnauthorized struct {
|
||||
AccessControlAllowOrigin string
|
||||
CacheControl string
|
||||
|
||||
Payload *devops_models.Error
|
||||
}
|
||||
|
||||
func (o *GetJobUnauthorized) Error() string {
|
||||
return fmt.Sprintf("[GET /jobs/{jobIdPath}][%d] getJobUnauthorized %+v", 401, o.Payload)
|
||||
}
|
||||
func (o *GetJobUnauthorized) GetPayload() *devops_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *GetJobUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
// hydrates response header Access-Control-Allow-Origin
|
||||
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
|
||||
|
||||
if hdrAccessControlAllowOrigin != "" {
|
||||
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
|
||||
}
|
||||
|
||||
// hydrates response header Cache-Control
|
||||
hdrCacheControl := response.GetHeader("Cache-Control")
|
||||
|
||||
if hdrCacheControl != "" {
|
||||
o.CacheControl = hdrCacheControl
|
||||
}
|
||||
|
||||
o.Payload = new(devops_models.Error)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewGetJobForbidden creates a GetJobForbidden with default headers values
|
||||
func NewGetJobForbidden() *GetJobForbidden {
|
||||
return &GetJobForbidden{}
|
||||
}
|
||||
|
||||
/* GetJobForbidden describes a response with status code 403, with default header values.
|
||||
|
||||
Access forbidden, account lacks access
|
||||
*/
|
||||
type GetJobForbidden struct {
|
||||
AccessControlAllowOrigin string
|
||||
|
||||
Payload *devops_models.Error
|
||||
}
|
||||
|
||||
func (o *GetJobForbidden) Error() string {
|
||||
return fmt.Sprintf("[GET /jobs/{jobIdPath}][%d] getJobForbidden %+v", 403, o.Payload)
|
||||
}
|
||||
func (o *GetJobForbidden) GetPayload() *devops_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *GetJobForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
// hydrates response header Access-Control-Allow-Origin
|
||||
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
|
||||
|
||||
if hdrAccessControlAllowOrigin != "" {
|
||||
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
|
||||
}
|
||||
|
||||
o.Payload = new(devops_models.Error)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewGetJobNotFound creates a GetJobNotFound with default headers values
|
||||
func NewGetJobNotFound() *GetJobNotFound {
|
||||
return &GetJobNotFound{}
|
||||
}
|
||||
|
||||
/* GetJobNotFound describes a response with status code 404, with default header values.
|
||||
|
||||
Resource was not found
|
||||
*/
|
||||
type GetJobNotFound struct {
|
||||
AccessControlAllowOrigin string
|
||||
|
||||
Payload *devops_models.Error
|
||||
}
|
||||
|
||||
func (o *GetJobNotFound) Error() string {
|
||||
return fmt.Sprintf("[GET /jobs/{jobIdPath}][%d] getJobNotFound %+v", 404, o.Payload)
|
||||
}
|
||||
func (o *GetJobNotFound) GetPayload() *devops_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *GetJobNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
// hydrates response header Access-Control-Allow-Origin
|
||||
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
|
||||
|
||||
if hdrAccessControlAllowOrigin != "" {
|
||||
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
|
||||
}
|
||||
|
||||
o.Payload = new(devops_models.Error)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewGetJobUnprocessableEntity creates a GetJobUnprocessableEntity with default headers values
|
||||
func NewGetJobUnprocessableEntity() *GetJobUnprocessableEntity {
|
||||
return &GetJobUnprocessableEntity{}
|
||||
}
|
||||
|
||||
/* GetJobUnprocessableEntity describes a response with status code 422, with default header values.
|
||||
|
||||
Unprocessable Entity, likely a bad parameter
|
||||
*/
|
||||
type GetJobUnprocessableEntity struct {
|
||||
AccessControlAllowOrigin string
|
||||
CacheControl string
|
||||
|
||||
Payload *devops_models.Error
|
||||
}
|
||||
|
||||
func (o *GetJobUnprocessableEntity) Error() string {
|
||||
return fmt.Sprintf("[GET /jobs/{jobIdPath}][%d] getJobUnprocessableEntity %+v", 422, o.Payload)
|
||||
}
|
||||
func (o *GetJobUnprocessableEntity) GetPayload() *devops_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *GetJobUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
// hydrates response header Access-Control-Allow-Origin
|
||||
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
|
||||
|
||||
if hdrAccessControlAllowOrigin != "" {
|
||||
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
|
||||
}
|
||||
|
||||
// hydrates response header Cache-Control
|
||||
hdrCacheControl := response.GetHeader("Cache-Control")
|
||||
|
||||
if hdrCacheControl != "" {
|
||||
o.CacheControl = hdrCacheControl
|
||||
}
|
||||
|
||||
o.Payload = new(devops_models.Error)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewGetJobInternalServerError creates a GetJobInternalServerError with default headers values
|
||||
func NewGetJobInternalServerError() *GetJobInternalServerError {
|
||||
return &GetJobInternalServerError{}
|
||||
}
|
||||
|
||||
/* GetJobInternalServerError describes a response with status code 500, with default header values.
|
||||
|
||||
Server Internal Error
|
||||
*/
|
||||
type GetJobInternalServerError struct {
|
||||
AccessControlAllowOrigin string
|
||||
|
||||
Payload *devops_models.Error
|
||||
}
|
||||
|
||||
func (o *GetJobInternalServerError) Error() string {
|
||||
return fmt.Sprintf("[GET /jobs/{jobIdPath}][%d] getJobInternalServerError %+v", 500, o.Payload)
|
||||
}
|
||||
func (o *GetJobInternalServerError) GetPayload() *devops_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *GetJobInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
// hydrates response header Access-Control-Allow-Origin
|
||||
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
|
||||
|
||||
if hdrAccessControlAllowOrigin != "" {
|
||||
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
|
||||
}
|
||||
|
||||
o.Payload = new(devops_models.Error)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
|
@ -1,130 +0,0 @@
|
|||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
// (c) 2012-2020 by Taxnexus, Inc.
|
||||
// All rights reserved worldwide.
|
||||
// Proprietary product; unlicensed use is not allowed
|
||||
|
||||
package job
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
// Editing this file might prove futile when you re-run the swagger generate command
|
||||
|
||||
import (
|
||||
"context"
|
||||
"net/http"
|
||||
"time"
|
||||
|
||||
"github.com/go-openapi/errors"
|
||||
"github.com/go-openapi/runtime"
|
||||
cr "github.com/go-openapi/runtime/client"
|
||||
"github.com/go-openapi/strfmt"
|
||||
)
|
||||
|
||||
// NewGetJobsObservableParams creates a new GetJobsObservableParams object,
|
||||
// with the default timeout for this client.
|
||||
//
|
||||
// Default values are not hydrated, since defaults are normally applied by the API server side.
|
||||
//
|
||||
// To enforce default values in parameter, use SetDefaults or WithDefaults.
|
||||
func NewGetJobsObservableParams() *GetJobsObservableParams {
|
||||
return &GetJobsObservableParams{
|
||||
timeout: cr.DefaultTimeout,
|
||||
}
|
||||
}
|
||||
|
||||
// NewGetJobsObservableParamsWithTimeout creates a new GetJobsObservableParams object
|
||||
// with the ability to set a timeout on a request.
|
||||
func NewGetJobsObservableParamsWithTimeout(timeout time.Duration) *GetJobsObservableParams {
|
||||
return &GetJobsObservableParams{
|
||||
timeout: timeout,
|
||||
}
|
||||
}
|
||||
|
||||
// NewGetJobsObservableParamsWithContext creates a new GetJobsObservableParams object
|
||||
// with the ability to set a context for a request.
|
||||
func NewGetJobsObservableParamsWithContext(ctx context.Context) *GetJobsObservableParams {
|
||||
return &GetJobsObservableParams{
|
||||
Context: ctx,
|
||||
}
|
||||
}
|
||||
|
||||
// NewGetJobsObservableParamsWithHTTPClient creates a new GetJobsObservableParams object
|
||||
// with the ability to set a custom HTTPClient for a request.
|
||||
func NewGetJobsObservableParamsWithHTTPClient(client *http.Client) *GetJobsObservableParams {
|
||||
return &GetJobsObservableParams{
|
||||
HTTPClient: client,
|
||||
}
|
||||
}
|
||||
|
||||
/* GetJobsObservableParams contains all the parameters to send to the API endpoint
|
||||
for the get jobs observable operation.
|
||||
|
||||
Typically these are written to a http.Request.
|
||||
*/
|
||||
type GetJobsObservableParams struct {
|
||||
timeout time.Duration
|
||||
Context context.Context
|
||||
HTTPClient *http.Client
|
||||
}
|
||||
|
||||
// WithDefaults hydrates default values in the get jobs observable params (not the query body).
|
||||
//
|
||||
// All values with no default are reset to their zero value.
|
||||
func (o *GetJobsObservableParams) WithDefaults() *GetJobsObservableParams {
|
||||
o.SetDefaults()
|
||||
return o
|
||||
}
|
||||
|
||||
// SetDefaults hydrates default values in the get jobs observable params (not the query body).
|
||||
//
|
||||
// All values with no default are reset to their zero value.
|
||||
func (o *GetJobsObservableParams) SetDefaults() {
|
||||
// no default values defined for this parameter
|
||||
}
|
||||
|
||||
// WithTimeout adds the timeout to the get jobs observable params
|
||||
func (o *GetJobsObservableParams) WithTimeout(timeout time.Duration) *GetJobsObservableParams {
|
||||
o.SetTimeout(timeout)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetTimeout adds the timeout to the get jobs observable params
|
||||
func (o *GetJobsObservableParams) SetTimeout(timeout time.Duration) {
|
||||
o.timeout = timeout
|
||||
}
|
||||
|
||||
// WithContext adds the context to the get jobs observable params
|
||||
func (o *GetJobsObservableParams) WithContext(ctx context.Context) *GetJobsObservableParams {
|
||||
o.SetContext(ctx)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetContext adds the context to the get jobs observable params
|
||||
func (o *GetJobsObservableParams) SetContext(ctx context.Context) {
|
||||
o.Context = ctx
|
||||
}
|
||||
|
||||
// WithHTTPClient adds the HTTPClient to the get jobs observable params
|
||||
func (o *GetJobsObservableParams) WithHTTPClient(client *http.Client) *GetJobsObservableParams {
|
||||
o.SetHTTPClient(client)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetHTTPClient adds the HTTPClient to the get jobs observable params
|
||||
func (o *GetJobsObservableParams) SetHTTPClient(client *http.Client) {
|
||||
o.HTTPClient = client
|
||||
}
|
||||
|
||||
// WriteToRequest writes these params to a swagger request
|
||||
func (o *GetJobsObservableParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
|
||||
|
||||
if err := r.SetTimeout(o.timeout); err != nil {
|
||||
return err
|
||||
}
|
||||
var res []error
|
||||
|
||||
if len(res) > 0 {
|
||||
return errors.CompositeValidationError(res...)
|
||||
}
|
||||
return nil
|
||||
}
|
|
@ -1,337 +0,0 @@
|
|||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
// (c) 2012-2020 by Taxnexus, Inc.
|
||||
// All rights reserved worldwide.
|
||||
// Proprietary product; unlicensed use is not allowed
|
||||
|
||||
package job
|
||||
|
||||
// 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"
|
||||
|
||||
"code.tnxs.net/vernonkeenan/lib/api/devops/devops_models"
|
||||
)
|
||||
|
||||
// GetJobsObservableReader is a Reader for the GetJobsObservable structure.
|
||||
type GetJobsObservableReader struct {
|
||||
formats strfmt.Registry
|
||||
}
|
||||
|
||||
// ReadResponse reads a server response into the received o.
|
||||
func (o *GetJobsObservableReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
|
||||
switch response.Code() {
|
||||
case 200:
|
||||
result := NewGetJobsObservableOK()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return result, nil
|
||||
case 401:
|
||||
result := NewGetJobsObservableUnauthorized()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return nil, result
|
||||
case 403:
|
||||
result := NewGetJobsObservableForbidden()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return nil, result
|
||||
case 404:
|
||||
result := NewGetJobsObservableNotFound()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return nil, result
|
||||
case 422:
|
||||
result := NewGetJobsObservableUnprocessableEntity()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return nil, result
|
||||
case 500:
|
||||
result := NewGetJobsObservableInternalServerError()
|
||||
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())
|
||||
}
|
||||
}
|
||||
|
||||
// NewGetJobsObservableOK creates a GetJobsObservableOK with default headers values
|
||||
func NewGetJobsObservableOK() *GetJobsObservableOK {
|
||||
return &GetJobsObservableOK{}
|
||||
}
|
||||
|
||||
/* GetJobsObservableOK describes a response with status code 200, with default header values.
|
||||
|
||||
Single Job record response
|
||||
*/
|
||||
type GetJobsObservableOK struct {
|
||||
AccessControlAllowOrigin string
|
||||
CacheControl string
|
||||
|
||||
Payload []*devops_models.Job
|
||||
}
|
||||
|
||||
func (o *GetJobsObservableOK) Error() string {
|
||||
return fmt.Sprintf("[GET /jobs/observable][%d] getJobsObservableOK %+v", 200, o.Payload)
|
||||
}
|
||||
func (o *GetJobsObservableOK) GetPayload() []*devops_models.Job {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *GetJobsObservableOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
// hydrates response header Access-Control-Allow-Origin
|
||||
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
|
||||
|
||||
if hdrAccessControlAllowOrigin != "" {
|
||||
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
|
||||
}
|
||||
|
||||
// hydrates response header Cache-Control
|
||||
hdrCacheControl := response.GetHeader("Cache-Control")
|
||||
|
||||
if hdrCacheControl != "" {
|
||||
o.CacheControl = hdrCacheControl
|
||||
}
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewGetJobsObservableUnauthorized creates a GetJobsObservableUnauthorized with default headers values
|
||||
func NewGetJobsObservableUnauthorized() *GetJobsObservableUnauthorized {
|
||||
return &GetJobsObservableUnauthorized{}
|
||||
}
|
||||
|
||||
/* GetJobsObservableUnauthorized describes a response with status code 401, with default header values.
|
||||
|
||||
Access Unauthorized, invalid API-KEY was used
|
||||
*/
|
||||
type GetJobsObservableUnauthorized struct {
|
||||
AccessControlAllowOrigin string
|
||||
CacheControl string
|
||||
|
||||
Payload *devops_models.Error
|
||||
}
|
||||
|
||||
func (o *GetJobsObservableUnauthorized) Error() string {
|
||||
return fmt.Sprintf("[GET /jobs/observable][%d] getJobsObservableUnauthorized %+v", 401, o.Payload)
|
||||
}
|
||||
func (o *GetJobsObservableUnauthorized) GetPayload() *devops_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *GetJobsObservableUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
// hydrates response header Access-Control-Allow-Origin
|
||||
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
|
||||
|
||||
if hdrAccessControlAllowOrigin != "" {
|
||||
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
|
||||
}
|
||||
|
||||
// hydrates response header Cache-Control
|
||||
hdrCacheControl := response.GetHeader("Cache-Control")
|
||||
|
||||
if hdrCacheControl != "" {
|
||||
o.CacheControl = hdrCacheControl
|
||||
}
|
||||
|
||||
o.Payload = new(devops_models.Error)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewGetJobsObservableForbidden creates a GetJobsObservableForbidden with default headers values
|
||||
func NewGetJobsObservableForbidden() *GetJobsObservableForbidden {
|
||||
return &GetJobsObservableForbidden{}
|
||||
}
|
||||
|
||||
/* GetJobsObservableForbidden describes a response with status code 403, with default header values.
|
||||
|
||||
Access forbidden, account lacks access
|
||||
*/
|
||||
type GetJobsObservableForbidden struct {
|
||||
AccessControlAllowOrigin string
|
||||
|
||||
Payload *devops_models.Error
|
||||
}
|
||||
|
||||
func (o *GetJobsObservableForbidden) Error() string {
|
||||
return fmt.Sprintf("[GET /jobs/observable][%d] getJobsObservableForbidden %+v", 403, o.Payload)
|
||||
}
|
||||
func (o *GetJobsObservableForbidden) GetPayload() *devops_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *GetJobsObservableForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
// hydrates response header Access-Control-Allow-Origin
|
||||
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
|
||||
|
||||
if hdrAccessControlAllowOrigin != "" {
|
||||
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
|
||||
}
|
||||
|
||||
o.Payload = new(devops_models.Error)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewGetJobsObservableNotFound creates a GetJobsObservableNotFound with default headers values
|
||||
func NewGetJobsObservableNotFound() *GetJobsObservableNotFound {
|
||||
return &GetJobsObservableNotFound{}
|
||||
}
|
||||
|
||||
/* GetJobsObservableNotFound describes a response with status code 404, with default header values.
|
||||
|
||||
Resource was not found
|
||||
*/
|
||||
type GetJobsObservableNotFound struct {
|
||||
AccessControlAllowOrigin string
|
||||
|
||||
Payload *devops_models.Error
|
||||
}
|
||||
|
||||
func (o *GetJobsObservableNotFound) Error() string {
|
||||
return fmt.Sprintf("[GET /jobs/observable][%d] getJobsObservableNotFound %+v", 404, o.Payload)
|
||||
}
|
||||
func (o *GetJobsObservableNotFound) GetPayload() *devops_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *GetJobsObservableNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
// hydrates response header Access-Control-Allow-Origin
|
||||
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
|
||||
|
||||
if hdrAccessControlAllowOrigin != "" {
|
||||
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
|
||||
}
|
||||
|
||||
o.Payload = new(devops_models.Error)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewGetJobsObservableUnprocessableEntity creates a GetJobsObservableUnprocessableEntity with default headers values
|
||||
func NewGetJobsObservableUnprocessableEntity() *GetJobsObservableUnprocessableEntity {
|
||||
return &GetJobsObservableUnprocessableEntity{}
|
||||
}
|
||||
|
||||
/* GetJobsObservableUnprocessableEntity describes a response with status code 422, with default header values.
|
||||
|
||||
Unprocessable Entity, likely a bad parameter
|
||||
*/
|
||||
type GetJobsObservableUnprocessableEntity struct {
|
||||
AccessControlAllowOrigin string
|
||||
CacheControl string
|
||||
|
||||
Payload *devops_models.Error
|
||||
}
|
||||
|
||||
func (o *GetJobsObservableUnprocessableEntity) Error() string {
|
||||
return fmt.Sprintf("[GET /jobs/observable][%d] getJobsObservableUnprocessableEntity %+v", 422, o.Payload)
|
||||
}
|
||||
func (o *GetJobsObservableUnprocessableEntity) GetPayload() *devops_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *GetJobsObservableUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
// hydrates response header Access-Control-Allow-Origin
|
||||
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
|
||||
|
||||
if hdrAccessControlAllowOrigin != "" {
|
||||
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
|
||||
}
|
||||
|
||||
// hydrates response header Cache-Control
|
||||
hdrCacheControl := response.GetHeader("Cache-Control")
|
||||
|
||||
if hdrCacheControl != "" {
|
||||
o.CacheControl = hdrCacheControl
|
||||
}
|
||||
|
||||
o.Payload = new(devops_models.Error)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewGetJobsObservableInternalServerError creates a GetJobsObservableInternalServerError with default headers values
|
||||
func NewGetJobsObservableInternalServerError() *GetJobsObservableInternalServerError {
|
||||
return &GetJobsObservableInternalServerError{}
|
||||
}
|
||||
|
||||
/* GetJobsObservableInternalServerError describes a response with status code 500, with default header values.
|
||||
|
||||
Server Internal Error
|
||||
*/
|
||||
type GetJobsObservableInternalServerError struct {
|
||||
AccessControlAllowOrigin string
|
||||
|
||||
Payload *devops_models.Error
|
||||
}
|
||||
|
||||
func (o *GetJobsObservableInternalServerError) Error() string {
|
||||
return fmt.Sprintf("[GET /jobs/observable][%d] getJobsObservableInternalServerError %+v", 500, o.Payload)
|
||||
}
|
||||
func (o *GetJobsObservableInternalServerError) GetPayload() *devops_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *GetJobsObservableInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
// hydrates response header Access-Control-Allow-Origin
|
||||
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
|
||||
|
||||
if hdrAccessControlAllowOrigin != "" {
|
||||
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
|
||||
}
|
||||
|
||||
o.Payload = new(devops_models.Error)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
|
@ -1,340 +0,0 @@
|
|||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
// (c) 2012-2020 by Taxnexus, Inc.
|
||||
// All rights reserved worldwide.
|
||||
// Proprietary product; unlicensed use is not allowed
|
||||
|
||||
package job
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
// Editing this file might prove futile when you re-run the swagger generate command
|
||||
|
||||
import (
|
||||
"context"
|
||||
"net/http"
|
||||
"time"
|
||||
|
||||
"github.com/go-openapi/errors"
|
||||
"github.com/go-openapi/runtime"
|
||||
cr "github.com/go-openapi/runtime/client"
|
||||
"github.com/go-openapi/strfmt"
|
||||
"github.com/go-openapi/swag"
|
||||
)
|
||||
|
||||
// NewGetJobsParams creates a new GetJobsParams object,
|
||||
// with the default timeout for this client.
|
||||
//
|
||||
// Default values are not hydrated, since defaults are normally applied by the API server side.
|
||||
//
|
||||
// To enforce default values in parameter, use SetDefaults or WithDefaults.
|
||||
func NewGetJobsParams() *GetJobsParams {
|
||||
return &GetJobsParams{
|
||||
timeout: cr.DefaultTimeout,
|
||||
}
|
||||
}
|
||||
|
||||
// NewGetJobsParamsWithTimeout creates a new GetJobsParams object
|
||||
// with the ability to set a timeout on a request.
|
||||
func NewGetJobsParamsWithTimeout(timeout time.Duration) *GetJobsParams {
|
||||
return &GetJobsParams{
|
||||
timeout: timeout,
|
||||
}
|
||||
}
|
||||
|
||||
// NewGetJobsParamsWithContext creates a new GetJobsParams object
|
||||
// with the ability to set a context for a request.
|
||||
func NewGetJobsParamsWithContext(ctx context.Context) *GetJobsParams {
|
||||
return &GetJobsParams{
|
||||
Context: ctx,
|
||||
}
|
||||
}
|
||||
|
||||
// NewGetJobsParamsWithHTTPClient creates a new GetJobsParams object
|
||||
// with the ability to set a custom HTTPClient for a request.
|
||||
func NewGetJobsParamsWithHTTPClient(client *http.Client) *GetJobsParams {
|
||||
return &GetJobsParams{
|
||||
HTTPClient: client,
|
||||
}
|
||||
}
|
||||
|
||||
/* GetJobsParams contains all the parameters to send to the API endpoint
|
||||
for the get jobs operation.
|
||||
|
||||
Typically these are written to a http.Request.
|
||||
*/
|
||||
type GetJobsParams struct {
|
||||
|
||||
/* AccountID.
|
||||
|
||||
Taxnexus Record Id of an Account
|
||||
*/
|
||||
AccountID *string
|
||||
|
||||
/* Active.
|
||||
|
||||
Retrieve active records only?
|
||||
*/
|
||||
Active *bool
|
||||
|
||||
/* CompanyID.
|
||||
|
||||
Taxnexus Record Id of a Company
|
||||
*/
|
||||
CompanyID *string
|
||||
|
||||
/* JobID.
|
||||
|
||||
Taxnexus Record Id of a Job
|
||||
*/
|
||||
JobID *string
|
||||
|
||||
/* Limit.
|
||||
|
||||
How many objects to return at one time
|
||||
|
||||
Format: int64
|
||||
*/
|
||||
Limit *int64
|
||||
|
||||
/* Offset.
|
||||
|
||||
How many objects to skip? (default 0)
|
||||
|
||||
Format: int64
|
||||
*/
|
||||
Offset *int64
|
||||
|
||||
timeout time.Duration
|
||||
Context context.Context
|
||||
HTTPClient *http.Client
|
||||
}
|
||||
|
||||
// WithDefaults hydrates default values in the get jobs params (not the query body).
|
||||
//
|
||||
// All values with no default are reset to their zero value.
|
||||
func (o *GetJobsParams) WithDefaults() *GetJobsParams {
|
||||
o.SetDefaults()
|
||||
return o
|
||||
}
|
||||
|
||||
// SetDefaults hydrates default values in the get jobs params (not the query body).
|
||||
//
|
||||
// All values with no default are reset to their zero value.
|
||||
func (o *GetJobsParams) SetDefaults() {
|
||||
// no default values defined for this parameter
|
||||
}
|
||||
|
||||
// WithTimeout adds the timeout to the get jobs params
|
||||
func (o *GetJobsParams) WithTimeout(timeout time.Duration) *GetJobsParams {
|
||||
o.SetTimeout(timeout)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetTimeout adds the timeout to the get jobs params
|
||||
func (o *GetJobsParams) SetTimeout(timeout time.Duration) {
|
||||
o.timeout = timeout
|
||||
}
|
||||
|
||||
// WithContext adds the context to the get jobs params
|
||||
func (o *GetJobsParams) WithContext(ctx context.Context) *GetJobsParams {
|
||||
o.SetContext(ctx)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetContext adds the context to the get jobs params
|
||||
func (o *GetJobsParams) SetContext(ctx context.Context) {
|
||||
o.Context = ctx
|
||||
}
|
||||
|
||||
// WithHTTPClient adds the HTTPClient to the get jobs params
|
||||
func (o *GetJobsParams) WithHTTPClient(client *http.Client) *GetJobsParams {
|
||||
o.SetHTTPClient(client)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetHTTPClient adds the HTTPClient to the get jobs params
|
||||
func (o *GetJobsParams) SetHTTPClient(client *http.Client) {
|
||||
o.HTTPClient = client
|
||||
}
|
||||
|
||||
// WithAccountID adds the accountID to the get jobs params
|
||||
func (o *GetJobsParams) WithAccountID(accountID *string) *GetJobsParams {
|
||||
o.SetAccountID(accountID)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetAccountID adds the accountId to the get jobs params
|
||||
func (o *GetJobsParams) SetAccountID(accountID *string) {
|
||||
o.AccountID = accountID
|
||||
}
|
||||
|
||||
// WithActive adds the active to the get jobs params
|
||||
func (o *GetJobsParams) WithActive(active *bool) *GetJobsParams {
|
||||
o.SetActive(active)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetActive adds the active to the get jobs params
|
||||
func (o *GetJobsParams) SetActive(active *bool) {
|
||||
o.Active = active
|
||||
}
|
||||
|
||||
// WithCompanyID adds the companyID to the get jobs params
|
||||
func (o *GetJobsParams) WithCompanyID(companyID *string) *GetJobsParams {
|
||||
o.SetCompanyID(companyID)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetCompanyID adds the companyId to the get jobs params
|
||||
func (o *GetJobsParams) SetCompanyID(companyID *string) {
|
||||
o.CompanyID = companyID
|
||||
}
|
||||
|
||||
// WithJobID adds the jobID to the get jobs params
|
||||
func (o *GetJobsParams) WithJobID(jobID *string) *GetJobsParams {
|
||||
o.SetJobID(jobID)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetJobID adds the jobId to the get jobs params
|
||||
func (o *GetJobsParams) SetJobID(jobID *string) {
|
||||
o.JobID = jobID
|
||||
}
|
||||
|
||||
// WithLimit adds the limit to the get jobs params
|
||||
func (o *GetJobsParams) WithLimit(limit *int64) *GetJobsParams {
|
||||
o.SetLimit(limit)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetLimit adds the limit to the get jobs params
|
||||
func (o *GetJobsParams) SetLimit(limit *int64) {
|
||||
o.Limit = limit
|
||||
}
|
||||
|
||||
// WithOffset adds the offset to the get jobs params
|
||||
func (o *GetJobsParams) WithOffset(offset *int64) *GetJobsParams {
|
||||
o.SetOffset(offset)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetOffset adds the offset to the get jobs params
|
||||
func (o *GetJobsParams) SetOffset(offset *int64) {
|
||||
o.Offset = offset
|
||||
}
|
||||
|
||||
// WriteToRequest writes these params to a swagger request
|
||||
func (o *GetJobsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
|
||||
|
||||
if err := r.SetTimeout(o.timeout); err != nil {
|
||||
return err
|
||||
}
|
||||
var res []error
|
||||
|
||||
if o.AccountID != nil {
|
||||
|
||||
// query param accountId
|
||||
var qrAccountID string
|
||||
|
||||
if o.AccountID != nil {
|
||||
qrAccountID = *o.AccountID
|
||||
}
|
||||
qAccountID := qrAccountID
|
||||
if qAccountID != "" {
|
||||
|
||||
if err := r.SetQueryParam("accountId", qAccountID); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if o.Active != nil {
|
||||
|
||||
// query param active
|
||||
var qrActive bool
|
||||
|
||||
if o.Active != nil {
|
||||
qrActive = *o.Active
|
||||
}
|
||||
qActive := swag.FormatBool(qrActive)
|
||||
if qActive != "" {
|
||||
|
||||
if err := r.SetQueryParam("active", qActive); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if o.CompanyID != nil {
|
||||
|
||||
// query param companyId
|
||||
var qrCompanyID string
|
||||
|
||||
if o.CompanyID != nil {
|
||||
qrCompanyID = *o.CompanyID
|
||||
}
|
||||
qCompanyID := qrCompanyID
|
||||
if qCompanyID != "" {
|
||||
|
||||
if err := r.SetQueryParam("companyId", qCompanyID); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if o.JobID != nil {
|
||||
|
||||
// query param jobId
|
||||
var qrJobID string
|
||||
|
||||
if o.JobID != nil {
|
||||
qrJobID = *o.JobID
|
||||
}
|
||||
qJobID := qrJobID
|
||||
if qJobID != "" {
|
||||
|
||||
if err := r.SetQueryParam("jobId", qJobID); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if o.Limit != nil {
|
||||
|
||||
// query param limit
|
||||
var qrLimit int64
|
||||
|
||||
if o.Limit != nil {
|
||||
qrLimit = *o.Limit
|
||||
}
|
||||
qLimit := swag.FormatInt64(qrLimit)
|
||||
if qLimit != "" {
|
||||
|
||||
if err := r.SetQueryParam("limit", qLimit); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if o.Offset != nil {
|
||||
|
||||
// query param offset
|
||||
var qrOffset int64
|
||||
|
||||
if o.Offset != nil {
|
||||
qrOffset = *o.Offset
|
||||
}
|
||||
qOffset := swag.FormatInt64(qrOffset)
|
||||
if qOffset != "" {
|
||||
|
||||
if err := r.SetQueryParam("offset", qOffset); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if len(res) > 0 {
|
||||
return errors.CompositeValidationError(res...)
|
||||
}
|
||||
return nil
|
||||
}
|
|
@ -1,339 +0,0 @@
|
|||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
// (c) 2012-2020 by Taxnexus, Inc.
|
||||
// All rights reserved worldwide.
|
||||
// Proprietary product; unlicensed use is not allowed
|
||||
|
||||
package job
|
||||
|
||||
// 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"
|
||||
|
||||
"code.tnxs.net/vernonkeenan/lib/api/devops/devops_models"
|
||||
)
|
||||
|
||||
// GetJobsReader is a Reader for the GetJobs structure.
|
||||
type GetJobsReader struct {
|
||||
formats strfmt.Registry
|
||||
}
|
||||
|
||||
// ReadResponse reads a server response into the received o.
|
||||
func (o *GetJobsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
|
||||
switch response.Code() {
|
||||
case 200:
|
||||
result := NewGetJobsOK()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return result, nil
|
||||
case 401:
|
||||
result := NewGetJobsUnauthorized()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return nil, result
|
||||
case 403:
|
||||
result := NewGetJobsForbidden()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return nil, result
|
||||
case 404:
|
||||
result := NewGetJobsNotFound()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return nil, result
|
||||
case 422:
|
||||
result := NewGetJobsUnprocessableEntity()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return nil, result
|
||||
case 500:
|
||||
result := NewGetJobsInternalServerError()
|
||||
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())
|
||||
}
|
||||
}
|
||||
|
||||
// NewGetJobsOK creates a GetJobsOK with default headers values
|
||||
func NewGetJobsOK() *GetJobsOK {
|
||||
return &GetJobsOK{}
|
||||
}
|
||||
|
||||
/* GetJobsOK describes a response with status code 200, with default header values.
|
||||
|
||||
Taxnexus Response with Job objects
|
||||
*/
|
||||
type GetJobsOK struct {
|
||||
AccessControlAllowOrigin string
|
||||
CacheControl string
|
||||
|
||||
Payload *devops_models.JobResponse
|
||||
}
|
||||
|
||||
func (o *GetJobsOK) Error() string {
|
||||
return fmt.Sprintf("[GET /jobs][%d] getJobsOK %+v", 200, o.Payload)
|
||||
}
|
||||
func (o *GetJobsOK) GetPayload() *devops_models.JobResponse {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *GetJobsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
// hydrates response header Access-Control-Allow-Origin
|
||||
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
|
||||
|
||||
if hdrAccessControlAllowOrigin != "" {
|
||||
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
|
||||
}
|
||||
|
||||
// hydrates response header Cache-Control
|
||||
hdrCacheControl := response.GetHeader("Cache-Control")
|
||||
|
||||
if hdrCacheControl != "" {
|
||||
o.CacheControl = hdrCacheControl
|
||||
}
|
||||
|
||||
o.Payload = new(devops_models.JobResponse)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewGetJobsUnauthorized creates a GetJobsUnauthorized with default headers values
|
||||
func NewGetJobsUnauthorized() *GetJobsUnauthorized {
|
||||
return &GetJobsUnauthorized{}
|
||||
}
|
||||
|
||||
/* GetJobsUnauthorized describes a response with status code 401, with default header values.
|
||||
|
||||
Access Unauthorized, invalid API-KEY was used
|
||||
*/
|
||||
type GetJobsUnauthorized struct {
|
||||
AccessControlAllowOrigin string
|
||||
CacheControl string
|
||||
|
||||
Payload *devops_models.Error
|
||||
}
|
||||
|
||||
func (o *GetJobsUnauthorized) Error() string {
|
||||
return fmt.Sprintf("[GET /jobs][%d] getJobsUnauthorized %+v", 401, o.Payload)
|
||||
}
|
||||
func (o *GetJobsUnauthorized) GetPayload() *devops_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *GetJobsUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
// hydrates response header Access-Control-Allow-Origin
|
||||
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
|
||||
|
||||
if hdrAccessControlAllowOrigin != "" {
|
||||
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
|
||||
}
|
||||
|
||||
// hydrates response header Cache-Control
|
||||
hdrCacheControl := response.GetHeader("Cache-Control")
|
||||
|
||||
if hdrCacheControl != "" {
|
||||
o.CacheControl = hdrCacheControl
|
||||
}
|
||||
|
||||
o.Payload = new(devops_models.Error)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewGetJobsForbidden creates a GetJobsForbidden with default headers values
|
||||
func NewGetJobsForbidden() *GetJobsForbidden {
|
||||
return &GetJobsForbidden{}
|
||||
}
|
||||
|
||||
/* GetJobsForbidden describes a response with status code 403, with default header values.
|
||||
|
||||
Access forbidden, account lacks access
|
||||
*/
|
||||
type GetJobsForbidden struct {
|
||||
AccessControlAllowOrigin string
|
||||
|
||||
Payload *devops_models.Error
|
||||
}
|
||||
|
||||
func (o *GetJobsForbidden) Error() string {
|
||||
return fmt.Sprintf("[GET /jobs][%d] getJobsForbidden %+v", 403, o.Payload)
|
||||
}
|
||||
func (o *GetJobsForbidden) GetPayload() *devops_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *GetJobsForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
// hydrates response header Access-Control-Allow-Origin
|
||||
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
|
||||
|
||||
if hdrAccessControlAllowOrigin != "" {
|
||||
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
|
||||
}
|
||||
|
||||
o.Payload = new(devops_models.Error)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewGetJobsNotFound creates a GetJobsNotFound with default headers values
|
||||
func NewGetJobsNotFound() *GetJobsNotFound {
|
||||
return &GetJobsNotFound{}
|
||||
}
|
||||
|
||||
/* GetJobsNotFound describes a response with status code 404, with default header values.
|
||||
|
||||
Resource was not found
|
||||
*/
|
||||
type GetJobsNotFound struct {
|
||||
AccessControlAllowOrigin string
|
||||
|
||||
Payload *devops_models.Error
|
||||
}
|
||||
|
||||
func (o *GetJobsNotFound) Error() string {
|
||||
return fmt.Sprintf("[GET /jobs][%d] getJobsNotFound %+v", 404, o.Payload)
|
||||
}
|
||||
func (o *GetJobsNotFound) GetPayload() *devops_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *GetJobsNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
// hydrates response header Access-Control-Allow-Origin
|
||||
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
|
||||
|
||||
if hdrAccessControlAllowOrigin != "" {
|
||||
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
|
||||
}
|
||||
|
||||
o.Payload = new(devops_models.Error)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewGetJobsUnprocessableEntity creates a GetJobsUnprocessableEntity with default headers values
|
||||
func NewGetJobsUnprocessableEntity() *GetJobsUnprocessableEntity {
|
||||
return &GetJobsUnprocessableEntity{}
|
||||
}
|
||||
|
||||
/* GetJobsUnprocessableEntity describes a response with status code 422, with default header values.
|
||||
|
||||
Unprocessable Entity, likely a bad parameter
|
||||
*/
|
||||
type GetJobsUnprocessableEntity struct {
|
||||
AccessControlAllowOrigin string
|
||||
CacheControl string
|
||||
|
||||
Payload *devops_models.Error
|
||||
}
|
||||
|
||||
func (o *GetJobsUnprocessableEntity) Error() string {
|
||||
return fmt.Sprintf("[GET /jobs][%d] getJobsUnprocessableEntity %+v", 422, o.Payload)
|
||||
}
|
||||
func (o *GetJobsUnprocessableEntity) GetPayload() *devops_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *GetJobsUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
// hydrates response header Access-Control-Allow-Origin
|
||||
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
|
||||
|
||||
if hdrAccessControlAllowOrigin != "" {
|
||||
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
|
||||
}
|
||||
|
||||
// hydrates response header Cache-Control
|
||||
hdrCacheControl := response.GetHeader("Cache-Control")
|
||||
|
||||
if hdrCacheControl != "" {
|
||||
o.CacheControl = hdrCacheControl
|
||||
}
|
||||
|
||||
o.Payload = new(devops_models.Error)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewGetJobsInternalServerError creates a GetJobsInternalServerError with default headers values
|
||||
func NewGetJobsInternalServerError() *GetJobsInternalServerError {
|
||||
return &GetJobsInternalServerError{}
|
||||
}
|
||||
|
||||
/* GetJobsInternalServerError describes a response with status code 500, with default header values.
|
||||
|
||||
Server Internal Error
|
||||
*/
|
||||
type GetJobsInternalServerError struct {
|
||||
AccessControlAllowOrigin string
|
||||
|
||||
Payload *devops_models.Error
|
||||
}
|
||||
|
||||
func (o *GetJobsInternalServerError) Error() string {
|
||||
return fmt.Sprintf("[GET /jobs][%d] getJobsInternalServerError %+v", 500, o.Payload)
|
||||
}
|
||||
func (o *GetJobsInternalServerError) GetPayload() *devops_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *GetJobsInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
// hydrates response header Access-Control-Allow-Origin
|
||||
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
|
||||
|
||||
if hdrAccessControlAllowOrigin != "" {
|
||||
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
|
||||
}
|
||||
|
||||
o.Payload = new(devops_models.Error)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
|
@ -1,258 +0,0 @@
|
|||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
// (c) 2012-2020 by Taxnexus, Inc.
|
||||
// All rights reserved worldwide.
|
||||
// Proprietary product; unlicensed use is not allowed
|
||||
|
||||
package job
|
||||
|
||||
// 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"
|
||||
)
|
||||
|
||||
// New creates a new job API client.
|
||||
func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService {
|
||||
return &Client{transport: transport, formats: formats}
|
||||
}
|
||||
|
||||
/*
|
||||
Client for job API
|
||||
*/
|
||||
type Client struct {
|
||||
transport runtime.ClientTransport
|
||||
formats strfmt.Registry
|
||||
}
|
||||
|
||||
// ClientOption is the option for Client methods
|
||||
type ClientOption func(*runtime.ClientOperation)
|
||||
|
||||
// ClientService is the interface for Client methods
|
||||
type ClientService interface {
|
||||
GetJob(params *GetJobParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetJobOK, error)
|
||||
|
||||
GetJobs(params *GetJobsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetJobsOK, error)
|
||||
|
||||
GetJobsObservable(params *GetJobsObservableParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetJobsObservableOK, error)
|
||||
|
||||
PostJobs(params *PostJobsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PostJobsOK, error)
|
||||
|
||||
PutJobs(params *PutJobsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PutJobsOK, error)
|
||||
|
||||
SetTransport(transport runtime.ClientTransport)
|
||||
}
|
||||
|
||||
/*
|
||||
GetJob gets a single job object
|
||||
|
||||
Return a single Job object from datastore as a Singleton
|
||||
*/
|
||||
func (a *Client) GetJob(params *GetJobParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetJobOK, error) {
|
||||
// TODO: Validate the params before sending
|
||||
if params == nil {
|
||||
params = NewGetJobParams()
|
||||
}
|
||||
op := &runtime.ClientOperation{
|
||||
ID: "getJob",
|
||||
Method: "GET",
|
||||
PathPattern: "/jobs/{jobIdPath}",
|
||||
ProducesMediaTypes: []string{"application/json"},
|
||||
ConsumesMediaTypes: []string{"application/json"},
|
||||
Schemes: []string{"http"},
|
||||
Params: params,
|
||||
Reader: &GetJobReader{formats: a.formats},
|
||||
AuthInfo: authInfo,
|
||||
Context: params.Context,
|
||||
Client: params.HTTPClient,
|
||||
}
|
||||
for _, opt := range opts {
|
||||
opt(op)
|
||||
}
|
||||
|
||||
result, err := a.transport.Submit(op)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
success, ok := result.(*GetJobOK)
|
||||
if ok {
|
||||
return success, nil
|
||||
}
|
||||
// unexpected success response
|
||||
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
||||
msg := fmt.Sprintf("unexpected success response for getJob: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||||
panic(msg)
|
||||
}
|
||||
|
||||
/*
|
||||
GetJobs gets a list jobs
|
||||
|
||||
Return a list of Job records from the datastore
|
||||
*/
|
||||
func (a *Client) GetJobs(params *GetJobsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetJobsOK, error) {
|
||||
// TODO: Validate the params before sending
|
||||
if params == nil {
|
||||
params = NewGetJobsParams()
|
||||
}
|
||||
op := &runtime.ClientOperation{
|
||||
ID: "getJobs",
|
||||
Method: "GET",
|
||||
PathPattern: "/jobs",
|
||||
ProducesMediaTypes: []string{"application/json"},
|
||||
ConsumesMediaTypes: []string{"application/json"},
|
||||
Schemes: []string{"http"},
|
||||
Params: params,
|
||||
Reader: &GetJobsReader{formats: a.formats},
|
||||
AuthInfo: authInfo,
|
||||
Context: params.Context,
|
||||
Client: params.HTTPClient,
|
||||
}
|
||||
for _, opt := range opts {
|
||||
opt(op)
|
||||
}
|
||||
|
||||
result, err := a.transport.Submit(op)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
success, ok := result.(*GetJobsOK)
|
||||
if ok {
|
||||
return success, nil
|
||||
}
|
||||
// unexpected success response
|
||||
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
||||
msg := fmt.Sprintf("unexpected success response for getJobs: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||||
panic(msg)
|
||||
}
|
||||
|
||||
/*
|
||||
GetJobsObservable gets jobs in an observable array
|
||||
|
||||
Returns a Job retrieval in a observable array
|
||||
*/
|
||||
func (a *Client) GetJobsObservable(params *GetJobsObservableParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetJobsObservableOK, error) {
|
||||
// TODO: Validate the params before sending
|
||||
if params == nil {
|
||||
params = NewGetJobsObservableParams()
|
||||
}
|
||||
op := &runtime.ClientOperation{
|
||||
ID: "getJobsObservable",
|
||||
Method: "GET",
|
||||
PathPattern: "/jobs/observable",
|
||||
ProducesMediaTypes: []string{"application/json"},
|
||||
ConsumesMediaTypes: []string{"application/json"},
|
||||
Schemes: []string{"http"},
|
||||
Params: params,
|
||||
Reader: &GetJobsObservableReader{formats: a.formats},
|
||||
AuthInfo: authInfo,
|
||||
Context: params.Context,
|
||||
Client: params.HTTPClient,
|
||||
}
|
||||
for _, opt := range opts {
|
||||
opt(op)
|
||||
}
|
||||
|
||||
result, err := a.transport.Submit(op)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
success, ok := result.(*GetJobsObservableOK)
|
||||
if ok {
|
||||
return success, nil
|
||||
}
|
||||
// unexpected success response
|
||||
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
||||
msg := fmt.Sprintf("unexpected success response for getJobsObservable: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||||
panic(msg)
|
||||
}
|
||||
|
||||
/*
|
||||
PostJobs creates new jobs
|
||||
|
||||
Create and enqueue Jobs in Taxnexus
|
||||
*/
|
||||
func (a *Client) PostJobs(params *PostJobsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PostJobsOK, error) {
|
||||
// TODO: Validate the params before sending
|
||||
if params == nil {
|
||||
params = NewPostJobsParams()
|
||||
}
|
||||
op := &runtime.ClientOperation{
|
||||
ID: "postJobs",
|
||||
Method: "POST",
|
||||
PathPattern: "/jobs",
|
||||
ProducesMediaTypes: []string{"application/json"},
|
||||
ConsumesMediaTypes: []string{"application/json"},
|
||||
Schemes: []string{"http"},
|
||||
Params: params,
|
||||
Reader: &PostJobsReader{formats: a.formats},
|
||||
AuthInfo: authInfo,
|
||||
Context: params.Context,
|
||||
Client: params.HTTPClient,
|
||||
}
|
||||
for _, opt := range opts {
|
||||
opt(op)
|
||||
}
|
||||
|
||||
result, err := a.transport.Submit(op)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
success, ok := result.(*PostJobsOK)
|
||||
if ok {
|
||||
return success, nil
|
||||
}
|
||||
// unexpected success response
|
||||
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
||||
msg := fmt.Sprintf("unexpected success response for postJobs: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||||
panic(msg)
|
||||
}
|
||||
|
||||
/*
|
||||
PutJobs updates jobs
|
||||
|
||||
Update Jobs in Taxnexus
|
||||
*/
|
||||
func (a *Client) PutJobs(params *PutJobsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PutJobsOK, error) {
|
||||
// TODO: Validate the params before sending
|
||||
if params == nil {
|
||||
params = NewPutJobsParams()
|
||||
}
|
||||
op := &runtime.ClientOperation{
|
||||
ID: "putJobs",
|
||||
Method: "PUT",
|
||||
PathPattern: "/jobs",
|
||||
ProducesMediaTypes: []string{"application/json"},
|
||||
ConsumesMediaTypes: []string{"application/json"},
|
||||
Schemes: []string{"http"},
|
||||
Params: params,
|
||||
Reader: &PutJobsReader{formats: a.formats},
|
||||
AuthInfo: authInfo,
|
||||
Context: params.Context,
|
||||
Client: params.HTTPClient,
|
||||
}
|
||||
for _, opt := range opts {
|
||||
opt(op)
|
||||
}
|
||||
|
||||
result, err := a.transport.Submit(op)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
success, ok := result.(*PutJobsOK)
|
||||
if ok {
|
||||
return success, nil
|
||||
}
|
||||
// unexpected success response
|
||||
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
||||
msg := fmt.Sprintf("unexpected success response for putJobs: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||||
panic(msg)
|
||||
}
|
||||
|
||||
// SetTransport changes the transport on the client
|
||||
func (a *Client) SetTransport(transport runtime.ClientTransport) {
|
||||
a.transport = transport
|
||||
}
|
|
@ -1,155 +0,0 @@
|
|||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
// (c) 2012-2020 by Taxnexus, Inc.
|
||||
// All rights reserved worldwide.
|
||||
// Proprietary product; unlicensed use is not allowed
|
||||
|
||||
package job
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
// Editing this file might prove futile when you re-run the swagger generate command
|
||||
|
||||
import (
|
||||
"context"
|
||||
"net/http"
|
||||
"time"
|
||||
|
||||
"github.com/go-openapi/errors"
|
||||
"github.com/go-openapi/runtime"
|
||||
cr "github.com/go-openapi/runtime/client"
|
||||
"github.com/go-openapi/strfmt"
|
||||
|
||||
"code.tnxs.net/vernonkeenan/lib/api/devops/devops_models"
|
||||
)
|
||||
|
||||
// NewPostJobsParams creates a new PostJobsParams object,
|
||||
// with the default timeout for this client.
|
||||
//
|
||||
// Default values are not hydrated, since defaults are normally applied by the API server side.
|
||||
//
|
||||
// To enforce default values in parameter, use SetDefaults or WithDefaults.
|
||||
func NewPostJobsParams() *PostJobsParams {
|
||||
return &PostJobsParams{
|
||||
timeout: cr.DefaultTimeout,
|
||||
}
|
||||
}
|
||||
|
||||
// NewPostJobsParamsWithTimeout creates a new PostJobsParams object
|
||||
// with the ability to set a timeout on a request.
|
||||
func NewPostJobsParamsWithTimeout(timeout time.Duration) *PostJobsParams {
|
||||
return &PostJobsParams{
|
||||
timeout: timeout,
|
||||
}
|
||||
}
|
||||
|
||||
// NewPostJobsParamsWithContext creates a new PostJobsParams object
|
||||
// with the ability to set a context for a request.
|
||||
func NewPostJobsParamsWithContext(ctx context.Context) *PostJobsParams {
|
||||
return &PostJobsParams{
|
||||
Context: ctx,
|
||||
}
|
||||
}
|
||||
|
||||
// NewPostJobsParamsWithHTTPClient creates a new PostJobsParams object
|
||||
// with the ability to set a custom HTTPClient for a request.
|
||||
func NewPostJobsParamsWithHTTPClient(client *http.Client) *PostJobsParams {
|
||||
return &PostJobsParams{
|
||||
HTTPClient: client,
|
||||
}
|
||||
}
|
||||
|
||||
/* PostJobsParams contains all the parameters to send to the API endpoint
|
||||
for the post jobs operation.
|
||||
|
||||
Typically these are written to a http.Request.
|
||||
*/
|
||||
type PostJobsParams struct {
|
||||
|
||||
/* JobRequest.
|
||||
|
||||
An array of Job records
|
||||
*/
|
||||
JobRequest *devops_models.JobRequest
|
||||
|
||||
timeout time.Duration
|
||||
Context context.Context
|
||||
HTTPClient *http.Client
|
||||
}
|
||||
|
||||
// WithDefaults hydrates default values in the post jobs params (not the query body).
|
||||
//
|
||||
// All values with no default are reset to their zero value.
|
||||
func (o *PostJobsParams) WithDefaults() *PostJobsParams {
|
||||
o.SetDefaults()
|
||||
return o
|
||||
}
|
||||
|
||||
// SetDefaults hydrates default values in the post jobs params (not the query body).
|
||||
//
|
||||
// All values with no default are reset to their zero value.
|
||||
func (o *PostJobsParams) SetDefaults() {
|
||||
// no default values defined for this parameter
|
||||
}
|
||||
|
||||
// WithTimeout adds the timeout to the post jobs params
|
||||
func (o *PostJobsParams) WithTimeout(timeout time.Duration) *PostJobsParams {
|
||||
o.SetTimeout(timeout)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetTimeout adds the timeout to the post jobs params
|
||||
func (o *PostJobsParams) SetTimeout(timeout time.Duration) {
|
||||
o.timeout = timeout
|
||||
}
|
||||
|
||||
// WithContext adds the context to the post jobs params
|
||||
func (o *PostJobsParams) WithContext(ctx context.Context) *PostJobsParams {
|
||||
o.SetContext(ctx)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetContext adds the context to the post jobs params
|
||||
func (o *PostJobsParams) SetContext(ctx context.Context) {
|
||||
o.Context = ctx
|
||||
}
|
||||
|
||||
// WithHTTPClient adds the HTTPClient to the post jobs params
|
||||
func (o *PostJobsParams) WithHTTPClient(client *http.Client) *PostJobsParams {
|
||||
o.SetHTTPClient(client)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetHTTPClient adds the HTTPClient to the post jobs params
|
||||
func (o *PostJobsParams) SetHTTPClient(client *http.Client) {
|
||||
o.HTTPClient = client
|
||||
}
|
||||
|
||||
// WithJobRequest adds the jobRequest to the post jobs params
|
||||
func (o *PostJobsParams) WithJobRequest(jobRequest *devops_models.JobRequest) *PostJobsParams {
|
||||
o.SetJobRequest(jobRequest)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetJobRequest adds the jobRequest to the post jobs params
|
||||
func (o *PostJobsParams) SetJobRequest(jobRequest *devops_models.JobRequest) {
|
||||
o.JobRequest = jobRequest
|
||||
}
|
||||
|
||||
// WriteToRequest writes these params to a swagger request
|
||||
func (o *PostJobsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
|
||||
|
||||
if err := r.SetTimeout(o.timeout); err != nil {
|
||||
return err
|
||||
}
|
||||
var res []error
|
||||
if o.JobRequest != nil {
|
||||
if err := r.SetBodyParam(o.JobRequest); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
if len(res) > 0 {
|
||||
return errors.CompositeValidationError(res...)
|
||||
}
|
||||
return nil
|
||||
}
|
|
@ -1,339 +0,0 @@
|
|||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
// (c) 2012-2020 by Taxnexus, Inc.
|
||||
// All rights reserved worldwide.
|
||||
// Proprietary product; unlicensed use is not allowed
|
||||
|
||||
package job
|
||||
|
||||
// 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"
|
||||
|
||||
"code.tnxs.net/vernonkeenan/lib/api/devops/devops_models"
|
||||
)
|
||||
|
||||
// PostJobsReader is a Reader for the PostJobs structure.
|
||||
type PostJobsReader struct {
|
||||
formats strfmt.Registry
|
||||
}
|
||||
|
||||
// ReadResponse reads a server response into the received o.
|
||||
func (o *PostJobsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
|
||||
switch response.Code() {
|
||||
case 200:
|
||||
result := NewPostJobsOK()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return result, nil
|
||||
case 401:
|
||||
result := NewPostJobsUnauthorized()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return nil, result
|
||||
case 403:
|
||||
result := NewPostJobsForbidden()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return nil, result
|
||||
case 404:
|
||||
result := NewPostJobsNotFound()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return nil, result
|
||||
case 422:
|
||||
result := NewPostJobsUnprocessableEntity()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return nil, result
|
||||
case 500:
|
||||
result := NewPostJobsInternalServerError()
|
||||
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())
|
||||
}
|
||||
}
|
||||
|
||||
// NewPostJobsOK creates a PostJobsOK with default headers values
|
||||
func NewPostJobsOK() *PostJobsOK {
|
||||
return &PostJobsOK{}
|
||||
}
|
||||
|
||||
/* PostJobsOK describes a response with status code 200, with default header values.
|
||||
|
||||
Taxnexus Response with Job objects
|
||||
*/
|
||||
type PostJobsOK struct {
|
||||
AccessControlAllowOrigin string
|
||||
CacheControl string
|
||||
|
||||
Payload *devops_models.JobResponse
|
||||
}
|
||||
|
||||
func (o *PostJobsOK) Error() string {
|
||||
return fmt.Sprintf("[POST /jobs][%d] postJobsOK %+v", 200, o.Payload)
|
||||
}
|
||||
func (o *PostJobsOK) GetPayload() *devops_models.JobResponse {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *PostJobsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
// hydrates response header Access-Control-Allow-Origin
|
||||
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
|
||||
|
||||
if hdrAccessControlAllowOrigin != "" {
|
||||
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
|
||||
}
|
||||
|
||||
// hydrates response header Cache-Control
|
||||
hdrCacheControl := response.GetHeader("Cache-Control")
|
||||
|
||||
if hdrCacheControl != "" {
|
||||
o.CacheControl = hdrCacheControl
|
||||
}
|
||||
|
||||
o.Payload = new(devops_models.JobResponse)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewPostJobsUnauthorized creates a PostJobsUnauthorized with default headers values
|
||||
func NewPostJobsUnauthorized() *PostJobsUnauthorized {
|
||||
return &PostJobsUnauthorized{}
|
||||
}
|
||||
|
||||
/* PostJobsUnauthorized describes a response with status code 401, with default header values.
|
||||
|
||||
Access Unauthorized, invalid API-KEY was used
|
||||
*/
|
||||
type PostJobsUnauthorized struct {
|
||||
AccessControlAllowOrigin string
|
||||
CacheControl string
|
||||
|
||||
Payload *devops_models.Error
|
||||
}
|
||||
|
||||
func (o *PostJobsUnauthorized) Error() string {
|
||||
return fmt.Sprintf("[POST /jobs][%d] postJobsUnauthorized %+v", 401, o.Payload)
|
||||
}
|
||||
func (o *PostJobsUnauthorized) GetPayload() *devops_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *PostJobsUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
// hydrates response header Access-Control-Allow-Origin
|
||||
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
|
||||
|
||||
if hdrAccessControlAllowOrigin != "" {
|
||||
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
|
||||
}
|
||||
|
||||
// hydrates response header Cache-Control
|
||||
hdrCacheControl := response.GetHeader("Cache-Control")
|
||||
|
||||
if hdrCacheControl != "" {
|
||||
o.CacheControl = hdrCacheControl
|
||||
}
|
||||
|
||||
o.Payload = new(devops_models.Error)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewPostJobsForbidden creates a PostJobsForbidden with default headers values
|
||||
func NewPostJobsForbidden() *PostJobsForbidden {
|
||||
return &PostJobsForbidden{}
|
||||
}
|
||||
|
||||
/* PostJobsForbidden describes a response with status code 403, with default header values.
|
||||
|
||||
Access forbidden, account lacks access
|
||||
*/
|
||||
type PostJobsForbidden struct {
|
||||
AccessControlAllowOrigin string
|
||||
|
||||
Payload *devops_models.Error
|
||||
}
|
||||
|
||||
func (o *PostJobsForbidden) Error() string {
|
||||
return fmt.Sprintf("[POST /jobs][%d] postJobsForbidden %+v", 403, o.Payload)
|
||||
}
|
||||
func (o *PostJobsForbidden) GetPayload() *devops_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *PostJobsForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
// hydrates response header Access-Control-Allow-Origin
|
||||
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
|
||||
|
||||
if hdrAccessControlAllowOrigin != "" {
|
||||
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
|
||||
}
|
||||
|
||||
o.Payload = new(devops_models.Error)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewPostJobsNotFound creates a PostJobsNotFound with default headers values
|
||||
func NewPostJobsNotFound() *PostJobsNotFound {
|
||||
return &PostJobsNotFound{}
|
||||
}
|
||||
|
||||
/* PostJobsNotFound describes a response with status code 404, with default header values.
|
||||
|
||||
Resource was not found
|
||||
*/
|
||||
type PostJobsNotFound struct {
|
||||
AccessControlAllowOrigin string
|
||||
|
||||
Payload *devops_models.Error
|
||||
}
|
||||
|
||||
func (o *PostJobsNotFound) Error() string {
|
||||
return fmt.Sprintf("[POST /jobs][%d] postJobsNotFound %+v", 404, o.Payload)
|
||||
}
|
||||
func (o *PostJobsNotFound) GetPayload() *devops_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *PostJobsNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
// hydrates response header Access-Control-Allow-Origin
|
||||
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
|
||||
|
||||
if hdrAccessControlAllowOrigin != "" {
|
||||
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
|
||||
}
|
||||
|
||||
o.Payload = new(devops_models.Error)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewPostJobsUnprocessableEntity creates a PostJobsUnprocessableEntity with default headers values
|
||||
func NewPostJobsUnprocessableEntity() *PostJobsUnprocessableEntity {
|
||||
return &PostJobsUnprocessableEntity{}
|
||||
}
|
||||
|
||||
/* PostJobsUnprocessableEntity describes a response with status code 422, with default header values.
|
||||
|
||||
Unprocessable Entity, likely a bad parameter
|
||||
*/
|
||||
type PostJobsUnprocessableEntity struct {
|
||||
AccessControlAllowOrigin string
|
||||
CacheControl string
|
||||
|
||||
Payload *devops_models.Error
|
||||
}
|
||||
|
||||
func (o *PostJobsUnprocessableEntity) Error() string {
|
||||
return fmt.Sprintf("[POST /jobs][%d] postJobsUnprocessableEntity %+v", 422, o.Payload)
|
||||
}
|
||||
func (o *PostJobsUnprocessableEntity) GetPayload() *devops_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *PostJobsUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
// hydrates response header Access-Control-Allow-Origin
|
||||
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
|
||||
|
||||
if hdrAccessControlAllowOrigin != "" {
|
||||
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
|
||||
}
|
||||
|
||||
// hydrates response header Cache-Control
|
||||
hdrCacheControl := response.GetHeader("Cache-Control")
|
||||
|
||||
if hdrCacheControl != "" {
|
||||
o.CacheControl = hdrCacheControl
|
||||
}
|
||||
|
||||
o.Payload = new(devops_models.Error)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewPostJobsInternalServerError creates a PostJobsInternalServerError with default headers values
|
||||
func NewPostJobsInternalServerError() *PostJobsInternalServerError {
|
||||
return &PostJobsInternalServerError{}
|
||||
}
|
||||
|
||||
/* PostJobsInternalServerError describes a response with status code 500, with default header values.
|
||||
|
||||
Server Internal Error
|
||||
*/
|
||||
type PostJobsInternalServerError struct {
|
||||
AccessControlAllowOrigin string
|
||||
|
||||
Payload *devops_models.Error
|
||||
}
|
||||
|
||||
func (o *PostJobsInternalServerError) Error() string {
|
||||
return fmt.Sprintf("[POST /jobs][%d] postJobsInternalServerError %+v", 500, o.Payload)
|
||||
}
|
||||
func (o *PostJobsInternalServerError) GetPayload() *devops_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *PostJobsInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
// hydrates response header Access-Control-Allow-Origin
|
||||
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
|
||||
|
||||
if hdrAccessControlAllowOrigin != "" {
|
||||
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
|
||||
}
|
||||
|
||||
o.Payload = new(devops_models.Error)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
|
@ -1,155 +0,0 @@
|
|||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
// (c) 2012-2020 by Taxnexus, Inc.
|
||||
// All rights reserved worldwide.
|
||||
// Proprietary product; unlicensed use is not allowed
|
||||
|
||||
package job
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
// Editing this file might prove futile when you re-run the swagger generate command
|
||||
|
||||
import (
|
||||
"context"
|
||||
"net/http"
|
||||
"time"
|
||||
|
||||
"github.com/go-openapi/errors"
|
||||
"github.com/go-openapi/runtime"
|
||||
cr "github.com/go-openapi/runtime/client"
|
||||
"github.com/go-openapi/strfmt"
|
||||
|
||||
"code.tnxs.net/vernonkeenan/lib/api/devops/devops_models"
|
||||
)
|
||||
|
||||
// NewPutJobsParams creates a new PutJobsParams object,
|
||||
// with the default timeout for this client.
|
||||
//
|
||||
// Default values are not hydrated, since defaults are normally applied by the API server side.
|
||||
//
|
||||
// To enforce default values in parameter, use SetDefaults or WithDefaults.
|
||||
func NewPutJobsParams() *PutJobsParams {
|
||||
return &PutJobsParams{
|
||||
timeout: cr.DefaultTimeout,
|
||||
}
|
||||
}
|
||||
|
||||
// NewPutJobsParamsWithTimeout creates a new PutJobsParams object
|
||||
// with the ability to set a timeout on a request.
|
||||
func NewPutJobsParamsWithTimeout(timeout time.Duration) *PutJobsParams {
|
||||
return &PutJobsParams{
|
||||
timeout: timeout,
|
||||
}
|
||||
}
|
||||
|
||||
// NewPutJobsParamsWithContext creates a new PutJobsParams object
|
||||
// with the ability to set a context for a request.
|
||||
func NewPutJobsParamsWithContext(ctx context.Context) *PutJobsParams {
|
||||
return &PutJobsParams{
|
||||
Context: ctx,
|
||||
}
|
||||
}
|
||||
|
||||
// NewPutJobsParamsWithHTTPClient creates a new PutJobsParams object
|
||||
// with the ability to set a custom HTTPClient for a request.
|
||||
func NewPutJobsParamsWithHTTPClient(client *http.Client) *PutJobsParams {
|
||||
return &PutJobsParams{
|
||||
HTTPClient: client,
|
||||
}
|
||||
}
|
||||
|
||||
/* PutJobsParams contains all the parameters to send to the API endpoint
|
||||
for the put jobs operation.
|
||||
|
||||
Typically these are written to a http.Request.
|
||||
*/
|
||||
type PutJobsParams struct {
|
||||
|
||||
/* JobRequest.
|
||||
|
||||
An array of Job records
|
||||
*/
|
||||
JobRequest *devops_models.JobRequest
|
||||
|
||||
timeout time.Duration
|
||||
Context context.Context
|
||||
HTTPClient *http.Client
|
||||
}
|
||||
|
||||
// WithDefaults hydrates default values in the put jobs params (not the query body).
|
||||
//
|
||||
// All values with no default are reset to their zero value.
|
||||
func (o *PutJobsParams) WithDefaults() *PutJobsParams {
|
||||
o.SetDefaults()
|
||||
return o
|
||||
}
|
||||
|
||||
// SetDefaults hydrates default values in the put jobs params (not the query body).
|
||||
//
|
||||
// All values with no default are reset to their zero value.
|
||||
func (o *PutJobsParams) SetDefaults() {
|
||||
// no default values defined for this parameter
|
||||
}
|
||||
|
||||
// WithTimeout adds the timeout to the put jobs params
|
||||
func (o *PutJobsParams) WithTimeout(timeout time.Duration) *PutJobsParams {
|
||||
o.SetTimeout(timeout)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetTimeout adds the timeout to the put jobs params
|
||||
func (o *PutJobsParams) SetTimeout(timeout time.Duration) {
|
||||
o.timeout = timeout
|
||||
}
|
||||
|
||||
// WithContext adds the context to the put jobs params
|
||||
func (o *PutJobsParams) WithContext(ctx context.Context) *PutJobsParams {
|
||||
o.SetContext(ctx)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetContext adds the context to the put jobs params
|
||||
func (o *PutJobsParams) SetContext(ctx context.Context) {
|
||||
o.Context = ctx
|
||||
}
|
||||
|
||||
// WithHTTPClient adds the HTTPClient to the put jobs params
|
||||
func (o *PutJobsParams) WithHTTPClient(client *http.Client) *PutJobsParams {
|
||||
o.SetHTTPClient(client)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetHTTPClient adds the HTTPClient to the put jobs params
|
||||
func (o *PutJobsParams) SetHTTPClient(client *http.Client) {
|
||||
o.HTTPClient = client
|
||||
}
|
||||
|
||||
// WithJobRequest adds the jobRequest to the put jobs params
|
||||
func (o *PutJobsParams) WithJobRequest(jobRequest *devops_models.JobRequest) *PutJobsParams {
|
||||
o.SetJobRequest(jobRequest)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetJobRequest adds the jobRequest to the put jobs params
|
||||
func (o *PutJobsParams) SetJobRequest(jobRequest *devops_models.JobRequest) {
|
||||
o.JobRequest = jobRequest
|
||||
}
|
||||
|
||||
// WriteToRequest writes these params to a swagger request
|
||||
func (o *PutJobsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
|
||||
|
||||
if err := r.SetTimeout(o.timeout); err != nil {
|
||||
return err
|
||||
}
|
||||
var res []error
|
||||
if o.JobRequest != nil {
|
||||
if err := r.SetBodyParam(o.JobRequest); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
if len(res) > 0 {
|
||||
return errors.CompositeValidationError(res...)
|
||||
}
|
||||
return nil
|
||||
}
|
|
@ -1,339 +0,0 @@
|
|||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
// (c) 2012-2020 by Taxnexus, Inc.
|
||||
// All rights reserved worldwide.
|
||||
// Proprietary product; unlicensed use is not allowed
|
||||
|
||||
package job
|
||||
|
||||
// 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"
|
||||
|
||||
"code.tnxs.net/vernonkeenan/lib/api/devops/devops_models"
|
||||
)
|
||||
|
||||
// PutJobsReader is a Reader for the PutJobs structure.
|
||||
type PutJobsReader struct {
|
||||
formats strfmt.Registry
|
||||
}
|
||||
|
||||
// ReadResponse reads a server response into the received o.
|
||||
func (o *PutJobsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
|
||||
switch response.Code() {
|
||||
case 200:
|
||||
result := NewPutJobsOK()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return result, nil
|
||||
case 401:
|
||||
result := NewPutJobsUnauthorized()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return nil, result
|
||||
case 403:
|
||||
result := NewPutJobsForbidden()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return nil, result
|
||||
case 404:
|
||||
result := NewPutJobsNotFound()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return nil, result
|
||||
case 422:
|
||||
result := NewPutJobsUnprocessableEntity()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return nil, result
|
||||
case 500:
|
||||
result := NewPutJobsInternalServerError()
|
||||
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())
|
||||
}
|
||||
}
|
||||
|
||||
// NewPutJobsOK creates a PutJobsOK with default headers values
|
||||
func NewPutJobsOK() *PutJobsOK {
|
||||
return &PutJobsOK{}
|
||||
}
|
||||
|
||||
/* PutJobsOK describes a response with status code 200, with default header values.
|
||||
|
||||
Taxnexus Response with Job objects
|
||||
*/
|
||||
type PutJobsOK struct {
|
||||
AccessControlAllowOrigin string
|
||||
CacheControl string
|
||||
|
||||
Payload *devops_models.JobResponse
|
||||
}
|
||||
|
||||
func (o *PutJobsOK) Error() string {
|
||||
return fmt.Sprintf("[PUT /jobs][%d] putJobsOK %+v", 200, o.Payload)
|
||||
}
|
||||
func (o *PutJobsOK) GetPayload() *devops_models.JobResponse {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *PutJobsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
// hydrates response header Access-Control-Allow-Origin
|
||||
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
|
||||
|
||||
if hdrAccessControlAllowOrigin != "" {
|
||||
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
|
||||
}
|
||||
|
||||
// hydrates response header Cache-Control
|
||||
hdrCacheControl := response.GetHeader("Cache-Control")
|
||||
|
||||
if hdrCacheControl != "" {
|
||||
o.CacheControl = hdrCacheControl
|
||||
}
|
||||
|
||||
o.Payload = new(devops_models.JobResponse)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewPutJobsUnauthorized creates a PutJobsUnauthorized with default headers values
|
||||
func NewPutJobsUnauthorized() *PutJobsUnauthorized {
|
||||
return &PutJobsUnauthorized{}
|
||||
}
|
||||
|
||||
/* PutJobsUnauthorized describes a response with status code 401, with default header values.
|
||||
|
||||
Access Unauthorized, invalid API-KEY was used
|
||||
*/
|
||||
type PutJobsUnauthorized struct {
|
||||
AccessControlAllowOrigin string
|
||||
CacheControl string
|
||||
|
||||
Payload *devops_models.Error
|
||||
}
|
||||
|
||||
func (o *PutJobsUnauthorized) Error() string {
|
||||
return fmt.Sprintf("[PUT /jobs][%d] putJobsUnauthorized %+v", 401, o.Payload)
|
||||
}
|
||||
func (o *PutJobsUnauthorized) GetPayload() *devops_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *PutJobsUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
// hydrates response header Access-Control-Allow-Origin
|
||||
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
|
||||
|
||||
if hdrAccessControlAllowOrigin != "" {
|
||||
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
|
||||
}
|
||||
|
||||
// hydrates response header Cache-Control
|
||||
hdrCacheControl := response.GetHeader("Cache-Control")
|
||||
|
||||
if hdrCacheControl != "" {
|
||||
o.CacheControl = hdrCacheControl
|
||||
}
|
||||
|
||||
o.Payload = new(devops_models.Error)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewPutJobsForbidden creates a PutJobsForbidden with default headers values
|
||||
func NewPutJobsForbidden() *PutJobsForbidden {
|
||||
return &PutJobsForbidden{}
|
||||
}
|
||||
|
||||
/* PutJobsForbidden describes a response with status code 403, with default header values.
|
||||
|
||||
Access forbidden, account lacks access
|
||||
*/
|
||||
type PutJobsForbidden struct {
|
||||
AccessControlAllowOrigin string
|
||||
|
||||
Payload *devops_models.Error
|
||||
}
|
||||
|
||||
func (o *PutJobsForbidden) Error() string {
|
||||
return fmt.Sprintf("[PUT /jobs][%d] putJobsForbidden %+v", 403, o.Payload)
|
||||
}
|
||||
func (o *PutJobsForbidden) GetPayload() *devops_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *PutJobsForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
// hydrates response header Access-Control-Allow-Origin
|
||||
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
|
||||
|
||||
if hdrAccessControlAllowOrigin != "" {
|
||||
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
|
||||
}
|
||||
|
||||
o.Payload = new(devops_models.Error)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewPutJobsNotFound creates a PutJobsNotFound with default headers values
|
||||
func NewPutJobsNotFound() *PutJobsNotFound {
|
||||
return &PutJobsNotFound{}
|
||||
}
|
||||
|
||||
/* PutJobsNotFound describes a response with status code 404, with default header values.
|
||||
|
||||
Resource was not found
|
||||
*/
|
||||
type PutJobsNotFound struct {
|
||||
AccessControlAllowOrigin string
|
||||
|
||||
Payload *devops_models.Error
|
||||
}
|
||||
|
||||
func (o *PutJobsNotFound) Error() string {
|
||||
return fmt.Sprintf("[PUT /jobs][%d] putJobsNotFound %+v", 404, o.Payload)
|
||||
}
|
||||
func (o *PutJobsNotFound) GetPayload() *devops_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *PutJobsNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
// hydrates response header Access-Control-Allow-Origin
|
||||
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
|
||||
|
||||
if hdrAccessControlAllowOrigin != "" {
|
||||
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
|
||||
}
|
||||
|
||||
o.Payload = new(devops_models.Error)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewPutJobsUnprocessableEntity creates a PutJobsUnprocessableEntity with default headers values
|
||||
func NewPutJobsUnprocessableEntity() *PutJobsUnprocessableEntity {
|
||||
return &PutJobsUnprocessableEntity{}
|
||||
}
|
||||
|
||||
/* PutJobsUnprocessableEntity describes a response with status code 422, with default header values.
|
||||
|
||||
Unprocessable Entity, likely a bad parameter
|
||||
*/
|
||||
type PutJobsUnprocessableEntity struct {
|
||||
AccessControlAllowOrigin string
|
||||
CacheControl string
|
||||
|
||||
Payload *devops_models.Error
|
||||
}
|
||||
|
||||
func (o *PutJobsUnprocessableEntity) Error() string {
|
||||
return fmt.Sprintf("[PUT /jobs][%d] putJobsUnprocessableEntity %+v", 422, o.Payload)
|
||||
}
|
||||
func (o *PutJobsUnprocessableEntity) GetPayload() *devops_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *PutJobsUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
// hydrates response header Access-Control-Allow-Origin
|
||||
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
|
||||
|
||||
if hdrAccessControlAllowOrigin != "" {
|
||||
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
|
||||
}
|
||||
|
||||
// hydrates response header Cache-Control
|
||||
hdrCacheControl := response.GetHeader("Cache-Control")
|
||||
|
||||
if hdrCacheControl != "" {
|
||||
o.CacheControl = hdrCacheControl
|
||||
}
|
||||
|
||||
o.Payload = new(devops_models.Error)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewPutJobsInternalServerError creates a PutJobsInternalServerError with default headers values
|
||||
func NewPutJobsInternalServerError() *PutJobsInternalServerError {
|
||||
return &PutJobsInternalServerError{}
|
||||
}
|
||||
|
||||
/* PutJobsInternalServerError describes a response with status code 500, with default header values.
|
||||
|
||||
Server Internal Error
|
||||
*/
|
||||
type PutJobsInternalServerError struct {
|
||||
AccessControlAllowOrigin string
|
||||
|
||||
Payload *devops_models.Error
|
||||
}
|
||||
|
||||
func (o *PutJobsInternalServerError) Error() string {
|
||||
return fmt.Sprintf("[PUT /jobs][%d] putJobsInternalServerError %+v", 500, o.Payload)
|
||||
}
|
||||
func (o *PutJobsInternalServerError) GetPayload() *devops_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *PutJobsInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
// hydrates response header Access-Control-Allow-Origin
|
||||
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
|
||||
|
||||
if hdrAccessControlAllowOrigin != "" {
|
||||
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
|
||||
}
|
||||
|
||||
o.Payload = new(devops_models.Error)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
|
@ -1,153 +0,0 @@
|
|||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
// (c) 2012-2020 by Taxnexus, Inc.
|
||||
// All rights reserved worldwide.
|
||||
// Proprietary product; unlicensed use is not allowed
|
||||
|
||||
package service
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
// Editing this file might prove futile when you re-run the swagger generate command
|
||||
|
||||
import (
|
||||
"context"
|
||||
"net/http"
|
||||
"time"
|
||||
|
||||
"github.com/go-openapi/errors"
|
||||
"github.com/go-openapi/runtime"
|
||||
cr "github.com/go-openapi/runtime/client"
|
||||
"github.com/go-openapi/strfmt"
|
||||
)
|
||||
|
||||
// NewGetServiceParams creates a new GetServiceParams object,
|
||||
// with the default timeout for this client.
|
||||
//
|
||||
// Default values are not hydrated, since defaults are normally applied by the API server side.
|
||||
//
|
||||
// To enforce default values in parameter, use SetDefaults or WithDefaults.
|
||||
func NewGetServiceParams() *GetServiceParams {
|
||||
return &GetServiceParams{
|
||||
timeout: cr.DefaultTimeout,
|
||||
}
|
||||
}
|
||||
|
||||
// NewGetServiceParamsWithTimeout creates a new GetServiceParams object
|
||||
// with the ability to set a timeout on a request.
|
||||
func NewGetServiceParamsWithTimeout(timeout time.Duration) *GetServiceParams {
|
||||
return &GetServiceParams{
|
||||
timeout: timeout,
|
||||
}
|
||||
}
|
||||
|
||||
// NewGetServiceParamsWithContext creates a new GetServiceParams object
|
||||
// with the ability to set a context for a request.
|
||||
func NewGetServiceParamsWithContext(ctx context.Context) *GetServiceParams {
|
||||
return &GetServiceParams{
|
||||
Context: ctx,
|
||||
}
|
||||
}
|
||||
|
||||
// NewGetServiceParamsWithHTTPClient creates a new GetServiceParams object
|
||||
// with the ability to set a custom HTTPClient for a request.
|
||||
func NewGetServiceParamsWithHTTPClient(client *http.Client) *GetServiceParams {
|
||||
return &GetServiceParams{
|
||||
HTTPClient: client,
|
||||
}
|
||||
}
|
||||
|
||||
/* GetServiceParams contains all the parameters to send to the API endpoint
|
||||
for the get service operation.
|
||||
|
||||
Typically these are written to a http.Request.
|
||||
*/
|
||||
type GetServiceParams struct {
|
||||
|
||||
/* ServiceIDPath.
|
||||
|
||||
Taxnexus Record Id of a Service
|
||||
*/
|
||||
ServiceIDPath string
|
||||
|
||||
timeout time.Duration
|
||||
Context context.Context
|
||||
HTTPClient *http.Client
|
||||
}
|
||||
|
||||
// WithDefaults hydrates default values in the get service params (not the query body).
|
||||
//
|
||||
// All values with no default are reset to their zero value.
|
||||
func (o *GetServiceParams) WithDefaults() *GetServiceParams {
|
||||
o.SetDefaults()
|
||||
return o
|
||||
}
|
||||
|
||||
// SetDefaults hydrates default values in the get service params (not the query body).
|
||||
//
|
||||
// All values with no default are reset to their zero value.
|
||||
func (o *GetServiceParams) SetDefaults() {
|
||||
// no default values defined for this parameter
|
||||
}
|
||||
|
||||
// WithTimeout adds the timeout to the get service params
|
||||
func (o *GetServiceParams) WithTimeout(timeout time.Duration) *GetServiceParams {
|
||||
o.SetTimeout(timeout)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetTimeout adds the timeout to the get service params
|
||||
func (o *GetServiceParams) SetTimeout(timeout time.Duration) {
|
||||
o.timeout = timeout
|
||||
}
|
||||
|
||||
// WithContext adds the context to the get service params
|
||||
func (o *GetServiceParams) WithContext(ctx context.Context) *GetServiceParams {
|
||||
o.SetContext(ctx)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetContext adds the context to the get service params
|
||||
func (o *GetServiceParams) SetContext(ctx context.Context) {
|
||||
o.Context = ctx
|
||||
}
|
||||
|
||||
// WithHTTPClient adds the HTTPClient to the get service params
|
||||
func (o *GetServiceParams) WithHTTPClient(client *http.Client) *GetServiceParams {
|
||||
o.SetHTTPClient(client)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetHTTPClient adds the HTTPClient to the get service params
|
||||
func (o *GetServiceParams) SetHTTPClient(client *http.Client) {
|
||||
o.HTTPClient = client
|
||||
}
|
||||
|
||||
// WithServiceIDPath adds the serviceIDPath to the get service params
|
||||
func (o *GetServiceParams) WithServiceIDPath(serviceIDPath string) *GetServiceParams {
|
||||
o.SetServiceIDPath(serviceIDPath)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetServiceIDPath adds the serviceIdPath to the get service params
|
||||
func (o *GetServiceParams) SetServiceIDPath(serviceIDPath string) {
|
||||
o.ServiceIDPath = serviceIDPath
|
||||
}
|
||||
|
||||
// WriteToRequest writes these params to a swagger request
|
||||
func (o *GetServiceParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
|
||||
|
||||
if err := r.SetTimeout(o.timeout); err != nil {
|
||||
return err
|
||||
}
|
||||
var res []error
|
||||
|
||||
// path param serviceIdPath
|
||||
if err := r.SetPathParam("serviceIdPath", o.ServiceIDPath); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if len(res) > 0 {
|
||||
return errors.CompositeValidationError(res...)
|
||||
}
|
||||
return nil
|
||||
}
|
|
@ -1,339 +0,0 @@
|
|||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
// (c) 2012-2020 by Taxnexus, Inc.
|
||||
// All rights reserved worldwide.
|
||||
// Proprietary product; unlicensed use is not allowed
|
||||
|
||||
package service
|
||||
|
||||
// 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"
|
||||
|
||||
"code.tnxs.net/vernonkeenan/lib/api/devops/devops_models"
|
||||
)
|
||||
|
||||
// GetServiceReader is a Reader for the GetService structure.
|
||||
type GetServiceReader struct {
|
||||
formats strfmt.Registry
|
||||
}
|
||||
|
||||
// ReadResponse reads a server response into the received o.
|
||||
func (o *GetServiceReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
|
||||
switch response.Code() {
|
||||
case 200:
|
||||
result := NewGetServiceOK()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return result, nil
|
||||
case 401:
|
||||
result := NewGetServiceUnauthorized()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return nil, result
|
||||
case 403:
|
||||
result := NewGetServiceForbidden()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return nil, result
|
||||
case 404:
|
||||
result := NewGetServiceNotFound()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return nil, result
|
||||
case 422:
|
||||
result := NewGetServiceUnprocessableEntity()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return nil, result
|
||||
case 500:
|
||||
result := NewGetServiceInternalServerError()
|
||||
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())
|
||||
}
|
||||
}
|
||||
|
||||
// NewGetServiceOK creates a GetServiceOK with default headers values
|
||||
func NewGetServiceOK() *GetServiceOK {
|
||||
return &GetServiceOK{}
|
||||
}
|
||||
|
||||
/* GetServiceOK describes a response with status code 200, with default header values.
|
||||
|
||||
Single Service record response
|
||||
*/
|
||||
type GetServiceOK struct {
|
||||
AccessControlAllowOrigin string
|
||||
CacheControl string
|
||||
|
||||
Payload *devops_models.Service
|
||||
}
|
||||
|
||||
func (o *GetServiceOK) Error() string {
|
||||
return fmt.Sprintf("[GET /services/{serviceIdPath}][%d] getServiceOK %+v", 200, o.Payload)
|
||||
}
|
||||
func (o *GetServiceOK) GetPayload() *devops_models.Service {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *GetServiceOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
// hydrates response header Access-Control-Allow-Origin
|
||||
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
|
||||
|
||||
if hdrAccessControlAllowOrigin != "" {
|
||||
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
|
||||
}
|
||||
|
||||
// hydrates response header Cache-Control
|
||||
hdrCacheControl := response.GetHeader("Cache-Control")
|
||||
|
||||
if hdrCacheControl != "" {
|
||||
o.CacheControl = hdrCacheControl
|
||||
}
|
||||
|
||||
o.Payload = new(devops_models.Service)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewGetServiceUnauthorized creates a GetServiceUnauthorized with default headers values
|
||||
func NewGetServiceUnauthorized() *GetServiceUnauthorized {
|
||||
return &GetServiceUnauthorized{}
|
||||
}
|
||||
|
||||
/* GetServiceUnauthorized describes a response with status code 401, with default header values.
|
||||
|
||||
Access Unauthorized, invalid API-KEY was used
|
||||
*/
|
||||
type GetServiceUnauthorized struct {
|
||||
AccessControlAllowOrigin string
|
||||
CacheControl string
|
||||
|
||||
Payload *devops_models.Error
|
||||
}
|
||||
|
||||
func (o *GetServiceUnauthorized) Error() string {
|
||||
return fmt.Sprintf("[GET /services/{serviceIdPath}][%d] getServiceUnauthorized %+v", 401, o.Payload)
|
||||
}
|
||||
func (o *GetServiceUnauthorized) GetPayload() *devops_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *GetServiceUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
// hydrates response header Access-Control-Allow-Origin
|
||||
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
|
||||
|
||||
if hdrAccessControlAllowOrigin != "" {
|
||||
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
|
||||
}
|
||||
|
||||
// hydrates response header Cache-Control
|
||||
hdrCacheControl := response.GetHeader("Cache-Control")
|
||||
|
||||
if hdrCacheControl != "" {
|
||||
o.CacheControl = hdrCacheControl
|
||||
}
|
||||
|
||||
o.Payload = new(devops_models.Error)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewGetServiceForbidden creates a GetServiceForbidden with default headers values
|
||||
func NewGetServiceForbidden() *GetServiceForbidden {
|
||||
return &GetServiceForbidden{}
|
||||
}
|
||||
|
||||
/* GetServiceForbidden describes a response with status code 403, with default header values.
|
||||
|
||||
Access forbidden, account lacks access
|
||||
*/
|
||||
type GetServiceForbidden struct {
|
||||
AccessControlAllowOrigin string
|
||||
|
||||
Payload *devops_models.Error
|
||||
}
|
||||
|
||||
func (o *GetServiceForbidden) Error() string {
|
||||
return fmt.Sprintf("[GET /services/{serviceIdPath}][%d] getServiceForbidden %+v", 403, o.Payload)
|
||||
}
|
||||
func (o *GetServiceForbidden) GetPayload() *devops_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *GetServiceForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
// hydrates response header Access-Control-Allow-Origin
|
||||
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
|
||||
|
||||
if hdrAccessControlAllowOrigin != "" {
|
||||
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
|
||||
}
|
||||
|
||||
o.Payload = new(devops_models.Error)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewGetServiceNotFound creates a GetServiceNotFound with default headers values
|
||||
func NewGetServiceNotFound() *GetServiceNotFound {
|
||||
return &GetServiceNotFound{}
|
||||
}
|
||||
|
||||
/* GetServiceNotFound describes a response with status code 404, with default header values.
|
||||
|
||||
Resource was not found
|
||||
*/
|
||||
type GetServiceNotFound struct {
|
||||
AccessControlAllowOrigin string
|
||||
|
||||
Payload *devops_models.Error
|
||||
}
|
||||
|
||||
func (o *GetServiceNotFound) Error() string {
|
||||
return fmt.Sprintf("[GET /services/{serviceIdPath}][%d] getServiceNotFound %+v", 404, o.Payload)
|
||||
}
|
||||
func (o *GetServiceNotFound) GetPayload() *devops_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *GetServiceNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
// hydrates response header Access-Control-Allow-Origin
|
||||
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
|
||||
|
||||
if hdrAccessControlAllowOrigin != "" {
|
||||
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
|
||||
}
|
||||
|
||||
o.Payload = new(devops_models.Error)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewGetServiceUnprocessableEntity creates a GetServiceUnprocessableEntity with default headers values
|
||||
func NewGetServiceUnprocessableEntity() *GetServiceUnprocessableEntity {
|
||||
return &GetServiceUnprocessableEntity{}
|
||||
}
|
||||
|
||||
/* GetServiceUnprocessableEntity describes a response with status code 422, with default header values.
|
||||
|
||||
Unprocessable Entity, likely a bad parameter
|
||||
*/
|
||||
type GetServiceUnprocessableEntity struct {
|
||||
AccessControlAllowOrigin string
|
||||
CacheControl string
|
||||
|
||||
Payload *devops_models.Error
|
||||
}
|
||||
|
||||
func (o *GetServiceUnprocessableEntity) Error() string {
|
||||
return fmt.Sprintf("[GET /services/{serviceIdPath}][%d] getServiceUnprocessableEntity %+v", 422, o.Payload)
|
||||
}
|
||||
func (o *GetServiceUnprocessableEntity) GetPayload() *devops_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *GetServiceUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
// hydrates response header Access-Control-Allow-Origin
|
||||
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
|
||||
|
||||
if hdrAccessControlAllowOrigin != "" {
|
||||
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
|
||||
}
|
||||
|
||||
// hydrates response header Cache-Control
|
||||
hdrCacheControl := response.GetHeader("Cache-Control")
|
||||
|
||||
if hdrCacheControl != "" {
|
||||
o.CacheControl = hdrCacheControl
|
||||
}
|
||||
|
||||
o.Payload = new(devops_models.Error)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewGetServiceInternalServerError creates a GetServiceInternalServerError with default headers values
|
||||
func NewGetServiceInternalServerError() *GetServiceInternalServerError {
|
||||
return &GetServiceInternalServerError{}
|
||||
}
|
||||
|
||||
/* GetServiceInternalServerError describes a response with status code 500, with default header values.
|
||||
|
||||
Server Internal Error
|
||||
*/
|
||||
type GetServiceInternalServerError struct {
|
||||
AccessControlAllowOrigin string
|
||||
|
||||
Payload *devops_models.Error
|
||||
}
|
||||
|
||||
func (o *GetServiceInternalServerError) Error() string {
|
||||
return fmt.Sprintf("[GET /services/{serviceIdPath}][%d] getServiceInternalServerError %+v", 500, o.Payload)
|
||||
}
|
||||
func (o *GetServiceInternalServerError) GetPayload() *devops_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *GetServiceInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
// hydrates response header Access-Control-Allow-Origin
|
||||
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
|
||||
|
||||
if hdrAccessControlAllowOrigin != "" {
|
||||
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
|
||||
}
|
||||
|
||||
o.Payload = new(devops_models.Error)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
|
@ -1,130 +0,0 @@
|
|||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
// (c) 2012-2020 by Taxnexus, Inc.
|
||||
// All rights reserved worldwide.
|
||||
// Proprietary product; unlicensed use is not allowed
|
||||
|
||||
package service
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
// Editing this file might prove futile when you re-run the swagger generate command
|
||||
|
||||
import (
|
||||
"context"
|
||||
"net/http"
|
||||
"time"
|
||||
|
||||
"github.com/go-openapi/errors"
|
||||
"github.com/go-openapi/runtime"
|
||||
cr "github.com/go-openapi/runtime/client"
|
||||
"github.com/go-openapi/strfmt"
|
||||
)
|
||||
|
||||
// NewGetServicesObservableParams creates a new GetServicesObservableParams object,
|
||||
// with the default timeout for this client.
|
||||
//
|
||||
// Default values are not hydrated, since defaults are normally applied by the API server side.
|
||||
//
|
||||
// To enforce default values in parameter, use SetDefaults or WithDefaults.
|
||||
func NewGetServicesObservableParams() *GetServicesObservableParams {
|
||||
return &GetServicesObservableParams{
|
||||
timeout: cr.DefaultTimeout,
|
||||
}
|
||||
}
|
||||
|
||||
// NewGetServicesObservableParamsWithTimeout creates a new GetServicesObservableParams object
|
||||
// with the ability to set a timeout on a request.
|
||||
func NewGetServicesObservableParamsWithTimeout(timeout time.Duration) *GetServicesObservableParams {
|
||||
return &GetServicesObservableParams{
|
||||
timeout: timeout,
|
||||
}
|
||||
}
|
||||
|
||||
// NewGetServicesObservableParamsWithContext creates a new GetServicesObservableParams object
|
||||
// with the ability to set a context for a request.
|
||||
func NewGetServicesObservableParamsWithContext(ctx context.Context) *GetServicesObservableParams {
|
||||
return &GetServicesObservableParams{
|
||||
Context: ctx,
|
||||
}
|
||||
}
|
||||
|
||||
// NewGetServicesObservableParamsWithHTTPClient creates a new GetServicesObservableParams object
|
||||
// with the ability to set a custom HTTPClient for a request.
|
||||
func NewGetServicesObservableParamsWithHTTPClient(client *http.Client) *GetServicesObservableParams {
|
||||
return &GetServicesObservableParams{
|
||||
HTTPClient: client,
|
||||
}
|
||||
}
|
||||
|
||||
/* GetServicesObservableParams contains all the parameters to send to the API endpoint
|
||||
for the get services observable operation.
|
||||
|
||||
Typically these are written to a http.Request.
|
||||
*/
|
||||
type GetServicesObservableParams struct {
|
||||
timeout time.Duration
|
||||
Context context.Context
|
||||
HTTPClient *http.Client
|
||||
}
|
||||
|
||||
// WithDefaults hydrates default values in the get services observable params (not the query body).
|
||||
//
|
||||
// All values with no default are reset to their zero value.
|
||||
func (o *GetServicesObservableParams) WithDefaults() *GetServicesObservableParams {
|
||||
o.SetDefaults()
|
||||
return o
|
||||
}
|
||||
|
||||
// SetDefaults hydrates default values in the get services observable params (not the query body).
|
||||
//
|
||||
// All values with no default are reset to their zero value.
|
||||
func (o *GetServicesObservableParams) SetDefaults() {
|
||||
// no default values defined for this parameter
|
||||
}
|
||||
|
||||
// WithTimeout adds the timeout to the get services observable params
|
||||
func (o *GetServicesObservableParams) WithTimeout(timeout time.Duration) *GetServicesObservableParams {
|
||||
o.SetTimeout(timeout)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetTimeout adds the timeout to the get services observable params
|
||||
func (o *GetServicesObservableParams) SetTimeout(timeout time.Duration) {
|
||||
o.timeout = timeout
|
||||
}
|
||||
|
||||
// WithContext adds the context to the get services observable params
|
||||
func (o *GetServicesObservableParams) WithContext(ctx context.Context) *GetServicesObservableParams {
|
||||
o.SetContext(ctx)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetContext adds the context to the get services observable params
|
||||
func (o *GetServicesObservableParams) SetContext(ctx context.Context) {
|
||||
o.Context = ctx
|
||||
}
|
||||
|
||||
// WithHTTPClient adds the HTTPClient to the get services observable params
|
||||
func (o *GetServicesObservableParams) WithHTTPClient(client *http.Client) *GetServicesObservableParams {
|
||||
o.SetHTTPClient(client)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetHTTPClient adds the HTTPClient to the get services observable params
|
||||
func (o *GetServicesObservableParams) SetHTTPClient(client *http.Client) {
|
||||
o.HTTPClient = client
|
||||
}
|
||||
|
||||
// WriteToRequest writes these params to a swagger request
|
||||
func (o *GetServicesObservableParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
|
||||
|
||||
if err := r.SetTimeout(o.timeout); err != nil {
|
||||
return err
|
||||
}
|
||||
var res []error
|
||||
|
||||
if len(res) > 0 {
|
||||
return errors.CompositeValidationError(res...)
|
||||
}
|
||||
return nil
|
||||
}
|
|
@ -1,337 +0,0 @@
|
|||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
// (c) 2012-2020 by Taxnexus, Inc.
|
||||
// All rights reserved worldwide.
|
||||
// Proprietary product; unlicensed use is not allowed
|
||||
|
||||
package service
|
||||
|
||||
// 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"
|
||||
|
||||
"code.tnxs.net/vernonkeenan/lib/api/devops/devops_models"
|
||||
)
|
||||
|
||||
// GetServicesObservableReader is a Reader for the GetServicesObservable structure.
|
||||
type GetServicesObservableReader struct {
|
||||
formats strfmt.Registry
|
||||
}
|
||||
|
||||
// ReadResponse reads a server response into the received o.
|
||||
func (o *GetServicesObservableReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
|
||||
switch response.Code() {
|
||||
case 200:
|
||||
result := NewGetServicesObservableOK()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return result, nil
|
||||
case 401:
|
||||
result := NewGetServicesObservableUnauthorized()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return nil, result
|
||||
case 403:
|
||||
result := NewGetServicesObservableForbidden()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return nil, result
|
||||
case 404:
|
||||
result := NewGetServicesObservableNotFound()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return nil, result
|
||||
case 422:
|
||||
result := NewGetServicesObservableUnprocessableEntity()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return nil, result
|
||||
case 500:
|
||||
result := NewGetServicesObservableInternalServerError()
|
||||
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())
|
||||
}
|
||||
}
|
||||
|
||||
// NewGetServicesObservableOK creates a GetServicesObservableOK with default headers values
|
||||
func NewGetServicesObservableOK() *GetServicesObservableOK {
|
||||
return &GetServicesObservableOK{}
|
||||
}
|
||||
|
||||
/* GetServicesObservableOK describes a response with status code 200, with default header values.
|
||||
|
||||
Simple Service record response
|
||||
*/
|
||||
type GetServicesObservableOK struct {
|
||||
AccessControlAllowOrigin string
|
||||
CacheControl string
|
||||
|
||||
Payload []*devops_models.Service
|
||||
}
|
||||
|
||||
func (o *GetServicesObservableOK) Error() string {
|
||||
return fmt.Sprintf("[GET /services/observable][%d] getServicesObservableOK %+v", 200, o.Payload)
|
||||
}
|
||||
func (o *GetServicesObservableOK) GetPayload() []*devops_models.Service {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *GetServicesObservableOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
// hydrates response header Access-Control-Allow-Origin
|
||||
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
|
||||
|
||||
if hdrAccessControlAllowOrigin != "" {
|
||||
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
|
||||
}
|
||||
|
||||
// hydrates response header Cache-Control
|
||||
hdrCacheControl := response.GetHeader("Cache-Control")
|
||||
|
||||
if hdrCacheControl != "" {
|
||||
o.CacheControl = hdrCacheControl
|
||||
}
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewGetServicesObservableUnauthorized creates a GetServicesObservableUnauthorized with default headers values
|
||||
func NewGetServicesObservableUnauthorized() *GetServicesObservableUnauthorized {
|
||||
return &GetServicesObservableUnauthorized{}
|
||||
}
|
||||
|
||||
/* GetServicesObservableUnauthorized describes a response with status code 401, with default header values.
|
||||
|
||||
Access Unauthorized, invalid API-KEY was used
|
||||
*/
|
||||
type GetServicesObservableUnauthorized struct {
|
||||
AccessControlAllowOrigin string
|
||||
CacheControl string
|
||||
|
||||
Payload *devops_models.Error
|
||||
}
|
||||
|
||||
func (o *GetServicesObservableUnauthorized) Error() string {
|
||||
return fmt.Sprintf("[GET /services/observable][%d] getServicesObservableUnauthorized %+v", 401, o.Payload)
|
||||
}
|
||||
func (o *GetServicesObservableUnauthorized) GetPayload() *devops_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *GetServicesObservableUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
// hydrates response header Access-Control-Allow-Origin
|
||||
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
|
||||
|
||||
if hdrAccessControlAllowOrigin != "" {
|
||||
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
|
||||
}
|
||||
|
||||
// hydrates response header Cache-Control
|
||||
hdrCacheControl := response.GetHeader("Cache-Control")
|
||||
|
||||
if hdrCacheControl != "" {
|
||||
o.CacheControl = hdrCacheControl
|
||||
}
|
||||
|
||||
o.Payload = new(devops_models.Error)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewGetServicesObservableForbidden creates a GetServicesObservableForbidden with default headers values
|
||||
func NewGetServicesObservableForbidden() *GetServicesObservableForbidden {
|
||||
return &GetServicesObservableForbidden{}
|
||||
}
|
||||
|
||||
/* GetServicesObservableForbidden describes a response with status code 403, with default header values.
|
||||
|
||||
Access forbidden, account lacks access
|
||||
*/
|
||||
type GetServicesObservableForbidden struct {
|
||||
AccessControlAllowOrigin string
|
||||
|
||||
Payload *devops_models.Error
|
||||
}
|
||||
|
||||
func (o *GetServicesObservableForbidden) Error() string {
|
||||
return fmt.Sprintf("[GET /services/observable][%d] getServicesObservableForbidden %+v", 403, o.Payload)
|
||||
}
|
||||
func (o *GetServicesObservableForbidden) GetPayload() *devops_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *GetServicesObservableForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
// hydrates response header Access-Control-Allow-Origin
|
||||
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
|
||||
|
||||
if hdrAccessControlAllowOrigin != "" {
|
||||
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
|
||||
}
|
||||
|
||||
o.Payload = new(devops_models.Error)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewGetServicesObservableNotFound creates a GetServicesObservableNotFound with default headers values
|
||||
func NewGetServicesObservableNotFound() *GetServicesObservableNotFound {
|
||||
return &GetServicesObservableNotFound{}
|
||||
}
|
||||
|
||||
/* GetServicesObservableNotFound describes a response with status code 404, with default header values.
|
||||
|
||||
Resource was not found
|
||||
*/
|
||||
type GetServicesObservableNotFound struct {
|
||||
AccessControlAllowOrigin string
|
||||
|
||||
Payload *devops_models.Error
|
||||
}
|
||||
|
||||
func (o *GetServicesObservableNotFound) Error() string {
|
||||
return fmt.Sprintf("[GET /services/observable][%d] getServicesObservableNotFound %+v", 404, o.Payload)
|
||||
}
|
||||
func (o *GetServicesObservableNotFound) GetPayload() *devops_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *GetServicesObservableNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
// hydrates response header Access-Control-Allow-Origin
|
||||
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
|
||||
|
||||
if hdrAccessControlAllowOrigin != "" {
|
||||
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
|
||||
}
|
||||
|
||||
o.Payload = new(devops_models.Error)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewGetServicesObservableUnprocessableEntity creates a GetServicesObservableUnprocessableEntity with default headers values
|
||||
func NewGetServicesObservableUnprocessableEntity() *GetServicesObservableUnprocessableEntity {
|
||||
return &GetServicesObservableUnprocessableEntity{}
|
||||
}
|
||||
|
||||
/* GetServicesObservableUnprocessableEntity describes a response with status code 422, with default header values.
|
||||
|
||||
Unprocessable Entity, likely a bad parameter
|
||||
*/
|
||||
type GetServicesObservableUnprocessableEntity struct {
|
||||
AccessControlAllowOrigin string
|
||||
CacheControl string
|
||||
|
||||
Payload *devops_models.Error
|
||||
}
|
||||
|
||||
func (o *GetServicesObservableUnprocessableEntity) Error() string {
|
||||
return fmt.Sprintf("[GET /services/observable][%d] getServicesObservableUnprocessableEntity %+v", 422, o.Payload)
|
||||
}
|
||||
func (o *GetServicesObservableUnprocessableEntity) GetPayload() *devops_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *GetServicesObservableUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
// hydrates response header Access-Control-Allow-Origin
|
||||
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
|
||||
|
||||
if hdrAccessControlAllowOrigin != "" {
|
||||
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
|
||||
}
|
||||
|
||||
// hydrates response header Cache-Control
|
||||
hdrCacheControl := response.GetHeader("Cache-Control")
|
||||
|
||||
if hdrCacheControl != "" {
|
||||
o.CacheControl = hdrCacheControl
|
||||
}
|
||||
|
||||
o.Payload = new(devops_models.Error)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewGetServicesObservableInternalServerError creates a GetServicesObservableInternalServerError with default headers values
|
||||
func NewGetServicesObservableInternalServerError() *GetServicesObservableInternalServerError {
|
||||
return &GetServicesObservableInternalServerError{}
|
||||
}
|
||||
|
||||
/* GetServicesObservableInternalServerError describes a response with status code 500, with default header values.
|
||||
|
||||
Server Internal Error
|
||||
*/
|
||||
type GetServicesObservableInternalServerError struct {
|
||||
AccessControlAllowOrigin string
|
||||
|
||||
Payload *devops_models.Error
|
||||
}
|
||||
|
||||
func (o *GetServicesObservableInternalServerError) Error() string {
|
||||
return fmt.Sprintf("[GET /services/observable][%d] getServicesObservableInternalServerError %+v", 500, o.Payload)
|
||||
}
|
||||
func (o *GetServicesObservableInternalServerError) GetPayload() *devops_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *GetServicesObservableInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
// hydrates response header Access-Control-Allow-Origin
|
||||
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
|
||||
|
||||
if hdrAccessControlAllowOrigin != "" {
|
||||
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
|
||||
}
|
||||
|
||||
o.Payload = new(devops_models.Error)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
|
@ -1,238 +0,0 @@
|
|||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
// (c) 2012-2020 by Taxnexus, Inc.
|
||||
// All rights reserved worldwide.
|
||||
// Proprietary product; unlicensed use is not allowed
|
||||
|
||||
package service
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
// Editing this file might prove futile when you re-run the swagger generate command
|
||||
|
||||
import (
|
||||
"context"
|
||||
"net/http"
|
||||
"time"
|
||||
|
||||
"github.com/go-openapi/errors"
|
||||
"github.com/go-openapi/runtime"
|
||||
cr "github.com/go-openapi/runtime/client"
|
||||
"github.com/go-openapi/strfmt"
|
||||
"github.com/go-openapi/swag"
|
||||
)
|
||||
|
||||
// NewGetServicesParams creates a new GetServicesParams object,
|
||||
// with the default timeout for this client.
|
||||
//
|
||||
// Default values are not hydrated, since defaults are normally applied by the API server side.
|
||||
//
|
||||
// To enforce default values in parameter, use SetDefaults or WithDefaults.
|
||||
func NewGetServicesParams() *GetServicesParams {
|
||||
return &GetServicesParams{
|
||||
timeout: cr.DefaultTimeout,
|
||||
}
|
||||
}
|
||||
|
||||
// NewGetServicesParamsWithTimeout creates a new GetServicesParams object
|
||||
// with the ability to set a timeout on a request.
|
||||
func NewGetServicesParamsWithTimeout(timeout time.Duration) *GetServicesParams {
|
||||
return &GetServicesParams{
|
||||
timeout: timeout,
|
||||
}
|
||||
}
|
||||
|
||||
// NewGetServicesParamsWithContext creates a new GetServicesParams object
|
||||
// with the ability to set a context for a request.
|
||||
func NewGetServicesParamsWithContext(ctx context.Context) *GetServicesParams {
|
||||
return &GetServicesParams{
|
||||
Context: ctx,
|
||||
}
|
||||
}
|
||||
|
||||
// NewGetServicesParamsWithHTTPClient creates a new GetServicesParams object
|
||||
// with the ability to set a custom HTTPClient for a request.
|
||||
func NewGetServicesParamsWithHTTPClient(client *http.Client) *GetServicesParams {
|
||||
return &GetServicesParams{
|
||||
HTTPClient: client,
|
||||
}
|
||||
}
|
||||
|
||||
/* GetServicesParams contains all the parameters to send to the API endpoint
|
||||
for the get services operation.
|
||||
|
||||
Typically these are written to a http.Request.
|
||||
*/
|
||||
type GetServicesParams struct {
|
||||
|
||||
/* Limit.
|
||||
|
||||
How many objects to return at one time
|
||||
|
||||
Format: int64
|
||||
*/
|
||||
Limit *int64
|
||||
|
||||
/* Offset.
|
||||
|
||||
How many objects to skip? (default 0)
|
||||
|
||||
Format: int64
|
||||
*/
|
||||
Offset *int64
|
||||
|
||||
/* ServiceID.
|
||||
|
||||
Service ID
|
||||
*/
|
||||
ServiceID *string
|
||||
|
||||
timeout time.Duration
|
||||
Context context.Context
|
||||
HTTPClient *http.Client
|
||||
}
|
||||
|
||||
// WithDefaults hydrates default values in the get services params (not the query body).
|
||||
//
|
||||
// All values with no default are reset to their zero value.
|
||||
func (o *GetServicesParams) WithDefaults() *GetServicesParams {
|
||||
o.SetDefaults()
|
||||
return o
|
||||
}
|
||||
|
||||
// SetDefaults hydrates default values in the get services params (not the query body).
|
||||
//
|
||||
// All values with no default are reset to their zero value.
|
||||
func (o *GetServicesParams) SetDefaults() {
|
||||
// no default values defined for this parameter
|
||||
}
|
||||
|
||||
// WithTimeout adds the timeout to the get services params
|
||||
func (o *GetServicesParams) WithTimeout(timeout time.Duration) *GetServicesParams {
|
||||
o.SetTimeout(timeout)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetTimeout adds the timeout to the get services params
|
||||
func (o *GetServicesParams) SetTimeout(timeout time.Duration) {
|
||||
o.timeout = timeout
|
||||
}
|
||||
|
||||
// WithContext adds the context to the get services params
|
||||
func (o *GetServicesParams) WithContext(ctx context.Context) *GetServicesParams {
|
||||
o.SetContext(ctx)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetContext adds the context to the get services params
|
||||
func (o *GetServicesParams) SetContext(ctx context.Context) {
|
||||
o.Context = ctx
|
||||
}
|
||||
|
||||
// WithHTTPClient adds the HTTPClient to the get services params
|
||||
func (o *GetServicesParams) WithHTTPClient(client *http.Client) *GetServicesParams {
|
||||
o.SetHTTPClient(client)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetHTTPClient adds the HTTPClient to the get services params
|
||||
func (o *GetServicesParams) SetHTTPClient(client *http.Client) {
|
||||
o.HTTPClient = client
|
||||
}
|
||||
|
||||
// WithLimit adds the limit to the get services params
|
||||
func (o *GetServicesParams) WithLimit(limit *int64) *GetServicesParams {
|
||||
o.SetLimit(limit)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetLimit adds the limit to the get services params
|
||||
func (o *GetServicesParams) SetLimit(limit *int64) {
|
||||
o.Limit = limit
|
||||
}
|
||||
|
||||
// WithOffset adds the offset to the get services params
|
||||
func (o *GetServicesParams) WithOffset(offset *int64) *GetServicesParams {
|
||||
o.SetOffset(offset)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetOffset adds the offset to the get services params
|
||||
func (o *GetServicesParams) SetOffset(offset *int64) {
|
||||
o.Offset = offset
|
||||
}
|
||||
|
||||
// WithServiceID adds the serviceID to the get services params
|
||||
func (o *GetServicesParams) WithServiceID(serviceID *string) *GetServicesParams {
|
||||
o.SetServiceID(serviceID)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetServiceID adds the serviceId to the get services params
|
||||
func (o *GetServicesParams) SetServiceID(serviceID *string) {
|
||||
o.ServiceID = serviceID
|
||||
}
|
||||
|
||||
// WriteToRequest writes these params to a swagger request
|
||||
func (o *GetServicesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
|
||||
|
||||
if err := r.SetTimeout(o.timeout); err != nil {
|
||||
return err
|
||||
}
|
||||
var res []error
|
||||
|
||||
if o.Limit != nil {
|
||||
|
||||
// query param limit
|
||||
var qrLimit int64
|
||||
|
||||
if o.Limit != nil {
|
||||
qrLimit = *o.Limit
|
||||
}
|
||||
qLimit := swag.FormatInt64(qrLimit)
|
||||
if qLimit != "" {
|
||||
|
||||
if err := r.SetQueryParam("limit", qLimit); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if o.Offset != nil {
|
||||
|
||||
// query param offset
|
||||
var qrOffset int64
|
||||
|
||||
if o.Offset != nil {
|
||||
qrOffset = *o.Offset
|
||||
}
|
||||
qOffset := swag.FormatInt64(qrOffset)
|
||||
if qOffset != "" {
|
||||
|
||||
if err := r.SetQueryParam("offset", qOffset); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if o.ServiceID != nil {
|
||||
|
||||
// query param serviceId
|
||||
var qrServiceID string
|
||||
|
||||
if o.ServiceID != nil {
|
||||
qrServiceID = *o.ServiceID
|
||||
}
|
||||
qServiceID := qrServiceID
|
||||
if qServiceID != "" {
|
||||
|
||||
if err := r.SetQueryParam("serviceId", qServiceID); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if len(res) > 0 {
|
||||
return errors.CompositeValidationError(res...)
|
||||
}
|
||||
return nil
|
||||
}
|
|
@ -1,339 +0,0 @@
|
|||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
// (c) 2012-2020 by Taxnexus, Inc.
|
||||
// All rights reserved worldwide.
|
||||
// Proprietary product; unlicensed use is not allowed
|
||||
|
||||
package service
|
||||
|
||||
// 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"
|
||||
|
||||
"code.tnxs.net/vernonkeenan/lib/api/devops/devops_models"
|
||||
)
|
||||
|
||||
// GetServicesReader is a Reader for the GetServices structure.
|
||||
type GetServicesReader struct {
|
||||
formats strfmt.Registry
|
||||
}
|
||||
|
||||
// ReadResponse reads a server response into the received o.
|
||||
func (o *GetServicesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
|
||||
switch response.Code() {
|
||||
case 200:
|
||||
result := NewGetServicesOK()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return result, nil
|
||||
case 401:
|
||||
result := NewGetServicesUnauthorized()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return nil, result
|
||||
case 403:
|
||||
result := NewGetServicesForbidden()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return nil, result
|
||||
case 404:
|
||||
result := NewGetServicesNotFound()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return nil, result
|
||||
case 422:
|
||||
result := NewGetServicesUnprocessableEntity()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return nil, result
|
||||
case 500:
|
||||
result := NewGetServicesInternalServerError()
|
||||
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())
|
||||
}
|
||||
}
|
||||
|
||||
// NewGetServicesOK creates a GetServicesOK with default headers values
|
||||
func NewGetServicesOK() *GetServicesOK {
|
||||
return &GetServicesOK{}
|
||||
}
|
||||
|
||||
/* GetServicesOK describes a response with status code 200, with default header values.
|
||||
|
||||
Taxnexus Response with Service objects
|
||||
*/
|
||||
type GetServicesOK struct {
|
||||
AccessControlAllowOrigin string
|
||||
CacheControl string
|
||||
|
||||
Payload *devops_models.ServiceResponse
|
||||
}
|
||||
|
||||
func (o *GetServicesOK) Error() string {
|
||||
return fmt.Sprintf("[GET /services][%d] getServicesOK %+v", 200, o.Payload)
|
||||
}
|
||||
func (o *GetServicesOK) GetPayload() *devops_models.ServiceResponse {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *GetServicesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
// hydrates response header Access-Control-Allow-Origin
|
||||
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
|
||||
|
||||
if hdrAccessControlAllowOrigin != "" {
|
||||
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
|
||||
}
|
||||
|
||||
// hydrates response header Cache-Control
|
||||
hdrCacheControl := response.GetHeader("Cache-Control")
|
||||
|
||||
if hdrCacheControl != "" {
|
||||
o.CacheControl = hdrCacheControl
|
||||
}
|
||||
|
||||
o.Payload = new(devops_models.ServiceResponse)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewGetServicesUnauthorized creates a GetServicesUnauthorized with default headers values
|
||||
func NewGetServicesUnauthorized() *GetServicesUnauthorized {
|
||||
return &GetServicesUnauthorized{}
|
||||
}
|
||||
|
||||
/* GetServicesUnauthorized describes a response with status code 401, with default header values.
|
||||
|
||||
Access Unauthorized, invalid API-KEY was used
|
||||
*/
|
||||
type GetServicesUnauthorized struct {
|
||||
AccessControlAllowOrigin string
|
||||
CacheControl string
|
||||
|
||||
Payload *devops_models.Error
|
||||
}
|
||||
|
||||
func (o *GetServicesUnauthorized) Error() string {
|
||||
return fmt.Sprintf("[GET /services][%d] getServicesUnauthorized %+v", 401, o.Payload)
|
||||
}
|
||||
func (o *GetServicesUnauthorized) GetPayload() *devops_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *GetServicesUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
// hydrates response header Access-Control-Allow-Origin
|
||||
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
|
||||
|
||||
if hdrAccessControlAllowOrigin != "" {
|
||||
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
|
||||
}
|
||||
|
||||
// hydrates response header Cache-Control
|
||||
hdrCacheControl := response.GetHeader("Cache-Control")
|
||||
|
||||
if hdrCacheControl != "" {
|
||||
o.CacheControl = hdrCacheControl
|
||||
}
|
||||
|
||||
o.Payload = new(devops_models.Error)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewGetServicesForbidden creates a GetServicesForbidden with default headers values
|
||||
func NewGetServicesForbidden() *GetServicesForbidden {
|
||||
return &GetServicesForbidden{}
|
||||
}
|
||||
|
||||
/* GetServicesForbidden describes a response with status code 403, with default header values.
|
||||
|
||||
Access forbidden, account lacks access
|
||||
*/
|
||||
type GetServicesForbidden struct {
|
||||
AccessControlAllowOrigin string
|
||||
|
||||
Payload *devops_models.Error
|
||||
}
|
||||
|
||||
func (o *GetServicesForbidden) Error() string {
|
||||
return fmt.Sprintf("[GET /services][%d] getServicesForbidden %+v", 403, o.Payload)
|
||||
}
|
||||
func (o *GetServicesForbidden) GetPayload() *devops_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *GetServicesForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
// hydrates response header Access-Control-Allow-Origin
|
||||
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
|
||||
|
||||
if hdrAccessControlAllowOrigin != "" {
|
||||
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
|
||||
}
|
||||
|
||||
o.Payload = new(devops_models.Error)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewGetServicesNotFound creates a GetServicesNotFound with default headers values
|
||||
func NewGetServicesNotFound() *GetServicesNotFound {
|
||||
return &GetServicesNotFound{}
|
||||
}
|
||||
|
||||
/* GetServicesNotFound describes a response with status code 404, with default header values.
|
||||
|
||||
Resource was not found
|
||||
*/
|
||||
type GetServicesNotFound struct {
|
||||
AccessControlAllowOrigin string
|
||||
|
||||
Payload *devops_models.Error
|
||||
}
|
||||
|
||||
func (o *GetServicesNotFound) Error() string {
|
||||
return fmt.Sprintf("[GET /services][%d] getServicesNotFound %+v", 404, o.Payload)
|
||||
}
|
||||
func (o *GetServicesNotFound) GetPayload() *devops_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *GetServicesNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
// hydrates response header Access-Control-Allow-Origin
|
||||
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
|
||||
|
||||
if hdrAccessControlAllowOrigin != "" {
|
||||
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
|
||||
}
|
||||
|
||||
o.Payload = new(devops_models.Error)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewGetServicesUnprocessableEntity creates a GetServicesUnprocessableEntity with default headers values
|
||||
func NewGetServicesUnprocessableEntity() *GetServicesUnprocessableEntity {
|
||||
return &GetServicesUnprocessableEntity{}
|
||||
}
|
||||
|
||||
/* GetServicesUnprocessableEntity describes a response with status code 422, with default header values.
|
||||
|
||||
Unprocessable Entity, likely a bad parameter
|
||||
*/
|
||||
type GetServicesUnprocessableEntity struct {
|
||||
AccessControlAllowOrigin string
|
||||
CacheControl string
|
||||
|
||||
Payload *devops_models.Error
|
||||
}
|
||||
|
||||
func (o *GetServicesUnprocessableEntity) Error() string {
|
||||
return fmt.Sprintf("[GET /services][%d] getServicesUnprocessableEntity %+v", 422, o.Payload)
|
||||
}
|
||||
func (o *GetServicesUnprocessableEntity) GetPayload() *devops_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *GetServicesUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
// hydrates response header Access-Control-Allow-Origin
|
||||
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
|
||||
|
||||
if hdrAccessControlAllowOrigin != "" {
|
||||
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
|
||||
}
|
||||
|
||||
// hydrates response header Cache-Control
|
||||
hdrCacheControl := response.GetHeader("Cache-Control")
|
||||
|
||||
if hdrCacheControl != "" {
|
||||
o.CacheControl = hdrCacheControl
|
||||
}
|
||||
|
||||
o.Payload = new(devops_models.Error)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewGetServicesInternalServerError creates a GetServicesInternalServerError with default headers values
|
||||
func NewGetServicesInternalServerError() *GetServicesInternalServerError {
|
||||
return &GetServicesInternalServerError{}
|
||||
}
|
||||
|
||||
/* GetServicesInternalServerError describes a response with status code 500, with default header values.
|
||||
|
||||
Server Internal Error
|
||||
*/
|
||||
type GetServicesInternalServerError struct {
|
||||
AccessControlAllowOrigin string
|
||||
|
||||
Payload *devops_models.Error
|
||||
}
|
||||
|
||||
func (o *GetServicesInternalServerError) Error() string {
|
||||
return fmt.Sprintf("[GET /services][%d] getServicesInternalServerError %+v", 500, o.Payload)
|
||||
}
|
||||
func (o *GetServicesInternalServerError) GetPayload() *devops_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *GetServicesInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
// hydrates response header Access-Control-Allow-Origin
|
||||
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
|
||||
|
||||
if hdrAccessControlAllowOrigin != "" {
|
||||
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
|
||||
}
|
||||
|
||||
o.Payload = new(devops_models.Error)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
|
@ -1,155 +0,0 @@
|
|||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
// (c) 2012-2020 by Taxnexus, Inc.
|
||||
// All rights reserved worldwide.
|
||||
// Proprietary product; unlicensed use is not allowed
|
||||
|
||||
package service
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
// Editing this file might prove futile when you re-run the swagger generate command
|
||||
|
||||
import (
|
||||
"context"
|
||||
"net/http"
|
||||
"time"
|
||||
|
||||
"github.com/go-openapi/errors"
|
||||
"github.com/go-openapi/runtime"
|
||||
cr "github.com/go-openapi/runtime/client"
|
||||
"github.com/go-openapi/strfmt"
|
||||
|
||||
"code.tnxs.net/vernonkeenan/lib/api/devops/devops_models"
|
||||
)
|
||||
|
||||
// NewPostServicesParams creates a new PostServicesParams object,
|
||||
// with the default timeout for this client.
|
||||
//
|
||||
// Default values are not hydrated, since defaults are normally applied by the API server side.
|
||||
//
|
||||
// To enforce default values in parameter, use SetDefaults or WithDefaults.
|
||||
func NewPostServicesParams() *PostServicesParams {
|
||||
return &PostServicesParams{
|
||||
timeout: cr.DefaultTimeout,
|
||||
}
|
||||
}
|
||||
|
||||
// NewPostServicesParamsWithTimeout creates a new PostServicesParams object
|
||||
// with the ability to set a timeout on a request.
|
||||
func NewPostServicesParamsWithTimeout(timeout time.Duration) *PostServicesParams {
|
||||
return &PostServicesParams{
|
||||
timeout: timeout,
|
||||
}
|
||||
}
|
||||
|
||||
// NewPostServicesParamsWithContext creates a new PostServicesParams object
|
||||
// with the ability to set a context for a request.
|
||||
func NewPostServicesParamsWithContext(ctx context.Context) *PostServicesParams {
|
||||
return &PostServicesParams{
|
||||
Context: ctx,
|
||||
}
|
||||
}
|
||||
|
||||
// NewPostServicesParamsWithHTTPClient creates a new PostServicesParams object
|
||||
// with the ability to set a custom HTTPClient for a request.
|
||||
func NewPostServicesParamsWithHTTPClient(client *http.Client) *PostServicesParams {
|
||||
return &PostServicesParams{
|
||||
HTTPClient: client,
|
||||
}
|
||||
}
|
||||
|
||||
/* PostServicesParams contains all the parameters to send to the API endpoint
|
||||
for the post services operation.
|
||||
|
||||
Typically these are written to a http.Request.
|
||||
*/
|
||||
type PostServicesParams struct {
|
||||
|
||||
/* ServiceRequest.
|
||||
|
||||
An array of Service records
|
||||
*/
|
||||
ServiceRequest *devops_models.ServiceRequest
|
||||
|
||||
timeout time.Duration
|
||||
Context context.Context
|
||||
HTTPClient *http.Client
|
||||
}
|
||||
|
||||
// WithDefaults hydrates default values in the post services params (not the query body).
|
||||
//
|
||||
// All values with no default are reset to their zero value.
|
||||
func (o *PostServicesParams) WithDefaults() *PostServicesParams {
|
||||
o.SetDefaults()
|
||||
return o
|
||||
}
|
||||
|
||||
// SetDefaults hydrates default values in the post services params (not the query body).
|
||||
//
|
||||
// All values with no default are reset to their zero value.
|
||||
func (o *PostServicesParams) SetDefaults() {
|
||||
// no default values defined for this parameter
|
||||
}
|
||||
|
||||
// WithTimeout adds the timeout to the post services params
|
||||
func (o *PostServicesParams) WithTimeout(timeout time.Duration) *PostServicesParams {
|
||||
o.SetTimeout(timeout)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetTimeout adds the timeout to the post services params
|
||||
func (o *PostServicesParams) SetTimeout(timeout time.Duration) {
|
||||
o.timeout = timeout
|
||||
}
|
||||
|
||||
// WithContext adds the context to the post services params
|
||||
func (o *PostServicesParams) WithContext(ctx context.Context) *PostServicesParams {
|
||||
o.SetContext(ctx)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetContext adds the context to the post services params
|
||||
func (o *PostServicesParams) SetContext(ctx context.Context) {
|
||||
o.Context = ctx
|
||||
}
|
||||
|
||||
// WithHTTPClient adds the HTTPClient to the post services params
|
||||
func (o *PostServicesParams) WithHTTPClient(client *http.Client) *PostServicesParams {
|
||||
o.SetHTTPClient(client)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetHTTPClient adds the HTTPClient to the post services params
|
||||
func (o *PostServicesParams) SetHTTPClient(client *http.Client) {
|
||||
o.HTTPClient = client
|
||||
}
|
||||
|
||||
// WithServiceRequest adds the serviceRequest to the post services params
|
||||
func (o *PostServicesParams) WithServiceRequest(serviceRequest *devops_models.ServiceRequest) *PostServicesParams {
|
||||
o.SetServiceRequest(serviceRequest)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetServiceRequest adds the serviceRequest to the post services params
|
||||
func (o *PostServicesParams) SetServiceRequest(serviceRequest *devops_models.ServiceRequest) {
|
||||
o.ServiceRequest = serviceRequest
|
||||
}
|
||||
|
||||
// WriteToRequest writes these params to a swagger request
|
||||
func (o *PostServicesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
|
||||
|
||||
if err := r.SetTimeout(o.timeout); err != nil {
|
||||
return err
|
||||
}
|
||||
var res []error
|
||||
if o.ServiceRequest != nil {
|
||||
if err := r.SetBodyParam(o.ServiceRequest); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
if len(res) > 0 {
|
||||
return errors.CompositeValidationError(res...)
|
||||
}
|
||||
return nil
|
||||
}
|
|
@ -1,339 +0,0 @@
|
|||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
// (c) 2012-2020 by Taxnexus, Inc.
|
||||
// All rights reserved worldwide.
|
||||
// Proprietary product; unlicensed use is not allowed
|
||||
|
||||
package service
|
||||
|
||||
// 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"
|
||||
|
||||
"code.tnxs.net/vernonkeenan/lib/api/devops/devops_models"
|
||||
)
|
||||
|
||||
// PostServicesReader is a Reader for the PostServices structure.
|
||||
type PostServicesReader struct {
|
||||
formats strfmt.Registry
|
||||
}
|
||||
|
||||
// ReadResponse reads a server response into the received o.
|
||||
func (o *PostServicesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
|
||||
switch response.Code() {
|
||||
case 200:
|
||||
result := NewPostServicesOK()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return result, nil
|
||||
case 401:
|
||||
result := NewPostServicesUnauthorized()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return nil, result
|
||||
case 403:
|
||||
result := NewPostServicesForbidden()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return nil, result
|
||||
case 404:
|
||||
result := NewPostServicesNotFound()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return nil, result
|
||||
case 422:
|
||||
result := NewPostServicesUnprocessableEntity()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return nil, result
|
||||
case 500:
|
||||
result := NewPostServicesInternalServerError()
|
||||
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())
|
||||
}
|
||||
}
|
||||
|
||||
// NewPostServicesOK creates a PostServicesOK with default headers values
|
||||
func NewPostServicesOK() *PostServicesOK {
|
||||
return &PostServicesOK{}
|
||||
}
|
||||
|
||||
/* PostServicesOK describes a response with status code 200, with default header values.
|
||||
|
||||
Taxnexus Response with Service objects
|
||||
*/
|
||||
type PostServicesOK struct {
|
||||
AccessControlAllowOrigin string
|
||||
CacheControl string
|
||||
|
||||
Payload *devops_models.ServiceResponse
|
||||
}
|
||||
|
||||
func (o *PostServicesOK) Error() string {
|
||||
return fmt.Sprintf("[POST /services][%d] postServicesOK %+v", 200, o.Payload)
|
||||
}
|
||||
func (o *PostServicesOK) GetPayload() *devops_models.ServiceResponse {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *PostServicesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
// hydrates response header Access-Control-Allow-Origin
|
||||
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
|
||||
|
||||
if hdrAccessControlAllowOrigin != "" {
|
||||
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
|
||||
}
|
||||
|
||||
// hydrates response header Cache-Control
|
||||
hdrCacheControl := response.GetHeader("Cache-Control")
|
||||
|
||||
if hdrCacheControl != "" {
|
||||
o.CacheControl = hdrCacheControl
|
||||
}
|
||||
|
||||
o.Payload = new(devops_models.ServiceResponse)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewPostServicesUnauthorized creates a PostServicesUnauthorized with default headers values
|
||||
func NewPostServicesUnauthorized() *PostServicesUnauthorized {
|
||||
return &PostServicesUnauthorized{}
|
||||
}
|
||||
|
||||
/* PostServicesUnauthorized describes a response with status code 401, with default header values.
|
||||
|
||||
Access Unauthorized, invalid API-KEY was used
|
||||
*/
|
||||
type PostServicesUnauthorized struct {
|
||||
AccessControlAllowOrigin string
|
||||
CacheControl string
|
||||
|
||||
Payload *devops_models.Error
|
||||
}
|
||||
|
||||
func (o *PostServicesUnauthorized) Error() string {
|
||||
return fmt.Sprintf("[POST /services][%d] postServicesUnauthorized %+v", 401, o.Payload)
|
||||
}
|
||||
func (o *PostServicesUnauthorized) GetPayload() *devops_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *PostServicesUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
// hydrates response header Access-Control-Allow-Origin
|
||||
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
|
||||
|
||||
if hdrAccessControlAllowOrigin != "" {
|
||||
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
|
||||
}
|
||||
|
||||
// hydrates response header Cache-Control
|
||||
hdrCacheControl := response.GetHeader("Cache-Control")
|
||||
|
||||
if hdrCacheControl != "" {
|
||||
o.CacheControl = hdrCacheControl
|
||||
}
|
||||
|
||||
o.Payload = new(devops_models.Error)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewPostServicesForbidden creates a PostServicesForbidden with default headers values
|
||||
func NewPostServicesForbidden() *PostServicesForbidden {
|
||||
return &PostServicesForbidden{}
|
||||
}
|
||||
|
||||
/* PostServicesForbidden describes a response with status code 403, with default header values.
|
||||
|
||||
Access forbidden, account lacks access
|
||||
*/
|
||||
type PostServicesForbidden struct {
|
||||
AccessControlAllowOrigin string
|
||||
|
||||
Payload *devops_models.Error
|
||||
}
|
||||
|
||||
func (o *PostServicesForbidden) Error() string {
|
||||
return fmt.Sprintf("[POST /services][%d] postServicesForbidden %+v", 403, o.Payload)
|
||||
}
|
||||
func (o *PostServicesForbidden) GetPayload() *devops_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *PostServicesForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
// hydrates response header Access-Control-Allow-Origin
|
||||
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
|
||||
|
||||
if hdrAccessControlAllowOrigin != "" {
|
||||
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
|
||||
}
|
||||
|
||||
o.Payload = new(devops_models.Error)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewPostServicesNotFound creates a PostServicesNotFound with default headers values
|
||||
func NewPostServicesNotFound() *PostServicesNotFound {
|
||||
return &PostServicesNotFound{}
|
||||
}
|
||||
|
||||
/* PostServicesNotFound describes a response with status code 404, with default header values.
|
||||
|
||||
Resource was not found
|
||||
*/
|
||||
type PostServicesNotFound struct {
|
||||
AccessControlAllowOrigin string
|
||||
|
||||
Payload *devops_models.Error
|
||||
}
|
||||
|
||||
func (o *PostServicesNotFound) Error() string {
|
||||
return fmt.Sprintf("[POST /services][%d] postServicesNotFound %+v", 404, o.Payload)
|
||||
}
|
||||
func (o *PostServicesNotFound) GetPayload() *devops_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *PostServicesNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
// hydrates response header Access-Control-Allow-Origin
|
||||
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
|
||||
|
||||
if hdrAccessControlAllowOrigin != "" {
|
||||
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
|
||||
}
|
||||
|
||||
o.Payload = new(devops_models.Error)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewPostServicesUnprocessableEntity creates a PostServicesUnprocessableEntity with default headers values
|
||||
func NewPostServicesUnprocessableEntity() *PostServicesUnprocessableEntity {
|
||||
return &PostServicesUnprocessableEntity{}
|
||||
}
|
||||
|
||||
/* PostServicesUnprocessableEntity describes a response with status code 422, with default header values.
|
||||
|
||||
Unprocessable Entity, likely a bad parameter
|
||||
*/
|
||||
type PostServicesUnprocessableEntity struct {
|
||||
AccessControlAllowOrigin string
|
||||
CacheControl string
|
||||
|
||||
Payload *devops_models.Error
|
||||
}
|
||||
|
||||
func (o *PostServicesUnprocessableEntity) Error() string {
|
||||
return fmt.Sprintf("[POST /services][%d] postServicesUnprocessableEntity %+v", 422, o.Payload)
|
||||
}
|
||||
func (o *PostServicesUnprocessableEntity) GetPayload() *devops_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *PostServicesUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
// hydrates response header Access-Control-Allow-Origin
|
||||
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
|
||||
|
||||
if hdrAccessControlAllowOrigin != "" {
|
||||
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
|
||||
}
|
||||
|
||||
// hydrates response header Cache-Control
|
||||
hdrCacheControl := response.GetHeader("Cache-Control")
|
||||
|
||||
if hdrCacheControl != "" {
|
||||
o.CacheControl = hdrCacheControl
|
||||
}
|
||||
|
||||
o.Payload = new(devops_models.Error)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewPostServicesInternalServerError creates a PostServicesInternalServerError with default headers values
|
||||
func NewPostServicesInternalServerError() *PostServicesInternalServerError {
|
||||
return &PostServicesInternalServerError{}
|
||||
}
|
||||
|
||||
/* PostServicesInternalServerError describes a response with status code 500, with default header values.
|
||||
|
||||
Server Internal Error
|
||||
*/
|
||||
type PostServicesInternalServerError struct {
|
||||
AccessControlAllowOrigin string
|
||||
|
||||
Payload *devops_models.Error
|
||||
}
|
||||
|
||||
func (o *PostServicesInternalServerError) Error() string {
|
||||
return fmt.Sprintf("[POST /services][%d] postServicesInternalServerError %+v", 500, o.Payload)
|
||||
}
|
||||
func (o *PostServicesInternalServerError) GetPayload() *devops_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *PostServicesInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
// hydrates response header Access-Control-Allow-Origin
|
||||
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
|
||||
|
||||
if hdrAccessControlAllowOrigin != "" {
|
||||
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
|
||||
}
|
||||
|
||||
o.Payload = new(devops_models.Error)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
|
@ -1,155 +0,0 @@
|
|||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
// (c) 2012-2020 by Taxnexus, Inc.
|
||||
// All rights reserved worldwide.
|
||||
// Proprietary product; unlicensed use is not allowed
|
||||
|
||||
package service
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
// Editing this file might prove futile when you re-run the swagger generate command
|
||||
|
||||
import (
|
||||
"context"
|
||||
"net/http"
|
||||
"time"
|
||||
|
||||
"github.com/go-openapi/errors"
|
||||
"github.com/go-openapi/runtime"
|
||||
cr "github.com/go-openapi/runtime/client"
|
||||
"github.com/go-openapi/strfmt"
|
||||
|
||||
"code.tnxs.net/vernonkeenan/lib/api/devops/devops_models"
|
||||
)
|
||||
|
||||
// NewPutServicesParams creates a new PutServicesParams object,
|
||||
// with the default timeout for this client.
|
||||
//
|
||||
// Default values are not hydrated, since defaults are normally applied by the API server side.
|
||||
//
|
||||
// To enforce default values in parameter, use SetDefaults or WithDefaults.
|
||||
func NewPutServicesParams() *PutServicesParams {
|
||||
return &PutServicesParams{
|
||||
timeout: cr.DefaultTimeout,
|
||||
}
|
||||
}
|
||||
|
||||
// NewPutServicesParamsWithTimeout creates a new PutServicesParams object
|
||||
// with the ability to set a timeout on a request.
|
||||
func NewPutServicesParamsWithTimeout(timeout time.Duration) *PutServicesParams {
|
||||
return &PutServicesParams{
|
||||
timeout: timeout,
|
||||
}
|
||||
}
|
||||
|
||||
// NewPutServicesParamsWithContext creates a new PutServicesParams object
|
||||
// with the ability to set a context for a request.
|
||||
func NewPutServicesParamsWithContext(ctx context.Context) *PutServicesParams {
|
||||
return &PutServicesParams{
|
||||
Context: ctx,
|
||||
}
|
||||
}
|
||||
|
||||
// NewPutServicesParamsWithHTTPClient creates a new PutServicesParams object
|
||||
// with the ability to set a custom HTTPClient for a request.
|
||||
func NewPutServicesParamsWithHTTPClient(client *http.Client) *PutServicesParams {
|
||||
return &PutServicesParams{
|
||||
HTTPClient: client,
|
||||
}
|
||||
}
|
||||
|
||||
/* PutServicesParams contains all the parameters to send to the API endpoint
|
||||
for the put services operation.
|
||||
|
||||
Typically these are written to a http.Request.
|
||||
*/
|
||||
type PutServicesParams struct {
|
||||
|
||||
/* ServiceRequest.
|
||||
|
||||
An array of Service records
|
||||
*/
|
||||
ServiceRequest *devops_models.ServiceRequest
|
||||
|
||||
timeout time.Duration
|
||||
Context context.Context
|
||||
HTTPClient *http.Client
|
||||
}
|
||||
|
||||
// WithDefaults hydrates default values in the put services params (not the query body).
|
||||
//
|
||||
// All values with no default are reset to their zero value.
|
||||
func (o *PutServicesParams) WithDefaults() *PutServicesParams {
|
||||
o.SetDefaults()
|
||||
return o
|
||||
}
|
||||
|
||||
// SetDefaults hydrates default values in the put services params (not the query body).
|
||||
//
|
||||
// All values with no default are reset to their zero value.
|
||||
func (o *PutServicesParams) SetDefaults() {
|
||||
// no default values defined for this parameter
|
||||
}
|
||||
|
||||
// WithTimeout adds the timeout to the put services params
|
||||
func (o *PutServicesParams) WithTimeout(timeout time.Duration) *PutServicesParams {
|
||||
o.SetTimeout(timeout)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetTimeout adds the timeout to the put services params
|
||||
func (o *PutServicesParams) SetTimeout(timeout time.Duration) {
|
||||
o.timeout = timeout
|
||||
}
|
||||
|
||||
// WithContext adds the context to the put services params
|
||||
func (o *PutServicesParams) WithContext(ctx context.Context) *PutServicesParams {
|
||||
o.SetContext(ctx)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetContext adds the context to the put services params
|
||||
func (o *PutServicesParams) SetContext(ctx context.Context) {
|
||||
o.Context = ctx
|
||||
}
|
||||
|
||||
// WithHTTPClient adds the HTTPClient to the put services params
|
||||
func (o *PutServicesParams) WithHTTPClient(client *http.Client) *PutServicesParams {
|
||||
o.SetHTTPClient(client)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetHTTPClient adds the HTTPClient to the put services params
|
||||
func (o *PutServicesParams) SetHTTPClient(client *http.Client) {
|
||||
o.HTTPClient = client
|
||||
}
|
||||
|
||||
// WithServiceRequest adds the serviceRequest to the put services params
|
||||
func (o *PutServicesParams) WithServiceRequest(serviceRequest *devops_models.ServiceRequest) *PutServicesParams {
|
||||
o.SetServiceRequest(serviceRequest)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetServiceRequest adds the serviceRequest to the put services params
|
||||
func (o *PutServicesParams) SetServiceRequest(serviceRequest *devops_models.ServiceRequest) {
|
||||
o.ServiceRequest = serviceRequest
|
||||
}
|
||||
|
||||
// WriteToRequest writes these params to a swagger request
|
||||
func (o *PutServicesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
|
||||
|
||||
if err := r.SetTimeout(o.timeout); err != nil {
|
||||
return err
|
||||
}
|
||||
var res []error
|
||||
if o.ServiceRequest != nil {
|
||||
if err := r.SetBodyParam(o.ServiceRequest); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
if len(res) > 0 {
|
||||
return errors.CompositeValidationError(res...)
|
||||
}
|
||||
return nil
|
||||
}
|
|
@ -1,339 +0,0 @@
|
|||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
// (c) 2012-2020 by Taxnexus, Inc.
|
||||
// All rights reserved worldwide.
|
||||
// Proprietary product; unlicensed use is not allowed
|
||||
|
||||
package service
|
||||
|
||||
// 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"
|
||||
|
||||
"code.tnxs.net/vernonkeenan/lib/api/devops/devops_models"
|
||||
)
|
||||
|
||||
// PutServicesReader is a Reader for the PutServices structure.
|
||||
type PutServicesReader struct {
|
||||
formats strfmt.Registry
|
||||
}
|
||||
|
||||
// ReadResponse reads a server response into the received o.
|
||||
func (o *PutServicesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
|
||||
switch response.Code() {
|
||||
case 200:
|
||||
result := NewPutServicesOK()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return result, nil
|
||||
case 401:
|
||||
result := NewPutServicesUnauthorized()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return nil, result
|
||||
case 403:
|
||||
result := NewPutServicesForbidden()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return nil, result
|
||||
case 404:
|
||||
result := NewPutServicesNotFound()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return nil, result
|
||||
case 422:
|
||||
result := NewPutServicesUnprocessableEntity()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return nil, result
|
||||
case 500:
|
||||
result := NewPutServicesInternalServerError()
|
||||
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())
|
||||
}
|
||||
}
|
||||
|
||||
// NewPutServicesOK creates a PutServicesOK with default headers values
|
||||
func NewPutServicesOK() *PutServicesOK {
|
||||
return &PutServicesOK{}
|
||||
}
|
||||
|
||||
/* PutServicesOK describes a response with status code 200, with default header values.
|
||||
|
||||
Taxnexus Response with Service objects
|
||||
*/
|
||||
type PutServicesOK struct {
|
||||
AccessControlAllowOrigin string
|
||||
CacheControl string
|
||||
|
||||
Payload *devops_models.ServiceResponse
|
||||
}
|
||||
|
||||
func (o *PutServicesOK) Error() string {
|
||||
return fmt.Sprintf("[PUT /services][%d] putServicesOK %+v", 200, o.Payload)
|
||||
}
|
||||
func (o *PutServicesOK) GetPayload() *devops_models.ServiceResponse {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *PutServicesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
// hydrates response header Access-Control-Allow-Origin
|
||||
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
|
||||
|
||||
if hdrAccessControlAllowOrigin != "" {
|
||||
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
|
||||
}
|
||||
|
||||
// hydrates response header Cache-Control
|
||||
hdrCacheControl := response.GetHeader("Cache-Control")
|
||||
|
||||
if hdrCacheControl != "" {
|
||||
o.CacheControl = hdrCacheControl
|
||||
}
|
||||
|
||||
o.Payload = new(devops_models.ServiceResponse)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewPutServicesUnauthorized creates a PutServicesUnauthorized with default headers values
|
||||
func NewPutServicesUnauthorized() *PutServicesUnauthorized {
|
||||
return &PutServicesUnauthorized{}
|
||||
}
|
||||
|
||||
/* PutServicesUnauthorized describes a response with status code 401, with default header values.
|
||||
|
||||
Access Unauthorized, invalid API-KEY was used
|
||||
*/
|
||||
type PutServicesUnauthorized struct {
|
||||
AccessControlAllowOrigin string
|
||||
CacheControl string
|
||||
|
||||
Payload *devops_models.Error
|
||||
}
|
||||
|
||||
func (o *PutServicesUnauthorized) Error() string {
|
||||
return fmt.Sprintf("[PUT /services][%d] putServicesUnauthorized %+v", 401, o.Payload)
|
||||
}
|
||||
func (o *PutServicesUnauthorized) GetPayload() *devops_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *PutServicesUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
// hydrates response header Access-Control-Allow-Origin
|
||||
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
|
||||
|
||||
if hdrAccessControlAllowOrigin != "" {
|
||||
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
|
||||
}
|
||||
|
||||
// hydrates response header Cache-Control
|
||||
hdrCacheControl := response.GetHeader("Cache-Control")
|
||||
|
||||
if hdrCacheControl != "" {
|
||||
o.CacheControl = hdrCacheControl
|
||||
}
|
||||
|
||||
o.Payload = new(devops_models.Error)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewPutServicesForbidden creates a PutServicesForbidden with default headers values
|
||||
func NewPutServicesForbidden() *PutServicesForbidden {
|
||||
return &PutServicesForbidden{}
|
||||
}
|
||||
|
||||
/* PutServicesForbidden describes a response with status code 403, with default header values.
|
||||
|
||||
Access forbidden, account lacks access
|
||||
*/
|
||||
type PutServicesForbidden struct {
|
||||
AccessControlAllowOrigin string
|
||||
|
||||
Payload *devops_models.Error
|
||||
}
|
||||
|
||||
func (o *PutServicesForbidden) Error() string {
|
||||
return fmt.Sprintf("[PUT /services][%d] putServicesForbidden %+v", 403, o.Payload)
|
||||
}
|
||||
func (o *PutServicesForbidden) GetPayload() *devops_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *PutServicesForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
// hydrates response header Access-Control-Allow-Origin
|
||||
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
|
||||
|
||||
if hdrAccessControlAllowOrigin != "" {
|
||||
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
|
||||
}
|
||||
|
||||
o.Payload = new(devops_models.Error)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewPutServicesNotFound creates a PutServicesNotFound with default headers values
|
||||
func NewPutServicesNotFound() *PutServicesNotFound {
|
||||
return &PutServicesNotFound{}
|
||||
}
|
||||
|
||||
/* PutServicesNotFound describes a response with status code 404, with default header values.
|
||||
|
||||
Resource was not found
|
||||
*/
|
||||
type PutServicesNotFound struct {
|
||||
AccessControlAllowOrigin string
|
||||
|
||||
Payload *devops_models.Error
|
||||
}
|
||||
|
||||
func (o *PutServicesNotFound) Error() string {
|
||||
return fmt.Sprintf("[PUT /services][%d] putServicesNotFound %+v", 404, o.Payload)
|
||||
}
|
||||
func (o *PutServicesNotFound) GetPayload() *devops_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *PutServicesNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
// hydrates response header Access-Control-Allow-Origin
|
||||
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
|
||||
|
||||
if hdrAccessControlAllowOrigin != "" {
|
||||
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
|
||||
}
|
||||
|
||||
o.Payload = new(devops_models.Error)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewPutServicesUnprocessableEntity creates a PutServicesUnprocessableEntity with default headers values
|
||||
func NewPutServicesUnprocessableEntity() *PutServicesUnprocessableEntity {
|
||||
return &PutServicesUnprocessableEntity{}
|
||||
}
|
||||
|
||||
/* PutServicesUnprocessableEntity describes a response with status code 422, with default header values.
|
||||
|
||||
Unprocessable Entity, likely a bad parameter
|
||||
*/
|
||||
type PutServicesUnprocessableEntity struct {
|
||||
AccessControlAllowOrigin string
|
||||
CacheControl string
|
||||
|
||||
Payload *devops_models.Error
|
||||
}
|
||||
|
||||
func (o *PutServicesUnprocessableEntity) Error() string {
|
||||
return fmt.Sprintf("[PUT /services][%d] putServicesUnprocessableEntity %+v", 422, o.Payload)
|
||||
}
|
||||
func (o *PutServicesUnprocessableEntity) GetPayload() *devops_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *PutServicesUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
// hydrates response header Access-Control-Allow-Origin
|
||||
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
|
||||
|
||||
if hdrAccessControlAllowOrigin != "" {
|
||||
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
|
||||
}
|
||||
|
||||
// hydrates response header Cache-Control
|
||||
hdrCacheControl := response.GetHeader("Cache-Control")
|
||||
|
||||
if hdrCacheControl != "" {
|
||||
o.CacheControl = hdrCacheControl
|
||||
}
|
||||
|
||||
o.Payload = new(devops_models.Error)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewPutServicesInternalServerError creates a PutServicesInternalServerError with default headers values
|
||||
func NewPutServicesInternalServerError() *PutServicesInternalServerError {
|
||||
return &PutServicesInternalServerError{}
|
||||
}
|
||||
|
||||
/* PutServicesInternalServerError describes a response with status code 500, with default header values.
|
||||
|
||||
Server Internal Error
|
||||
*/
|
||||
type PutServicesInternalServerError struct {
|
||||
AccessControlAllowOrigin string
|
||||
|
||||
Payload *devops_models.Error
|
||||
}
|
||||
|
||||
func (o *PutServicesInternalServerError) Error() string {
|
||||
return fmt.Sprintf("[PUT /services][%d] putServicesInternalServerError %+v", 500, o.Payload)
|
||||
}
|
||||
func (o *PutServicesInternalServerError) GetPayload() *devops_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *PutServicesInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
// hydrates response header Access-Control-Allow-Origin
|
||||
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
|
||||
|
||||
if hdrAccessControlAllowOrigin != "" {
|
||||
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
|
||||
}
|
||||
|
||||
o.Payload = new(devops_models.Error)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
|
@ -1,258 +0,0 @@
|
|||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
// (c) 2012-2020 by Taxnexus, Inc.
|
||||
// All rights reserved worldwide.
|
||||
// Proprietary product; unlicensed use is not allowed
|
||||
|
||||
package service
|
||||
|
||||
// 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"
|
||||
)
|
||||
|
||||
// New creates a new service API client.
|
||||
func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService {
|
||||
return &Client{transport: transport, formats: formats}
|
||||
}
|
||||
|
||||
/*
|
||||
Client for service API
|
||||
*/
|
||||
type Client struct {
|
||||
transport runtime.ClientTransport
|
||||
formats strfmt.Registry
|
||||
}
|
||||
|
||||
// ClientOption is the option for Client methods
|
||||
type ClientOption func(*runtime.ClientOperation)
|
||||
|
||||
// ClientService is the interface for Client methods
|
||||
type ClientService interface {
|
||||
GetService(params *GetServiceParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetServiceOK, error)
|
||||
|
||||
GetServices(params *GetServicesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetServicesOK, error)
|
||||
|
||||
GetServicesObservable(params *GetServicesObservableParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetServicesObservableOK, error)
|
||||
|
||||
PostServices(params *PostServicesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PostServicesOK, error)
|
||||
|
||||
PutServices(params *PutServicesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PutServicesOK, error)
|
||||
|
||||
SetTransport(transport runtime.ClientTransport)
|
||||
}
|
||||
|
||||
/*
|
||||
GetService gets a single service object
|
||||
|
||||
Return a single Service object from datastore as a Singleton
|
||||
*/
|
||||
func (a *Client) GetService(params *GetServiceParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetServiceOK, error) {
|
||||
// TODO: Validate the params before sending
|
||||
if params == nil {
|
||||
params = NewGetServiceParams()
|
||||
}
|
||||
op := &runtime.ClientOperation{
|
||||
ID: "getService",
|
||||
Method: "GET",
|
||||
PathPattern: "/services/{serviceIdPath}",
|
||||
ProducesMediaTypes: []string{"application/json"},
|
||||
ConsumesMediaTypes: []string{"application/json"},
|
||||
Schemes: []string{"http"},
|
||||
Params: params,
|
||||
Reader: &GetServiceReader{formats: a.formats},
|
||||
AuthInfo: authInfo,
|
||||
Context: params.Context,
|
||||
Client: params.HTTPClient,
|
||||
}
|
||||
for _, opt := range opts {
|
||||
opt(op)
|
||||
}
|
||||
|
||||
result, err := a.transport.Submit(op)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
success, ok := result.(*GetServiceOK)
|
||||
if ok {
|
||||
return success, nil
|
||||
}
|
||||
// unexpected success response
|
||||
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
||||
msg := fmt.Sprintf("unexpected success response for getService: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||||
panic(msg)
|
||||
}
|
||||
|
||||
/*
|
||||
GetServices gets a list of services
|
||||
|
||||
Return a list of Services records from the datastore
|
||||
*/
|
||||
func (a *Client) GetServices(params *GetServicesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetServicesOK, error) {
|
||||
// TODO: Validate the params before sending
|
||||
if params == nil {
|
||||
params = NewGetServicesParams()
|
||||
}
|
||||
op := &runtime.ClientOperation{
|
||||
ID: "getServices",
|
||||
Method: "GET",
|
||||
PathPattern: "/services",
|
||||
ProducesMediaTypes: []string{"application/json"},
|
||||
ConsumesMediaTypes: []string{"application/json"},
|
||||
Schemes: []string{"http"},
|
||||
Params: params,
|
||||
Reader: &GetServicesReader{formats: a.formats},
|
||||
AuthInfo: authInfo,
|
||||
Context: params.Context,
|
||||
Client: params.HTTPClient,
|
||||
}
|
||||
for _, opt := range opts {
|
||||
opt(op)
|
||||
}
|
||||
|
||||
result, err := a.transport.Submit(op)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
success, ok := result.(*GetServicesOK)
|
||||
if ok {
|
||||
return success, nil
|
||||
}
|
||||
// unexpected success response
|
||||
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
||||
msg := fmt.Sprintf("unexpected success response for getServices: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||||
panic(msg)
|
||||
}
|
||||
|
||||
/*
|
||||
GetServicesObservable gets services in an observable array
|
||||
|
||||
Returns a Service retrieval in a observable array
|
||||
*/
|
||||
func (a *Client) GetServicesObservable(params *GetServicesObservableParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetServicesObservableOK, error) {
|
||||
// TODO: Validate the params before sending
|
||||
if params == nil {
|
||||
params = NewGetServicesObservableParams()
|
||||
}
|
||||
op := &runtime.ClientOperation{
|
||||
ID: "getServicesObservable",
|
||||
Method: "GET",
|
||||
PathPattern: "/services/observable",
|
||||
ProducesMediaTypes: []string{"application/json"},
|
||||
ConsumesMediaTypes: []string{"application/json"},
|
||||
Schemes: []string{"http"},
|
||||
Params: params,
|
||||
Reader: &GetServicesObservableReader{formats: a.formats},
|
||||
AuthInfo: authInfo,
|
||||
Context: params.Context,
|
||||
Client: params.HTTPClient,
|
||||
}
|
||||
for _, opt := range opts {
|
||||
opt(op)
|
||||
}
|
||||
|
||||
result, err := a.transport.Submit(op)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
success, ok := result.(*GetServicesObservableOK)
|
||||
if ok {
|
||||
return success, nil
|
||||
}
|
||||
// unexpected success response
|
||||
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
||||
msg := fmt.Sprintf("unexpected success response for getServicesObservable: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||||
panic(msg)
|
||||
}
|
||||
|
||||
/*
|
||||
PostServices creates new services
|
||||
|
||||
Create Services in Taxnexus
|
||||
*/
|
||||
func (a *Client) PostServices(params *PostServicesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PostServicesOK, error) {
|
||||
// TODO: Validate the params before sending
|
||||
if params == nil {
|
||||
params = NewPostServicesParams()
|
||||
}
|
||||
op := &runtime.ClientOperation{
|
||||
ID: "postServices",
|
||||
Method: "POST",
|
||||
PathPattern: "/services",
|
||||
ProducesMediaTypes: []string{"application/json"},
|
||||
ConsumesMediaTypes: []string{"application/json"},
|
||||
Schemes: []string{"http"},
|
||||
Params: params,
|
||||
Reader: &PostServicesReader{formats: a.formats},
|
||||
AuthInfo: authInfo,
|
||||
Context: params.Context,
|
||||
Client: params.HTTPClient,
|
||||
}
|
||||
for _, opt := range opts {
|
||||
opt(op)
|
||||
}
|
||||
|
||||
result, err := a.transport.Submit(op)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
success, ok := result.(*PostServicesOK)
|
||||
if ok {
|
||||
return success, nil
|
||||
}
|
||||
// unexpected success response
|
||||
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
||||
msg := fmt.Sprintf("unexpected success response for postServices: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||||
panic(msg)
|
||||
}
|
||||
|
||||
/*
|
||||
PutServices updates services
|
||||
|
||||
Update Services in Taxnexus
|
||||
*/
|
||||
func (a *Client) PutServices(params *PutServicesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PutServicesOK, error) {
|
||||
// TODO: Validate the params before sending
|
||||
if params == nil {
|
||||
params = NewPutServicesParams()
|
||||
}
|
||||
op := &runtime.ClientOperation{
|
||||
ID: "putServices",
|
||||
Method: "PUT",
|
||||
PathPattern: "/services",
|
||||
ProducesMediaTypes: []string{"application/json"},
|
||||
ConsumesMediaTypes: []string{"application/json"},
|
||||
Schemes: []string{"http"},
|
||||
Params: params,
|
||||
Reader: &PutServicesReader{formats: a.formats},
|
||||
AuthInfo: authInfo,
|
||||
Context: params.Context,
|
||||
Client: params.HTTPClient,
|
||||
}
|
||||
for _, opt := range opts {
|
||||
opt(op)
|
||||
}
|
||||
|
||||
result, err := a.transport.Submit(op)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
success, ok := result.(*PutServicesOK)
|
||||
if ok {
|
||||
return success, nil
|
||||
}
|
||||
// unexpected success response
|
||||
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
||||
msg := fmt.Sprintf("unexpected success response for putServices: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||||
panic(msg)
|
||||
}
|
||||
|
||||
// SetTransport changes the transport on the client
|
||||
func (a *Client) SetTransport(transport runtime.ClientTransport) {
|
||||
a.transport = transport
|
||||
}
|
|
@ -1,446 +0,0 @@
|
|||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
// (c) 2012-2020 by Taxnexus, Inc.
|
||||
// All rights reserved worldwide.
|
||||
// Proprietary product; unlicensed use is not allowed
|
||||
|
||||
package devops_models
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
// Editing this file might prove futile when you re-run the swagger generate command
|
||||
|
||||
import (
|
||||
"context"
|
||||
"encoding/json"
|
||||
|
||||
"github.com/go-openapi/errors"
|
||||
"github.com/go-openapi/strfmt"
|
||||
"github.com/go-openapi/swag"
|
||||
"github.com/go-openapi/validate"
|
||||
)
|
||||
|
||||
// Ingest A record of the Ingest of information into Taxnexus
|
||||
//
|
||||
// swagger:model Ingest
|
||||
type Ingest struct {
|
||||
|
||||
// Account ID
|
||||
// Required: true
|
||||
AccountID *string `json:"AccountID"`
|
||||
|
||||
// Rollup Tax Amount
|
||||
Amount float64 `json:"Amount,omitempty"`
|
||||
|
||||
// Backend ID
|
||||
BackendID string `json:"BackendID,omitempty"`
|
||||
|
||||
// Company ID
|
||||
CompanyID string `json:"CompanyID,omitempty"`
|
||||
|
||||
// Taxnexus User ID
|
||||
CreatedByID string `json:"CreatedByID,omitempty"`
|
||||
|
||||
// Date of Job Creation
|
||||
CreatedDate string `json:"CreatedDate,omitempty"`
|
||||
|
||||
// Ingest Description
|
||||
Description string `json:"Description,omitempty"`
|
||||
|
||||
// End Date
|
||||
EndDate string `json:"EndDate,omitempty"`
|
||||
|
||||
// Filename
|
||||
Filename string `json:"Filename,omitempty"`
|
||||
|
||||
// Record Id
|
||||
ID string `json:"ID,omitempty"`
|
||||
|
||||
// Ingest Date
|
||||
IngestDate string `json:"IngestDate,omitempty"`
|
||||
|
||||
// Ingest Failure Reason
|
||||
IngestFailureReason string `json:"IngestFailureReason,omitempty"`
|
||||
|
||||
// Ingest Type
|
||||
// Enum: [fabric internal suretax taxnexus-api]
|
||||
IngestType string `json:"IngestType,omitempty"`
|
||||
|
||||
// Invoice Count
|
||||
InvoiceCount int64 `json:"InvoiceCount,omitempty"`
|
||||
|
||||
// Job ID
|
||||
JobID string `json:"JobID,omitempty"`
|
||||
|
||||
// Taxnexus User ID
|
||||
LastModifiedByID string `json:"LastModifiedByID,omitempty"`
|
||||
|
||||
// Last Modified Date
|
||||
LastModifiedDate string `json:"LastModifiedDate,omitempty"`
|
||||
|
||||
// metrc last modified end
|
||||
MetrcLastModifiedEnd string `json:"MetrcLastModifiedEnd,omitempty"`
|
||||
|
||||
// metrc last modified start
|
||||
MetrcLastModifiedStart string `json:"MetrcLastModifiedStart,omitempty"`
|
||||
|
||||
// License
|
||||
MetrcLicense string `json:"MetrcLicense,omitempty"`
|
||||
|
||||
// metrc salesreceipt ID
|
||||
MetrcSalesreceiptID int64 `json:"MetrcSalesreceiptID,omitempty"`
|
||||
|
||||
// State Code
|
||||
MetrcState string `json:"MetrcState,omitempty"`
|
||||
|
||||
// Ingest Object Type
|
||||
// Required: true
|
||||
// Enum: [account cash-receipt contact invoice order po quote]
|
||||
ObjectType *string `json:"ObjectType"`
|
||||
|
||||
// PO Count
|
||||
POCount int64 `json:"POCount,omitempty"`
|
||||
|
||||
// Parent Foreign Key
|
||||
ParentFK string `json:"ParentFK,omitempty"`
|
||||
|
||||
// Period ID
|
||||
PeriodID string `json:"PeriodID,omitempty"`
|
||||
|
||||
// Post Failure Reason
|
||||
PostFalureReason string `json:"PostFalureReason,omitempty"`
|
||||
|
||||
// Rating Engine ID
|
||||
RatingEngineID string `json:"RatingEngineID,omitempty"`
|
||||
|
||||
// Source System Reference
|
||||
Ref string `json:"Ref,omitempty"`
|
||||
|
||||
// Rollup Revenue Base
|
||||
RevenueBase float64 `json:"RevenueBase,omitempty"`
|
||||
|
||||
// Rollup Revenue Net
|
||||
RevenueNet float64 `json:"RevenueNet,omitempty"`
|
||||
|
||||
// Rollup Revenue Not Taxable
|
||||
RevenueNotTaxable float64 `json:"RevenueNotTaxable,omitempty"`
|
||||
|
||||
// The Saga ID used to link log entries and transactions
|
||||
SagaID string `json:"SagaID,omitempty"`
|
||||
|
||||
// The type of Saga transaction being performed
|
||||
SagaType string `json:"SagaType,omitempty"`
|
||||
|
||||
// The source system that generated this job
|
||||
// Enum: [api fabric taxnexus telnexus]
|
||||
Source string `json:"Source,omitempty"`
|
||||
|
||||
// Start Date
|
||||
StartDate string `json:"StartDate,omitempty"`
|
||||
|
||||
// Ingest Status
|
||||
// Enum: [failed_accounting failed_existing failed_glpost failed_invoice failed_po ingested new posted queued rated rejected]
|
||||
Status string `json:"Status,omitempty"`
|
||||
|
||||
// Rollup Tax
|
||||
Tax float64 `json:"Tax,omitempty"`
|
||||
|
||||
// Rollup Tax On Tax
|
||||
TaxOnTax float64 `json:"TaxOnTax,omitempty"`
|
||||
|
||||
// Tax Transaction Count
|
||||
TaxTransactionCount int64 `json:"TaxTransactionCount,omitempty"`
|
||||
|
||||
// Template
|
||||
TemplateID string `json:"TemplateID,omitempty"`
|
||||
|
||||
// ID of the Tenant that owns this Object Instance
|
||||
TenantID string `json:"TenantID,omitempty"`
|
||||
|
||||
// Rollup Unit Base
|
||||
UnitBase int64 `json:"UnitBase,omitempty"`
|
||||
}
|
||||
|
||||
// Validate validates this ingest
|
||||
func (m *Ingest) Validate(formats strfmt.Registry) error {
|
||||
var res []error
|
||||
|
||||
if err := m.validateAccountID(formats); err != nil {
|
||||
res = append(res, err)
|
||||
}
|
||||
|
||||
if err := m.validateIngestType(formats); err != nil {
|
||||
res = append(res, err)
|
||||
}
|
||||
|
||||
if err := m.validateObjectType(formats); err != nil {
|
||||
res = append(res, err)
|
||||
}
|
||||
|
||||
if err := m.validateSource(formats); err != nil {
|
||||
res = append(res, err)
|
||||
}
|
||||
|
||||
if err := m.validateStatus(formats); err != nil {
|
||||
res = append(res, err)
|
||||
}
|
||||
|
||||
if len(res) > 0 {
|
||||
return errors.CompositeValidationError(res...)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *Ingest) validateAccountID(formats strfmt.Registry) error {
|
||||
|
||||
if err := validate.Required("AccountID", "body", m.AccountID); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
var ingestTypeIngestTypePropEnum []interface{}
|
||||
|
||||
func init() {
|
||||
var res []string
|
||||
if err := json.Unmarshal([]byte(`["fabric","internal","suretax","taxnexus-api"]`), &res); err != nil {
|
||||
panic(err)
|
||||
}
|
||||
for _, v := range res {
|
||||
ingestTypeIngestTypePropEnum = append(ingestTypeIngestTypePropEnum, v)
|
||||
}
|
||||
}
|
||||
|
||||
const (
|
||||
|
||||
// IngestIngestTypeFabric captures enum value "fabric"
|
||||
IngestIngestTypeFabric string = "fabric"
|
||||
|
||||
// IngestIngestTypeInternal captures enum value "internal"
|
||||
IngestIngestTypeInternal string = "internal"
|
||||
|
||||
// IngestIngestTypeSuretax captures enum value "suretax"
|
||||
IngestIngestTypeSuretax string = "suretax"
|
||||
|
||||
// IngestIngestTypeTaxnexusDashAPI captures enum value "taxnexus-api"
|
||||
IngestIngestTypeTaxnexusDashAPI string = "taxnexus-api"
|
||||
)
|
||||
|
||||
// prop value enum
|
||||
func (m *Ingest) validateIngestTypeEnum(path, location string, value string) error {
|
||||
if err := validate.EnumCase(path, location, value, ingestTypeIngestTypePropEnum, true); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *Ingest) validateIngestType(formats strfmt.Registry) error {
|
||||
if swag.IsZero(m.IngestType) { // not required
|
||||
return nil
|
||||
}
|
||||
|
||||
// value enum
|
||||
if err := m.validateIngestTypeEnum("IngestType", "body", m.IngestType); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
var ingestTypeObjectTypePropEnum []interface{}
|
||||
|
||||
func init() {
|
||||
var res []string
|
||||
if err := json.Unmarshal([]byte(`["account","cash-receipt","contact","invoice","order","po","quote"]`), &res); err != nil {
|
||||
panic(err)
|
||||
}
|
||||
for _, v := range res {
|
||||
ingestTypeObjectTypePropEnum = append(ingestTypeObjectTypePropEnum, v)
|
||||
}
|
||||
}
|
||||
|
||||
const (
|
||||
|
||||
// IngestObjectTypeAccount captures enum value "account"
|
||||
IngestObjectTypeAccount string = "account"
|
||||
|
||||
// IngestObjectTypeCashDashReceipt captures enum value "cash-receipt"
|
||||
IngestObjectTypeCashDashReceipt string = "cash-receipt"
|
||||
|
||||
// IngestObjectTypeContact captures enum value "contact"
|
||||
IngestObjectTypeContact string = "contact"
|
||||
|
||||
// IngestObjectTypeInvoice captures enum value "invoice"
|
||||
IngestObjectTypeInvoice string = "invoice"
|
||||
|
||||
// IngestObjectTypeOrder captures enum value "order"
|
||||
IngestObjectTypeOrder string = "order"
|
||||
|
||||
// IngestObjectTypePo captures enum value "po"
|
||||
IngestObjectTypePo string = "po"
|
||||
|
||||
// IngestObjectTypeQuote captures enum value "quote"
|
||||
IngestObjectTypeQuote string = "quote"
|
||||
)
|
||||
|
||||
// prop value enum
|
||||
func (m *Ingest) validateObjectTypeEnum(path, location string, value string) error {
|
||||
if err := validate.EnumCase(path, location, value, ingestTypeObjectTypePropEnum, true); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *Ingest) validateObjectType(formats strfmt.Registry) error {
|
||||
|
||||
if err := validate.Required("ObjectType", "body", m.ObjectType); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
// value enum
|
||||
if err := m.validateObjectTypeEnum("ObjectType", "body", *m.ObjectType); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
var ingestTypeSourcePropEnum []interface{}
|
||||
|
||||
func init() {
|
||||
var res []string
|
||||
if err := json.Unmarshal([]byte(`["api","fabric","taxnexus","telnexus"]`), &res); err != nil {
|
||||
panic(err)
|
||||
}
|
||||
for _, v := range res {
|
||||
ingestTypeSourcePropEnum = append(ingestTypeSourcePropEnum, v)
|
||||
}
|
||||
}
|
||||
|
||||
const (
|
||||
|
||||
// IngestSourceAPI captures enum value "api"
|
||||
IngestSourceAPI string = "api"
|
||||
|
||||
// IngestSourceFabric captures enum value "fabric"
|
||||
IngestSourceFabric string = "fabric"
|
||||
|
||||
// IngestSourceTaxnexus captures enum value "taxnexus"
|
||||
IngestSourceTaxnexus string = "taxnexus"
|
||||
|
||||
// IngestSourceTelnexus captures enum value "telnexus"
|
||||
IngestSourceTelnexus string = "telnexus"
|
||||
)
|
||||
|
||||
// prop value enum
|
||||
func (m *Ingest) validateSourceEnum(path, location string, value string) error {
|
||||
if err := validate.EnumCase(path, location, value, ingestTypeSourcePropEnum, true); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *Ingest) validateSource(formats strfmt.Registry) error {
|
||||
if swag.IsZero(m.Source) { // not required
|
||||
return nil
|
||||
}
|
||||
|
||||
// value enum
|
||||
if err := m.validateSourceEnum("Source", "body", m.Source); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
var ingestTypeStatusPropEnum []interface{}
|
||||
|
||||
func init() {
|
||||
var res []string
|
||||
if err := json.Unmarshal([]byte(`["failed_accounting","failed_existing","failed_glpost","failed_invoice","failed_po","ingested","new","posted","queued","rated","rejected"]`), &res); err != nil {
|
||||
panic(err)
|
||||
}
|
||||
for _, v := range res {
|
||||
ingestTypeStatusPropEnum = append(ingestTypeStatusPropEnum, v)
|
||||
}
|
||||
}
|
||||
|
||||
const (
|
||||
|
||||
// IngestStatusFailedAccounting captures enum value "failed_accounting"
|
||||
IngestStatusFailedAccounting string = "failed_accounting"
|
||||
|
||||
// IngestStatusFailedExisting captures enum value "failed_existing"
|
||||
IngestStatusFailedExisting string = "failed_existing"
|
||||
|
||||
// IngestStatusFailedGlpost captures enum value "failed_glpost"
|
||||
IngestStatusFailedGlpost string = "failed_glpost"
|
||||
|
||||
// IngestStatusFailedInvoice captures enum value "failed_invoice"
|
||||
IngestStatusFailedInvoice string = "failed_invoice"
|
||||
|
||||
// IngestStatusFailedPo captures enum value "failed_po"
|
||||
IngestStatusFailedPo string = "failed_po"
|
||||
|
||||
// IngestStatusIngested captures enum value "ingested"
|
||||
IngestStatusIngested string = "ingested"
|
||||
|
||||
// IngestStatusNew captures enum value "new"
|
||||
IngestStatusNew string = "new"
|
||||
|
||||
// IngestStatusPosted captures enum value "posted"
|
||||
IngestStatusPosted string = "posted"
|
||||
|
||||
// IngestStatusQueued captures enum value "queued"
|
||||
IngestStatusQueued string = "queued"
|
||||
|
||||
// IngestStatusRated captures enum value "rated"
|
||||
IngestStatusRated string = "rated"
|
||||
|
||||
// IngestStatusRejected captures enum value "rejected"
|
||||
IngestStatusRejected string = "rejected"
|
||||
)
|
||||
|
||||
// prop value enum
|
||||
func (m *Ingest) validateStatusEnum(path, location string, value string) error {
|
||||
if err := validate.EnumCase(path, location, value, ingestTypeStatusPropEnum, true); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *Ingest) validateStatus(formats strfmt.Registry) error {
|
||||
if swag.IsZero(m.Status) { // not required
|
||||
return nil
|
||||
}
|
||||
|
||||
// value enum
|
||||
if err := m.validateStatusEnum("Status", "body", m.Status); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// ContextValidate validates this ingest based on context it is used
|
||||
func (m *Ingest) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// MarshalBinary interface implementation
|
||||
func (m *Ingest) MarshalBinary() ([]byte, error) {
|
||||
if m == nil {
|
||||
return nil, nil
|
||||
}
|
||||
return swag.WriteJSON(m)
|
||||
}
|
||||
|
||||
// UnmarshalBinary interface implementation
|
||||
func (m *Ingest) UnmarshalBinary(b []byte) error {
|
||||
var res Ingest
|
||||
if err := swag.ReadJSON(b, &res); err != nil {
|
||||
return err
|
||||
}
|
||||
*m = res
|
||||
return nil
|
||||
}
|
|
@ -1,116 +0,0 @@
|
|||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
// (c) 2012-2020 by Taxnexus, Inc.
|
||||
// All rights reserved worldwide.
|
||||
// Proprietary product; unlicensed use is not allowed
|
||||
|
||||
package devops_models
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
// Editing this file might prove futile when you re-run the swagger generate command
|
||||
|
||||
import (
|
||||
"context"
|
||||
"strconv"
|
||||
|
||||
"github.com/go-openapi/errors"
|
||||
"github.com/go-openapi/strfmt"
|
||||
"github.com/go-openapi/swag"
|
||||
)
|
||||
|
||||
// IngestRequest ingest request
|
||||
//
|
||||
// swagger:model IngestRequest
|
||||
type IngestRequest struct {
|
||||
|
||||
// data
|
||||
Data []*Ingest `json:"Data"`
|
||||
}
|
||||
|
||||
// Validate validates this ingest request
|
||||
func (m *IngestRequest) Validate(formats strfmt.Registry) error {
|
||||
var res []error
|
||||
|
||||
if err := m.validateData(formats); err != nil {
|
||||
res = append(res, err)
|
||||
}
|
||||
|
||||
if len(res) > 0 {
|
||||
return errors.CompositeValidationError(res...)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *IngestRequest) validateData(formats strfmt.Registry) error {
|
||||
if swag.IsZero(m.Data) { // not required
|
||||
return nil
|
||||
}
|
||||
|
||||
for i := 0; i < len(m.Data); i++ {
|
||||
if swag.IsZero(m.Data[i]) { // not required
|
||||
continue
|
||||
}
|
||||
|
||||
if m.Data[i] != nil {
|
||||
if err := m.Data[i].Validate(formats); err != nil {
|
||||
if ve, ok := err.(*errors.Validation); ok {
|
||||
return ve.ValidateName("Data" + "." + strconv.Itoa(i))
|
||||
}
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// ContextValidate validate this ingest request based on the context it is used
|
||||
func (m *IngestRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
|
||||
var res []error
|
||||
|
||||
if err := m.contextValidateData(ctx, formats); err != nil {
|
||||
res = append(res, err)
|
||||
}
|
||||
|
||||
if len(res) > 0 {
|
||||
return errors.CompositeValidationError(res...)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *IngestRequest) contextValidateData(ctx context.Context, formats strfmt.Registry) error {
|
||||
|
||||
for i := 0; i < len(m.Data); i++ {
|
||||
|
||||
if m.Data[i] != nil {
|
||||
if err := m.Data[i].ContextValidate(ctx, formats); err != nil {
|
||||
if ve, ok := err.(*errors.Validation); ok {
|
||||
return ve.ValidateName("Data" + "." + strconv.Itoa(i))
|
||||
}
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// MarshalBinary interface implementation
|
||||
func (m *IngestRequest) MarshalBinary() ([]byte, error) {
|
||||
if m == nil {
|
||||
return nil, nil
|
||||
}
|
||||
return swag.WriteJSON(m)
|
||||
}
|
||||
|
||||
// UnmarshalBinary interface implementation
|
||||
func (m *IngestRequest) UnmarshalBinary(b []byte) error {
|
||||
var res IngestRequest
|
||||
if err := swag.ReadJSON(b, &res); err != nil {
|
||||
return err
|
||||
}
|
||||
*m = res
|
||||
return nil
|
||||
}
|
|
@ -1,158 +0,0 @@
|
|||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
// (c) 2012-2020 by Taxnexus, Inc.
|
||||
// All rights reserved worldwide.
|
||||
// Proprietary product; unlicensed use is not allowed
|
||||
|
||||
package devops_models
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
// Editing this file might prove futile when you re-run the swagger generate command
|
||||
|
||||
import (
|
||||
"context"
|
||||
"strconv"
|
||||
|
||||
"github.com/go-openapi/errors"
|
||||
"github.com/go-openapi/strfmt"
|
||||
"github.com/go-openapi/swag"
|
||||
)
|
||||
|
||||
// IngestResponse An array of Print-Ready ingest Objects
|
||||
//
|
||||
// swagger:model IngestResponse
|
||||
type IngestResponse struct {
|
||||
|
||||
// data
|
||||
Data []*Ingest `json:"Data"`
|
||||
|
||||
// meta
|
||||
Meta *ResponseMeta `json:"Meta,omitempty"`
|
||||
}
|
||||
|
||||
// Validate validates this ingest response
|
||||
func (m *IngestResponse) Validate(formats strfmt.Registry) error {
|
||||
var res []error
|
||||
|
||||
if err := m.validateData(formats); err != nil {
|
||||
res = append(res, err)
|
||||
}
|
||||
|
||||
if err := m.validateMeta(formats); err != nil {
|
||||
res = append(res, err)
|
||||
}
|
||||
|
||||
if len(res) > 0 {
|
||||
return errors.CompositeValidationError(res...)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *IngestResponse) validateData(formats strfmt.Registry) error {
|
||||
if swag.IsZero(m.Data) { // not required
|
||||
return nil
|
||||
}
|
||||
|
||||
for i := 0; i < len(m.Data); i++ {
|
||||
if swag.IsZero(m.Data[i]) { // not required
|
||||
continue
|
||||
}
|
||||
|
||||
if m.Data[i] != nil {
|
||||
if err := m.Data[i].Validate(formats); err != nil {
|
||||
if ve, ok := err.(*errors.Validation); ok {
|
||||
return ve.ValidateName("Data" + "." + strconv.Itoa(i))
|
||||
}
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *IngestResponse) validateMeta(formats strfmt.Registry) error {
|
||||
if swag.IsZero(m.Meta) { // not required
|
||||
return nil
|
||||
}
|
||||
|
||||
if m.Meta != nil {
|
||||
if err := m.Meta.Validate(formats); err != nil {
|
||||
if ve, ok := err.(*errors.Validation); ok {
|
||||
return ve.ValidateName("Meta")
|
||||
}
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// ContextValidate validate this ingest response based on the context it is used
|
||||
func (m *IngestResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
|
||||
var res []error
|
||||
|
||||
if err := m.contextValidateData(ctx, formats); err != nil {
|
||||
res = append(res, err)
|
||||
}
|
||||
|
||||
if err := m.contextValidateMeta(ctx, formats); err != nil {
|
||||
res = append(res, err)
|
||||
}
|
||||
|
||||
if len(res) > 0 {
|
||||
return errors.CompositeValidationError(res...)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *IngestResponse) contextValidateData(ctx context.Context, formats strfmt.Registry) error {
|
||||
|
||||
for i := 0; i < len(m.Data); i++ {
|
||||
|
||||
if m.Data[i] != nil {
|
||||
if err := m.Data[i].ContextValidate(ctx, formats); err != nil {
|
||||
if ve, ok := err.(*errors.Validation); ok {
|
||||
return ve.ValidateName("Data" + "." + strconv.Itoa(i))
|
||||
}
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *IngestResponse) contextValidateMeta(ctx context.Context, formats strfmt.Registry) error {
|
||||
|
||||
if m.Meta != nil {
|
||||
if err := m.Meta.ContextValidate(ctx, formats); err != nil {
|
||||
if ve, ok := err.(*errors.Validation); ok {
|
||||
return ve.ValidateName("Meta")
|
||||
}
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// MarshalBinary interface implementation
|
||||
func (m *IngestResponse) MarshalBinary() ([]byte, error) {
|
||||
if m == nil {
|
||||
return nil, nil
|
||||
}
|
||||
return swag.WriteJSON(m)
|
||||
}
|
||||
|
||||
// UnmarshalBinary interface implementation
|
||||
func (m *IngestResponse) UnmarshalBinary(b []byte) error {
|
||||
var res IngestResponse
|
||||
if err := swag.ReadJSON(b, &res); err != nil {
|
||||
return err
|
||||
}
|
||||
*m = res
|
||||
return nil
|
||||
}
|
|
@ -1,486 +0,0 @@
|
|||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
// (c) 2012-2020 by Taxnexus, Inc.
|
||||
// All rights reserved worldwide.
|
||||
// Proprietary product; unlicensed use is not allowed
|
||||
|
||||
package devops_models
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
// Editing this file might prove futile when you re-run the swagger generate command
|
||||
|
||||
import (
|
||||
"context"
|
||||
"encoding/json"
|
||||
|
||||
"github.com/go-openapi/errors"
|
||||
"github.com/go-openapi/strfmt"
|
||||
"github.com/go-openapi/swag"
|
||||
"github.com/go-openapi/validate"
|
||||
)
|
||||
|
||||
// Job job
|
||||
//
|
||||
// swagger:model Job
|
||||
type Job struct {
|
||||
|
||||
// Taxnexus Account Id
|
||||
// Required: true
|
||||
AccountID *string `json:"AccountID"`
|
||||
|
||||
// Taxnexus Backend ID
|
||||
BackendID string `json:"BackendID,omitempty"`
|
||||
|
||||
// Taxnexus Company ID
|
||||
CompanyID string `json:"CompanyID,omitempty"`
|
||||
|
||||
// Taxnexus Coordinate ID
|
||||
CoordinateID string `json:"CoordinateID,omitempty"`
|
||||
|
||||
// Taxnexus User ID
|
||||
CreatedByID string `json:"CreatedByID,omitempty"`
|
||||
|
||||
// Date of Job Creation
|
||||
CreatedDate string `json:"CreatedDate,omitempty"`
|
||||
|
||||
// The amount of time after the Start Time to perform one or more jobs
|
||||
// Required: true
|
||||
// Enum: [day document hour minute month quarter second week year]
|
||||
Duration *string `json:"Duration"`
|
||||
|
||||
// End Date/Time
|
||||
EndDate string `json:"EndDate,omitempty"`
|
||||
|
||||
// Error Reason
|
||||
ErrorReason string `json:"ErrorReason,omitempty"`
|
||||
|
||||
// Taxnexus Record Id of the Job record
|
||||
ID string `json:"ID,omitempty"`
|
||||
|
||||
// The time interval by which multiple jobs are executed within the Duration
|
||||
// Enum: [day each hour minute month quarter second week year]
|
||||
Interval string `json:"Interval,omitempty"`
|
||||
|
||||
// Job Date
|
||||
JobDate string `json:"JobDate,omitempty"`
|
||||
|
||||
// Last Modified By
|
||||
LastModifiedByID string `json:"LastModifiedByID,omitempty"`
|
||||
|
||||
// Last Modified Date
|
||||
LastModifiedDate string `json:"LastModifiedDate,omitempty"`
|
||||
|
||||
// The Month Number of the job
|
||||
Month int64 `json:"Month,omitempty"`
|
||||
|
||||
// Next Job
|
||||
NextJobID string `json:"NextJobID,omitempty"`
|
||||
|
||||
// The user ID that owns this job
|
||||
OwnerID string `json:"OwnerID,omitempty"`
|
||||
|
||||
// The parameters needed to process the job
|
||||
Parameters string `json:"Parameters,omitempty"`
|
||||
|
||||
// Period
|
||||
PeriodID string `json:"PeriodID,omitempty"`
|
||||
|
||||
// The Month Number of the job
|
||||
Quarter int64 `json:"Quarter,omitempty"`
|
||||
|
||||
// Rating Engine
|
||||
RatingEngineID string `json:"RatingEngineID,omitempty"`
|
||||
|
||||
// External Reference
|
||||
Ref string `json:"Ref,omitempty"`
|
||||
|
||||
// Reschedule?
|
||||
Reschedule bool `json:"Reschedule,omitempty"`
|
||||
|
||||
// Reschedule Interval
|
||||
RescheduleInterval int64 `json:"RescheduleInterval,omitempty"`
|
||||
|
||||
// The Saga ID used to link log entries and transactions
|
||||
SagaID string `json:"SagaID,omitempty"`
|
||||
|
||||
// The type of Saga transaction being performed
|
||||
// Required: true
|
||||
SagaType *string `json:"SagaType"`
|
||||
|
||||
// The Month Number of the job
|
||||
Semiannual int64 `json:"Semiannual,omitempty"`
|
||||
|
||||
// The source system that generated this job
|
||||
// Enum: [api fabric taxnexus telnexus]
|
||||
Source string `json:"Source,omitempty"`
|
||||
|
||||
// Start Date/Time
|
||||
StartDate string `json:"StartDate,omitempty"`
|
||||
|
||||
// Status
|
||||
// Enum: [active complete error new queued]
|
||||
Status string `json:"Status,omitempty"`
|
||||
|
||||
// The target system that executes this job
|
||||
// Enum: [api fabric taxnexus telnexus]
|
||||
Target string `json:"Target,omitempty"`
|
||||
|
||||
// ID of the Tenant that owns this Object Instance
|
||||
TenantID string `json:"TenantID,omitempty"`
|
||||
|
||||
// The Month Number of the job
|
||||
Year int64 `json:"Year,omitempty"`
|
||||
}
|
||||
|
||||
// Validate validates this job
|
||||
func (m *Job) Validate(formats strfmt.Registry) error {
|
||||
var res []error
|
||||
|
||||
if err := m.validateAccountID(formats); err != nil {
|
||||
res = append(res, err)
|
||||
}
|
||||
|
||||
if err := m.validateDuration(formats); err != nil {
|
||||
res = append(res, err)
|
||||
}
|
||||
|
||||
if err := m.validateInterval(formats); err != nil {
|
||||
res = append(res, err)
|
||||
}
|
||||
|
||||
if err := m.validateSagaType(formats); err != nil {
|
||||
res = append(res, err)
|
||||
}
|
||||
|
||||
if err := m.validateSource(formats); err != nil {
|
||||
res = append(res, err)
|
||||
}
|
||||
|
||||
if err := m.validateStatus(formats); err != nil {
|
||||
res = append(res, err)
|
||||
}
|
||||
|
||||
if err := m.validateTarget(formats); err != nil {
|
||||
res = append(res, err)
|
||||
}
|
||||
|
||||
if len(res) > 0 {
|
||||
return errors.CompositeValidationError(res...)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *Job) validateAccountID(formats strfmt.Registry) error {
|
||||
|
||||
if err := validate.Required("AccountID", "body", m.AccountID); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
var jobTypeDurationPropEnum []interface{}
|
||||
|
||||
func init() {
|
||||
var res []string
|
||||
if err := json.Unmarshal([]byte(`["day","document","hour","minute","month","quarter","second","week","year"]`), &res); err != nil {
|
||||
panic(err)
|
||||
}
|
||||
for _, v := range res {
|
||||
jobTypeDurationPropEnum = append(jobTypeDurationPropEnum, v)
|
||||
}
|
||||
}
|
||||
|
||||
const (
|
||||
|
||||
// JobDurationDay captures enum value "day"
|
||||
JobDurationDay string = "day"
|
||||
|
||||
// JobDurationDocument captures enum value "document"
|
||||
JobDurationDocument string = "document"
|
||||
|
||||
// JobDurationHour captures enum value "hour"
|
||||
JobDurationHour string = "hour"
|
||||
|
||||
// JobDurationMinute captures enum value "minute"
|
||||
JobDurationMinute string = "minute"
|
||||
|
||||
// JobDurationMonth captures enum value "month"
|
||||
JobDurationMonth string = "month"
|
||||
|
||||
// JobDurationQuarter captures enum value "quarter"
|
||||
JobDurationQuarter string = "quarter"
|
||||
|
||||
// JobDurationSecond captures enum value "second"
|
||||
JobDurationSecond string = "second"
|
||||
|
||||
// JobDurationWeek captures enum value "week"
|
||||
JobDurationWeek string = "week"
|
||||
|
||||
// JobDurationYear captures enum value "year"
|
||||
JobDurationYear string = "year"
|
||||
)
|
||||
|
||||
// prop value enum
|
||||
func (m *Job) validateDurationEnum(path, location string, value string) error {
|
||||
if err := validate.EnumCase(path, location, value, jobTypeDurationPropEnum, true); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *Job) validateDuration(formats strfmt.Registry) error {
|
||||
|
||||
if err := validate.Required("Duration", "body", m.Duration); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
// value enum
|
||||
if err := m.validateDurationEnum("Duration", "body", *m.Duration); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
var jobTypeIntervalPropEnum []interface{}
|
||||
|
||||
func init() {
|
||||
var res []string
|
||||
if err := json.Unmarshal([]byte(`["day","each","hour","minute","month","quarter","second","week","year"]`), &res); err != nil {
|
||||
panic(err)
|
||||
}
|
||||
for _, v := range res {
|
||||
jobTypeIntervalPropEnum = append(jobTypeIntervalPropEnum, v)
|
||||
}
|
||||
}
|
||||
|
||||
const (
|
||||
|
||||
// JobIntervalDay captures enum value "day"
|
||||
JobIntervalDay string = "day"
|
||||
|
||||
// JobIntervalEach captures enum value "each"
|
||||
JobIntervalEach string = "each"
|
||||
|
||||
// JobIntervalHour captures enum value "hour"
|
||||
JobIntervalHour string = "hour"
|
||||
|
||||
// JobIntervalMinute captures enum value "minute"
|
||||
JobIntervalMinute string = "minute"
|
||||
|
||||
// JobIntervalMonth captures enum value "month"
|
||||
JobIntervalMonth string = "month"
|
||||
|
||||
// JobIntervalQuarter captures enum value "quarter"
|
||||
JobIntervalQuarter string = "quarter"
|
||||
|
||||
// JobIntervalSecond captures enum value "second"
|
||||
JobIntervalSecond string = "second"
|
||||
|
||||
// JobIntervalWeek captures enum value "week"
|
||||
JobIntervalWeek string = "week"
|
||||
|
||||
// JobIntervalYear captures enum value "year"
|
||||
JobIntervalYear string = "year"
|
||||
)
|
||||
|
||||
// prop value enum
|
||||
func (m *Job) validateIntervalEnum(path, location string, value string) error {
|
||||
if err := validate.EnumCase(path, location, value, jobTypeIntervalPropEnum, true); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *Job) validateInterval(formats strfmt.Registry) error {
|
||||
if swag.IsZero(m.Interval) { // not required
|
||||
return nil
|
||||
}
|
||||
|
||||
// value enum
|
||||
if err := m.validateIntervalEnum("Interval", "body", m.Interval); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *Job) validateSagaType(formats strfmt.Registry) error {
|
||||
|
||||
if err := validate.Required("SagaType", "body", m.SagaType); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
var jobTypeSourcePropEnum []interface{}
|
||||
|
||||
func init() {
|
||||
var res []string
|
||||
if err := json.Unmarshal([]byte(`["api","fabric","taxnexus","telnexus"]`), &res); err != nil {
|
||||
panic(err)
|
||||
}
|
||||
for _, v := range res {
|
||||
jobTypeSourcePropEnum = append(jobTypeSourcePropEnum, v)
|
||||
}
|
||||
}
|
||||
|
||||
const (
|
||||
|
||||
// JobSourceAPI captures enum value "api"
|
||||
JobSourceAPI string = "api"
|
||||
|
||||
// JobSourceFabric captures enum value "fabric"
|
||||
JobSourceFabric string = "fabric"
|
||||
|
||||
// JobSourceTaxnexus captures enum value "taxnexus"
|
||||
JobSourceTaxnexus string = "taxnexus"
|
||||
|
||||
// JobSourceTelnexus captures enum value "telnexus"
|
||||
JobSourceTelnexus string = "telnexus"
|
||||
)
|
||||
|
||||
// prop value enum
|
||||
func (m *Job) validateSourceEnum(path, location string, value string) error {
|
||||
if err := validate.EnumCase(path, location, value, jobTypeSourcePropEnum, true); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *Job) validateSource(formats strfmt.Registry) error {
|
||||
if swag.IsZero(m.Source) { // not required
|
||||
return nil
|
||||
}
|
||||
|
||||
// value enum
|
||||
if err := m.validateSourceEnum("Source", "body", m.Source); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
var jobTypeStatusPropEnum []interface{}
|
||||
|
||||
func init() {
|
||||
var res []string
|
||||
if err := json.Unmarshal([]byte(`["active","complete","error","new","queued"]`), &res); err != nil {
|
||||
panic(err)
|
||||
}
|
||||
for _, v := range res {
|
||||
jobTypeStatusPropEnum = append(jobTypeStatusPropEnum, v)
|
||||
}
|
||||
}
|
||||
|
||||
const (
|
||||
|
||||
// JobStatusActive captures enum value "active"
|
||||
JobStatusActive string = "active"
|
||||
|
||||
// JobStatusComplete captures enum value "complete"
|
||||
JobStatusComplete string = "complete"
|
||||
|
||||
// JobStatusError captures enum value "error"
|
||||
JobStatusError string = "error"
|
||||
|
||||
// JobStatusNew captures enum value "new"
|
||||
JobStatusNew string = "new"
|
||||
|
||||
// JobStatusQueued captures enum value "queued"
|
||||
JobStatusQueued string = "queued"
|
||||
)
|
||||
|
||||
// prop value enum
|
||||
func (m *Job) validateStatusEnum(path, location string, value string) error {
|
||||
if err := validate.EnumCase(path, location, value, jobTypeStatusPropEnum, true); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *Job) validateStatus(formats strfmt.Registry) error {
|
||||
if swag.IsZero(m.Status) { // not required
|
||||
return nil
|
||||
}
|
||||
|
||||
// value enum
|
||||
if err := m.validateStatusEnum("Status", "body", m.Status); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
var jobTypeTargetPropEnum []interface{}
|
||||
|
||||
func init() {
|
||||
var res []string
|
||||
if err := json.Unmarshal([]byte(`["api","fabric","taxnexus","telnexus"]`), &res); err != nil {
|
||||
panic(err)
|
||||
}
|
||||
for _, v := range res {
|
||||
jobTypeTargetPropEnum = append(jobTypeTargetPropEnum, v)
|
||||
}
|
||||
}
|
||||
|
||||
const (
|
||||
|
||||
// JobTargetAPI captures enum value "api"
|
||||
JobTargetAPI string = "api"
|
||||
|
||||
// JobTargetFabric captures enum value "fabric"
|
||||
JobTargetFabric string = "fabric"
|
||||
|
||||
// JobTargetTaxnexus captures enum value "taxnexus"
|
||||
JobTargetTaxnexus string = "taxnexus"
|
||||
|
||||
// JobTargetTelnexus captures enum value "telnexus"
|
||||
JobTargetTelnexus string = "telnexus"
|
||||
)
|
||||
|
||||
// prop value enum
|
||||
func (m *Job) validateTargetEnum(path, location string, value string) error {
|
||||
if err := validate.EnumCase(path, location, value, jobTypeTargetPropEnum, true); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *Job) validateTarget(formats strfmt.Registry) error {
|
||||
if swag.IsZero(m.Target) { // not required
|
||||
return nil
|
||||
}
|
||||
|
||||
// value enum
|
||||
if err := m.validateTargetEnum("Target", "body", m.Target); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// ContextValidate validates this job based on context it is used
|
||||
func (m *Job) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// MarshalBinary interface implementation
|
||||
func (m *Job) MarshalBinary() ([]byte, error) {
|
||||
if m == nil {
|
||||
return nil, nil
|
||||
}
|
||||
return swag.WriteJSON(m)
|
||||
}
|
||||
|
||||
// UnmarshalBinary interface implementation
|
||||
func (m *Job) UnmarshalBinary(b []byte) error {
|
||||
var res Job
|
||||
if err := swag.ReadJSON(b, &res); err != nil {
|
||||
return err
|
||||
}
|
||||
*m = res
|
||||
return nil
|
||||
}
|
|
@ -1,116 +0,0 @@
|
|||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
// (c) 2012-2020 by Taxnexus, Inc.
|
||||
// All rights reserved worldwide.
|
||||
// Proprietary product; unlicensed use is not allowed
|
||||
|
||||
package devops_models
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
// Editing this file might prove futile when you re-run the swagger generate command
|
||||
|
||||
import (
|
||||
"context"
|
||||
"strconv"
|
||||
|
||||
"github.com/go-openapi/errors"
|
||||
"github.com/go-openapi/strfmt"
|
||||
"github.com/go-openapi/swag"
|
||||
)
|
||||
|
||||
// JobRequest job request
|
||||
//
|
||||
// swagger:model JobRequest
|
||||
type JobRequest struct {
|
||||
|
||||
// data
|
||||
Data []*Job `json:"Data"`
|
||||
}
|
||||
|
||||
// Validate validates this job request
|
||||
func (m *JobRequest) Validate(formats strfmt.Registry) error {
|
||||
var res []error
|
||||
|
||||
if err := m.validateData(formats); err != nil {
|
||||
res = append(res, err)
|
||||
}
|
||||
|
||||
if len(res) > 0 {
|
||||
return errors.CompositeValidationError(res...)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *JobRequest) validateData(formats strfmt.Registry) error {
|
||||
if swag.IsZero(m.Data) { // not required
|
||||
return nil
|
||||
}
|
||||
|
||||
for i := 0; i < len(m.Data); i++ {
|
||||
if swag.IsZero(m.Data[i]) { // not required
|
||||
continue
|
||||
}
|
||||
|
||||
if m.Data[i] != nil {
|
||||
if err := m.Data[i].Validate(formats); err != nil {
|
||||
if ve, ok := err.(*errors.Validation); ok {
|
||||
return ve.ValidateName("Data" + "." + strconv.Itoa(i))
|
||||
}
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// ContextValidate validate this job request based on the context it is used
|
||||
func (m *JobRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
|
||||
var res []error
|
||||
|
||||
if err := m.contextValidateData(ctx, formats); err != nil {
|
||||
res = append(res, err)
|
||||
}
|
||||
|
||||
if len(res) > 0 {
|
||||
return errors.CompositeValidationError(res...)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *JobRequest) contextValidateData(ctx context.Context, formats strfmt.Registry) error {
|
||||
|
||||
for i := 0; i < len(m.Data); i++ {
|
||||
|
||||
if m.Data[i] != nil {
|
||||
if err := m.Data[i].ContextValidate(ctx, formats); err != nil {
|
||||
if ve, ok := err.(*errors.Validation); ok {
|
||||
return ve.ValidateName("Data" + "." + strconv.Itoa(i))
|
||||
}
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// MarshalBinary interface implementation
|
||||
func (m *JobRequest) MarshalBinary() ([]byte, error) {
|
||||
if m == nil {
|
||||
return nil, nil
|
||||
}
|
||||
return swag.WriteJSON(m)
|
||||
}
|
||||
|
||||
// UnmarshalBinary interface implementation
|
||||
func (m *JobRequest) UnmarshalBinary(b []byte) error {
|
||||
var res JobRequest
|
||||
if err := swag.ReadJSON(b, &res); err != nil {
|
||||
return err
|
||||
}
|
||||
*m = res
|
||||
return nil
|
||||
}
|
|
@ -1,158 +0,0 @@
|
|||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
// (c) 2012-2020 by Taxnexus, Inc.
|
||||
// All rights reserved worldwide.
|
||||
// Proprietary product; unlicensed use is not allowed
|
||||
|
||||
package devops_models
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
// Editing this file might prove futile when you re-run the swagger generate command
|
||||
|
||||
import (
|
||||
"context"
|
||||
"strconv"
|
||||
|
||||
"github.com/go-openapi/errors"
|
||||
"github.com/go-openapi/strfmt"
|
||||
"github.com/go-openapi/swag"
|
||||
)
|
||||
|
||||
// JobResponse An array of Job Objects
|
||||
//
|
||||
// swagger:model JobResponse
|
||||
type JobResponse struct {
|
||||
|
||||
// data
|
||||
Data []*Job `json:"Data"`
|
||||
|
||||
// meta
|
||||
Meta *ResponseMeta `json:"Meta,omitempty"`
|
||||
}
|
||||
|
||||
// Validate validates this job response
|
||||
func (m *JobResponse) Validate(formats strfmt.Registry) error {
|
||||
var res []error
|
||||
|
||||
if err := m.validateData(formats); err != nil {
|
||||
res = append(res, err)
|
||||
}
|
||||
|
||||
if err := m.validateMeta(formats); err != nil {
|
||||
res = append(res, err)
|
||||
}
|
||||
|
||||
if len(res) > 0 {
|
||||
return errors.CompositeValidationError(res...)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *JobResponse) validateData(formats strfmt.Registry) error {
|
||||
if swag.IsZero(m.Data) { // not required
|
||||
return nil
|
||||
}
|
||||
|
||||
for i := 0; i < len(m.Data); i++ {
|
||||
if swag.IsZero(m.Data[i]) { // not required
|
||||
continue
|
||||
}
|
||||
|
||||
if m.Data[i] != nil {
|
||||
if err := m.Data[i].Validate(formats); err != nil {
|
||||
if ve, ok := err.(*errors.Validation); ok {
|
||||
return ve.ValidateName("Data" + "." + strconv.Itoa(i))
|
||||
}
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *JobResponse) validateMeta(formats strfmt.Registry) error {
|
||||
if swag.IsZero(m.Meta) { // not required
|
||||
return nil
|
||||
}
|
||||
|
||||
if m.Meta != nil {
|
||||
if err := m.Meta.Validate(formats); err != nil {
|
||||
if ve, ok := err.(*errors.Validation); ok {
|
||||
return ve.ValidateName("Meta")
|
||||
}
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// ContextValidate validate this job response based on the context it is used
|
||||
func (m *JobResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
|
||||
var res []error
|
||||
|
||||
if err := m.contextValidateData(ctx, formats); err != nil {
|
||||
res = append(res, err)
|
||||
}
|
||||
|
||||
if err := m.contextValidateMeta(ctx, formats); err != nil {
|
||||
res = append(res, err)
|
||||
}
|
||||
|
||||
if len(res) > 0 {
|
||||
return errors.CompositeValidationError(res...)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *JobResponse) contextValidateData(ctx context.Context, formats strfmt.Registry) error {
|
||||
|
||||
for i := 0; i < len(m.Data); i++ {
|
||||
|
||||
if m.Data[i] != nil {
|
||||
if err := m.Data[i].ContextValidate(ctx, formats); err != nil {
|
||||
if ve, ok := err.(*errors.Validation); ok {
|
||||
return ve.ValidateName("Data" + "." + strconv.Itoa(i))
|
||||
}
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *JobResponse) contextValidateMeta(ctx context.Context, formats strfmt.Registry) error {
|
||||
|
||||
if m.Meta != nil {
|
||||
if err := m.Meta.ContextValidate(ctx, formats); err != nil {
|
||||
if ve, ok := err.(*errors.Validation); ok {
|
||||
return ve.ValidateName("Meta")
|
||||
}
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// MarshalBinary interface implementation
|
||||
func (m *JobResponse) MarshalBinary() ([]byte, error) {
|
||||
if m == nil {
|
||||
return nil, nil
|
||||
}
|
||||
return swag.WriteJSON(m)
|
||||
}
|
||||
|
||||
// UnmarshalBinary interface implementation
|
||||
func (m *JobResponse) UnmarshalBinary(b []byte) error {
|
||||
var res JobResponse
|
||||
if err := swag.ReadJSON(b, &res); err != nil {
|
||||
return err
|
||||
}
|
||||
*m = res
|
||||
return nil
|
||||
}
|
|
@ -1,120 +0,0 @@
|
|||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
// (c) 2012-2020 by Taxnexus, Inc.
|
||||
// All rights reserved worldwide.
|
||||
// Proprietary product; unlicensed use is not allowed
|
||||
|
||||
package devops_models
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
// Editing this file might prove futile when you re-run the swagger generate command
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/go-openapi/strfmt"
|
||||
"github.com/go-openapi/swag"
|
||||
)
|
||||
|
||||
// Service service
|
||||
//
|
||||
// swagger:model Service
|
||||
type Service struct {
|
||||
|
||||
// Active?
|
||||
Active bool `json:"Active,omitempty"`
|
||||
|
||||
// Cluster
|
||||
ClusterID string `json:"ClusterID,omitempty"`
|
||||
|
||||
// Cluster IP
|
||||
ClusterIP string `json:"ClusterIP,omitempty"`
|
||||
|
||||
// Cluster URL
|
||||
ClusterURL string `json:"ClusterURL,omitempty"`
|
||||
|
||||
// Created By
|
||||
CreatedByID string `json:"CreatedByID,omitempty"`
|
||||
|
||||
// Created Date
|
||||
CreatedDate string `json:"CreatedDate,omitempty"`
|
||||
|
||||
// Environment
|
||||
Environment string `json:"Environment,omitempty"`
|
||||
|
||||
// External URL
|
||||
ExternalURL string `json:"ExternalURL,omitempty"`
|
||||
|
||||
// GELF Address
|
||||
GELFAddress string `json:"GELFAddress,omitempty"`
|
||||
|
||||
// Taxnexus Record Id
|
||||
ID string `json:"ID,omitempty"`
|
||||
|
||||
// Last Modified By
|
||||
LastModifiedByID string `json:"LastModifiedByID,omitempty"`
|
||||
|
||||
// Last Modified Date
|
||||
LastModifiedDate string `json:"LastModifiedDate,omitempty"`
|
||||
|
||||
// Network Alias
|
||||
NetworkAlias string `json:"NetworkAlias,omitempty"`
|
||||
|
||||
// OpenAPI Version
|
||||
OpenAPIVersion string `json:"OpenAPIVersion,omitempty"`
|
||||
|
||||
// Owner
|
||||
OwnerID string `json:"OwnerID,omitempty"`
|
||||
|
||||
// Port - External
|
||||
PortExternal string `json:"PortExternal,omitempty"`
|
||||
|
||||
// Port - Test
|
||||
PortTest string `json:"PortTest,omitempty"`
|
||||
|
||||
// Proxy Type
|
||||
ProxyType string `json:"ProxyType,omitempty"`
|
||||
|
||||
// Replicas
|
||||
Replicas int64 `json:"Replicas,omitempty"`
|
||||
|
||||
// Repo URL
|
||||
RepoURL string `json:"RepoURL,omitempty"`
|
||||
|
||||
// Service Name
|
||||
ServiceName string `json:"ServiceName,omitempty"`
|
||||
|
||||
// The ID of the tenant who owns this Database
|
||||
TenantID string `json:"TenantID,omitempty"`
|
||||
|
||||
// Version
|
||||
Version string `json:"Version,omitempty"`
|
||||
}
|
||||
|
||||
// Validate validates this service
|
||||
func (m *Service) Validate(formats strfmt.Registry) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// ContextValidate validates this service based on context it is used
|
||||
func (m *Service) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// MarshalBinary interface implementation
|
||||
func (m *Service) MarshalBinary() ([]byte, error) {
|
||||
if m == nil {
|
||||
return nil, nil
|
||||
}
|
||||
return swag.WriteJSON(m)
|
||||
}
|
||||
|
||||
// UnmarshalBinary interface implementation
|
||||
func (m *Service) UnmarshalBinary(b []byte) error {
|
||||
var res Service
|
||||
if err := swag.ReadJSON(b, &res); err != nil {
|
||||
return err
|
||||
}
|
||||
*m = res
|
||||
return nil
|
||||
}
|
|
@ -1,116 +0,0 @@
|
|||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
// (c) 2012-2020 by Taxnexus, Inc.
|
||||
// All rights reserved worldwide.
|
||||
// Proprietary product; unlicensed use is not allowed
|
||||
|
||||
package devops_models
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
// Editing this file might prove futile when you re-run the swagger generate command
|
||||
|
||||
import (
|
||||
"context"
|
||||
"strconv"
|
||||
|
||||
"github.com/go-openapi/errors"
|
||||
"github.com/go-openapi/strfmt"
|
||||
"github.com/go-openapi/swag"
|
||||
)
|
||||
|
||||
// ServiceRequest service request
|
||||
//
|
||||
// swagger:model ServiceRequest
|
||||
type ServiceRequest struct {
|
||||
|
||||
// data
|
||||
Data []*Service `json:"Data"`
|
||||
}
|
||||
|
||||
// Validate validates this service request
|
||||
func (m *ServiceRequest) Validate(formats strfmt.Registry) error {
|
||||
var res []error
|
||||
|
||||
if err := m.validateData(formats); err != nil {
|
||||
res = append(res, err)
|
||||
}
|
||||
|
||||
if len(res) > 0 {
|
||||
return errors.CompositeValidationError(res...)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *ServiceRequest) validateData(formats strfmt.Registry) error {
|
||||
if swag.IsZero(m.Data) { // not required
|
||||
return nil
|
||||
}
|
||||
|
||||
for i := 0; i < len(m.Data); i++ {
|
||||
if swag.IsZero(m.Data[i]) { // not required
|
||||
continue
|
||||
}
|
||||
|
||||
if m.Data[i] != nil {
|
||||
if err := m.Data[i].Validate(formats); err != nil {
|
||||
if ve, ok := err.(*errors.Validation); ok {
|
||||
return ve.ValidateName("Data" + "." + strconv.Itoa(i))
|
||||
}
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// ContextValidate validate this service request based on the context it is used
|
||||
func (m *ServiceRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
|
||||
var res []error
|
||||
|
||||
if err := m.contextValidateData(ctx, formats); err != nil {
|
||||
res = append(res, err)
|
||||
}
|
||||
|
||||
if len(res) > 0 {
|
||||
return errors.CompositeValidationError(res...)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *ServiceRequest) contextValidateData(ctx context.Context, formats strfmt.Registry) error {
|
||||
|
||||
for i := 0; i < len(m.Data); i++ {
|
||||
|
||||
if m.Data[i] != nil {
|
||||
if err := m.Data[i].ContextValidate(ctx, formats); err != nil {
|
||||
if ve, ok := err.(*errors.Validation); ok {
|
||||
return ve.ValidateName("Data" + "." + strconv.Itoa(i))
|
||||
}
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// MarshalBinary interface implementation
|
||||
func (m *ServiceRequest) MarshalBinary() ([]byte, error) {
|
||||
if m == nil {
|
||||
return nil, nil
|
||||
}
|
||||
return swag.WriteJSON(m)
|
||||
}
|
||||
|
||||
// UnmarshalBinary interface implementation
|
||||
func (m *ServiceRequest) UnmarshalBinary(b []byte) error {
|
||||
var res ServiceRequest
|
||||
if err := swag.ReadJSON(b, &res); err != nil {
|
||||
return err
|
||||
}
|
||||
*m = res
|
||||
return nil
|
||||
}
|
|
@ -1,158 +0,0 @@
|
|||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
// (c) 2012-2020 by Taxnexus, Inc.
|
||||
// All rights reserved worldwide.
|
||||
// Proprietary product; unlicensed use is not allowed
|
||||
|
||||
package devops_models
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
// Editing this file might prove futile when you re-run the swagger generate command
|
||||
|
||||
import (
|
||||
"context"
|
||||
"strconv"
|
||||
|
||||
"github.com/go-openapi/errors"
|
||||
"github.com/go-openapi/strfmt"
|
||||
"github.com/go-openapi/swag"
|
||||
)
|
||||
|
||||
// ServiceResponse An array of Service Objects
|
||||
//
|
||||
// swagger:model ServiceResponse
|
||||
type ServiceResponse struct {
|
||||
|
||||
// data
|
||||
Data []*Service `json:"Data"`
|
||||
|
||||
// meta
|
||||
Meta *ResponseMeta `json:"Meta,omitempty"`
|
||||
}
|
||||
|
||||
// Validate validates this service response
|
||||
func (m *ServiceResponse) Validate(formats strfmt.Registry) error {
|
||||
var res []error
|
||||
|
||||
if err := m.validateData(formats); err != nil {
|
||||
res = append(res, err)
|
||||
}
|
||||
|
||||
if err := m.validateMeta(formats); err != nil {
|
||||
res = append(res, err)
|
||||
}
|
||||
|
||||
if len(res) > 0 {
|
||||
return errors.CompositeValidationError(res...)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *ServiceResponse) validateData(formats strfmt.Registry) error {
|
||||
if swag.IsZero(m.Data) { // not required
|
||||
return nil
|
||||
}
|
||||
|
||||
for i := 0; i < len(m.Data); i++ {
|
||||
if swag.IsZero(m.Data[i]) { // not required
|
||||
continue
|
||||
}
|
||||
|
||||
if m.Data[i] != nil {
|
||||
if err := m.Data[i].Validate(formats); err != nil {
|
||||
if ve, ok := err.(*errors.Validation); ok {
|
||||
return ve.ValidateName("Data" + "." + strconv.Itoa(i))
|
||||
}
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *ServiceResponse) validateMeta(formats strfmt.Registry) error {
|
||||
if swag.IsZero(m.Meta) { // not required
|
||||
return nil
|
||||
}
|
||||
|
||||
if m.Meta != nil {
|
||||
if err := m.Meta.Validate(formats); err != nil {
|
||||
if ve, ok := err.(*errors.Validation); ok {
|
||||
return ve.ValidateName("Meta")
|
||||
}
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// ContextValidate validate this service response based on the context it is used
|
||||
func (m *ServiceResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
|
||||
var res []error
|
||||
|
||||
if err := m.contextValidateData(ctx, formats); err != nil {
|
||||
res = append(res, err)
|
||||
}
|
||||
|
||||
if err := m.contextValidateMeta(ctx, formats); err != nil {
|
||||
res = append(res, err)
|
||||
}
|
||||
|
||||
if len(res) > 0 {
|
||||
return errors.CompositeValidationError(res...)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *ServiceResponse) contextValidateData(ctx context.Context, formats strfmt.Registry) error {
|
||||
|
||||
for i := 0; i < len(m.Data); i++ {
|
||||
|
||||
if m.Data[i] != nil {
|
||||
if err := m.Data[i].ContextValidate(ctx, formats); err != nil {
|
||||
if ve, ok := err.(*errors.Validation); ok {
|
||||
return ve.ValidateName("Data" + "." + strconv.Itoa(i))
|
||||
}
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *ServiceResponse) contextValidateMeta(ctx context.Context, formats strfmt.Registry) error {
|
||||
|
||||
if m.Meta != nil {
|
||||
if err := m.Meta.ContextValidate(ctx, formats); err != nil {
|
||||
if ve, ok := err.(*errors.Validation); ok {
|
||||
return ve.ValidateName("Meta")
|
||||
}
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// MarshalBinary interface implementation
|
||||
func (m *ServiceResponse) MarshalBinary() ([]byte, error) {
|
||||
if m == nil {
|
||||
return nil, nil
|
||||
}
|
||||
return swag.WriteJSON(m)
|
||||
}
|
||||
|
||||
// UnmarshalBinary interface implementation
|
||||
func (m *ServiceResponse) UnmarshalBinary(b []byte) error {
|
||||
var res ServiceResponse
|
||||
if err := swag.ReadJSON(b, &res); err != nil {
|
||||
return err
|
||||
}
|
||||
*m = res
|
||||
return nil
|
||||
}
|
|
@ -32,9 +32,9 @@ func InitConfig(systemName string, initalLogLevel zapcore.Level) {
|
|||
sugar.Infof("app.InitConfig: 📥 %s", systemName)
|
||||
appViper.SetConfigType("yaml")
|
||||
appViper.SetConfigName(systemName)
|
||||
appViper.AddConfigPath("/etc/telnexus")
|
||||
appViper.AddConfigPath("/etc/kvision")
|
||||
appViper.SetEnvKeyReplacer(strings.NewReplacer(".", "_"))
|
||||
appViper.SetEnvPrefix("telnexus")
|
||||
appViper.SetEnvPrefix("kvision")
|
||||
appViper.AutomaticEnv() // read in environment variables that match
|
||||
err := appViper.ReadInConfig()
|
||||
if err != nil {
|
||||
|
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue