moved devops endpoints to members

v0.3.7 v0.3.7
Vernon Keenan 2023-04-07 18:00:15 +00:00
parent 9a96094d63
commit b37836a8f2
296 changed files with 9557 additions and 18950 deletions

View File

@ -6,8 +6,6 @@ swagger:
cp ../auth/swagger/auth-vernonkeenan.yaml ./swagger/external
cp ../crm/swagger/crm-vernonkeenan.yaml ./swagger
cp ../crm/swagger/crm-vernonkeenan.yaml ./swagger/external
cp ../devops/swagger/devops-vernonkeenan.yaml ./swagger
cp ../devops/swagger/devops-vernonkeenan.yaml ./swagger/external
cp ../stash/swagger/stash-vernonkeenan.yaml ./swagger
cp ../stash/swagger/stash-vernonkeenan.yaml ./swagger/external
cp ../sf-gate/swagger/sf-gate-vernonkeenan.yaml ./swagger
@ -59,25 +57,6 @@ swagger:
sed -i 's|crm.vernonkeenan.com:8080|gw.tnxs.net|g' ./swagger/external/crm-vernonkeenan.yaml
sed -i 's|"/v1"|"/vk/crm/v1"|g' ./swagger/external/crm-vernonkeenan.yaml
#
# generate devops client
#
mkdir api/devops
swagger generate client \
--log-output=./swagger/logs/generate-devops-client.log \
--copyright-file=./build/COPYRIGHT \
--name=devops \
--spec=./swagger/devops-vernonkeenan.yaml \
--target=./api/devops \
--client-package=devops-client \
--model-package=devops-models \
--principal=app.User
#
# update external devops client
#
sed -i 's|"http"|"https"|g' ./swagger/external/devops-vernonkeenan.yaml
sed -i 's|devops.vernonkeenan.com:8080|gw.tnxs.net|g' ./swagger/external/devops-vernonkeenan.yaml
sed -i 's|"/v1"|"/vk/devops/v1"|g' ./swagger/external/devops-vernonkeenan.yaml
#
# generate stash client
#
mkdir api/stash

View File

@ -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 cluster
// 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"
)
// NewGetClusterParams creates a new GetClusterParams 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 NewGetClusterParams() *GetClusterParams {
return &GetClusterParams{
timeout: cr.DefaultTimeout,
}
}
// NewGetClusterParamsWithTimeout creates a new GetClusterParams object
// with the ability to set a timeout on a request.
func NewGetClusterParamsWithTimeout(timeout time.Duration) *GetClusterParams {
return &GetClusterParams{
timeout: timeout,
}
}
// NewGetClusterParamsWithContext creates a new GetClusterParams object
// with the ability to set a context for a request.
func NewGetClusterParamsWithContext(ctx context.Context) *GetClusterParams {
return &GetClusterParams{
Context: ctx,
}
}
// NewGetClusterParamsWithHTTPClient creates a new GetClusterParams object
// with the ability to set a custom HTTPClient for a request.
func NewGetClusterParamsWithHTTPClient(client *http.Client) *GetClusterParams {
return &GetClusterParams{
HTTPClient: client,
}
}
/*
GetClusterParams contains all the parameters to send to the API endpoint
for the get cluster operation.
Typically these are written to a http.Request.
*/
type GetClusterParams struct {
/* ClusterIDPath.
Record Id of a Cluster
*/
ClusterIDPath string
timeout time.Duration
Context context.Context
HTTPClient *http.Client
}
// WithDefaults hydrates default values in the get cluster params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *GetClusterParams) WithDefaults() *GetClusterParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the get cluster params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *GetClusterParams) SetDefaults() {
// no default values defined for this parameter
}
// WithTimeout adds the timeout to the get cluster params
func (o *GetClusterParams) WithTimeout(timeout time.Duration) *GetClusterParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the get cluster params
func (o *GetClusterParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the get cluster params
func (o *GetClusterParams) WithContext(ctx context.Context) *GetClusterParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the get cluster params
func (o *GetClusterParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the get cluster params
func (o *GetClusterParams) WithHTTPClient(client *http.Client) *GetClusterParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the get cluster params
func (o *GetClusterParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WithClusterIDPath adds the clusterIDPath to the get cluster params
func (o *GetClusterParams) WithClusterIDPath(clusterIDPath string) *GetClusterParams {
o.SetClusterIDPath(clusterIDPath)
return o
}
// SetClusterIDPath adds the clusterIdPath to the get cluster params
func (o *GetClusterParams) SetClusterIDPath(clusterIDPath string) {
o.ClusterIDPath = clusterIDPath
}
// WriteToRequest writes these params to a swagger request
func (o *GetClusterParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
if err := r.SetTimeout(o.timeout); err != nil {
return err
}
var res []error
// path param clusterIdPath
if err := r.SetPathParam("clusterIdPath", o.ClusterIDPath); err != nil {
return err
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}

View File

@ -1,555 +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 cluster
// 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"
)
// GetClusterReader is a Reader for the GetCluster structure.
type GetClusterReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *GetClusterReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewGetClusterOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
case 401:
result := NewGetClusterUnauthorized()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 403:
result := NewGetClusterForbidden()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 404:
result := NewGetClusterNotFound()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 422:
result := NewGetClusterUnprocessableEntity()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 500:
result := NewGetClusterInternalServerError()
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())
}
}
// NewGetClusterOK creates a GetClusterOK with default headers values
func NewGetClusterOK() *GetClusterOK {
return &GetClusterOK{}
}
/*
GetClusterOK describes a response with status code 200, with default header values.
Single Cluster record response
*/
type GetClusterOK struct {
AccessControlAllowOrigin string
CacheControl string
Payload *devops_models.Cluster
}
// IsSuccess returns true when this get cluster o k response has a 2xx status code
func (o *GetClusterOK) IsSuccess() bool {
return true
}
// IsRedirect returns true when this get cluster o k response has a 3xx status code
func (o *GetClusterOK) IsRedirect() bool {
return false
}
// IsClientError returns true when this get cluster o k response has a 4xx status code
func (o *GetClusterOK) IsClientError() bool {
return false
}
// IsServerError returns true when this get cluster o k response has a 5xx status code
func (o *GetClusterOK) IsServerError() bool {
return false
}
// IsCode returns true when this get cluster o k response a status code equal to that given
func (o *GetClusterOK) IsCode(code int) bool {
return code == 200
}
// Code gets the status code for the get cluster o k response
func (o *GetClusterOK) Code() int {
return 200
}
func (o *GetClusterOK) Error() string {
return fmt.Sprintf("[GET /clusters/{clusterIdPath}][%d] getClusterOK %+v", 200, o.Payload)
}
func (o *GetClusterOK) String() string {
return fmt.Sprintf("[GET /clusters/{clusterIdPath}][%d] getClusterOK %+v", 200, o.Payload)
}
func (o *GetClusterOK) GetPayload() *devops_models.Cluster {
return o.Payload
}
func (o *GetClusterOK) 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.Cluster)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewGetClusterUnauthorized creates a GetClusterUnauthorized with default headers values
func NewGetClusterUnauthorized() *GetClusterUnauthorized {
return &GetClusterUnauthorized{}
}
/*
GetClusterUnauthorized describes a response with status code 401, with default header values.
Access Unauthorized, invalid API-KEY was used
*/
type GetClusterUnauthorized struct {
AccessControlAllowOrigin string
CacheControl string
Payload *devops_models.Error
}
// IsSuccess returns true when this get cluster unauthorized response has a 2xx status code
func (o *GetClusterUnauthorized) IsSuccess() bool {
return false
}
// IsRedirect returns true when this get cluster unauthorized response has a 3xx status code
func (o *GetClusterUnauthorized) IsRedirect() bool {
return false
}
// IsClientError returns true when this get cluster unauthorized response has a 4xx status code
func (o *GetClusterUnauthorized) IsClientError() bool {
return true
}
// IsServerError returns true when this get cluster unauthorized response has a 5xx status code
func (o *GetClusterUnauthorized) IsServerError() bool {
return false
}
// IsCode returns true when this get cluster unauthorized response a status code equal to that given
func (o *GetClusterUnauthorized) IsCode(code int) bool {
return code == 401
}
// Code gets the status code for the get cluster unauthorized response
func (o *GetClusterUnauthorized) Code() int {
return 401
}
func (o *GetClusterUnauthorized) Error() string {
return fmt.Sprintf("[GET /clusters/{clusterIdPath}][%d] getClusterUnauthorized %+v", 401, o.Payload)
}
func (o *GetClusterUnauthorized) String() string {
return fmt.Sprintf("[GET /clusters/{clusterIdPath}][%d] getClusterUnauthorized %+v", 401, o.Payload)
}
func (o *GetClusterUnauthorized) GetPayload() *devops_models.Error {
return o.Payload
}
func (o *GetClusterUnauthorized) 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
}
// NewGetClusterForbidden creates a GetClusterForbidden with default headers values
func NewGetClusterForbidden() *GetClusterForbidden {
return &GetClusterForbidden{}
}
/*
GetClusterForbidden describes a response with status code 403, with default header values.
Access forbidden, account lacks access
*/
type GetClusterForbidden struct {
AccessControlAllowOrigin string
Payload *devops_models.Error
}
// IsSuccess returns true when this get cluster forbidden response has a 2xx status code
func (o *GetClusterForbidden) IsSuccess() bool {
return false
}
// IsRedirect returns true when this get cluster forbidden response has a 3xx status code
func (o *GetClusterForbidden) IsRedirect() bool {
return false
}
// IsClientError returns true when this get cluster forbidden response has a 4xx status code
func (o *GetClusterForbidden) IsClientError() bool {
return true
}
// IsServerError returns true when this get cluster forbidden response has a 5xx status code
func (o *GetClusterForbidden) IsServerError() bool {
return false
}
// IsCode returns true when this get cluster forbidden response a status code equal to that given
func (o *GetClusterForbidden) IsCode(code int) bool {
return code == 403
}
// Code gets the status code for the get cluster forbidden response
func (o *GetClusterForbidden) Code() int {
return 403
}
func (o *GetClusterForbidden) Error() string {
return fmt.Sprintf("[GET /clusters/{clusterIdPath}][%d] getClusterForbidden %+v", 403, o.Payload)
}
func (o *GetClusterForbidden) String() string {
return fmt.Sprintf("[GET /clusters/{clusterIdPath}][%d] getClusterForbidden %+v", 403, o.Payload)
}
func (o *GetClusterForbidden) GetPayload() *devops_models.Error {
return o.Payload
}
func (o *GetClusterForbidden) 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
}
// NewGetClusterNotFound creates a GetClusterNotFound with default headers values
func NewGetClusterNotFound() *GetClusterNotFound {
return &GetClusterNotFound{}
}
/*
GetClusterNotFound describes a response with status code 404, with default header values.
Resource was not found
*/
type GetClusterNotFound struct {
AccessControlAllowOrigin string
Payload *devops_models.Error
}
// IsSuccess returns true when this get cluster not found response has a 2xx status code
func (o *GetClusterNotFound) IsSuccess() bool {
return false
}
// IsRedirect returns true when this get cluster not found response has a 3xx status code
func (o *GetClusterNotFound) IsRedirect() bool {
return false
}
// IsClientError returns true when this get cluster not found response has a 4xx status code
func (o *GetClusterNotFound) IsClientError() bool {
return true
}
// IsServerError returns true when this get cluster not found response has a 5xx status code
func (o *GetClusterNotFound) IsServerError() bool {
return false
}
// IsCode returns true when this get cluster not found response a status code equal to that given
func (o *GetClusterNotFound) IsCode(code int) bool {
return code == 404
}
// Code gets the status code for the get cluster not found response
func (o *GetClusterNotFound) Code() int {
return 404
}
func (o *GetClusterNotFound) Error() string {
return fmt.Sprintf("[GET /clusters/{clusterIdPath}][%d] getClusterNotFound %+v", 404, o.Payload)
}
func (o *GetClusterNotFound) String() string {
return fmt.Sprintf("[GET /clusters/{clusterIdPath}][%d] getClusterNotFound %+v", 404, o.Payload)
}
func (o *GetClusterNotFound) GetPayload() *devops_models.Error {
return o.Payload
}
func (o *GetClusterNotFound) 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
}
// NewGetClusterUnprocessableEntity creates a GetClusterUnprocessableEntity with default headers values
func NewGetClusterUnprocessableEntity() *GetClusterUnprocessableEntity {
return &GetClusterUnprocessableEntity{}
}
/*
GetClusterUnprocessableEntity describes a response with status code 422, with default header values.
Unprocessable Entity, likely a bad parameter
*/
type GetClusterUnprocessableEntity struct {
AccessControlAllowOrigin string
CacheControl string
Payload *devops_models.Error
}
// IsSuccess returns true when this get cluster unprocessable entity response has a 2xx status code
func (o *GetClusterUnprocessableEntity) IsSuccess() bool {
return false
}
// IsRedirect returns true when this get cluster unprocessable entity response has a 3xx status code
func (o *GetClusterUnprocessableEntity) IsRedirect() bool {
return false
}
// IsClientError returns true when this get cluster unprocessable entity response has a 4xx status code
func (o *GetClusterUnprocessableEntity) IsClientError() bool {
return true
}
// IsServerError returns true when this get cluster unprocessable entity response has a 5xx status code
func (o *GetClusterUnprocessableEntity) IsServerError() bool {
return false
}
// IsCode returns true when this get cluster unprocessable entity response a status code equal to that given
func (o *GetClusterUnprocessableEntity) IsCode(code int) bool {
return code == 422
}
// Code gets the status code for the get cluster unprocessable entity response
func (o *GetClusterUnprocessableEntity) Code() int {
return 422
}
func (o *GetClusterUnprocessableEntity) Error() string {
return fmt.Sprintf("[GET /clusters/{clusterIdPath}][%d] getClusterUnprocessableEntity %+v", 422, o.Payload)
}
func (o *GetClusterUnprocessableEntity) String() string {
return fmt.Sprintf("[GET /clusters/{clusterIdPath}][%d] getClusterUnprocessableEntity %+v", 422, o.Payload)
}
func (o *GetClusterUnprocessableEntity) GetPayload() *devops_models.Error {
return o.Payload
}
func (o *GetClusterUnprocessableEntity) 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
}
// NewGetClusterInternalServerError creates a GetClusterInternalServerError with default headers values
func NewGetClusterInternalServerError() *GetClusterInternalServerError {
return &GetClusterInternalServerError{}
}
/*
GetClusterInternalServerError describes a response with status code 500, with default header values.
Server Internal Error
*/
type GetClusterInternalServerError struct {
AccessControlAllowOrigin string
Payload *devops_models.Error
}
// IsSuccess returns true when this get cluster internal server error response has a 2xx status code
func (o *GetClusterInternalServerError) IsSuccess() bool {
return false
}
// IsRedirect returns true when this get cluster internal server error response has a 3xx status code
func (o *GetClusterInternalServerError) IsRedirect() bool {
return false
}
// IsClientError returns true when this get cluster internal server error response has a 4xx status code
func (o *GetClusterInternalServerError) IsClientError() bool {
return false
}
// IsServerError returns true when this get cluster internal server error response has a 5xx status code
func (o *GetClusterInternalServerError) IsServerError() bool {
return true
}
// IsCode returns true when this get cluster internal server error response a status code equal to that given
func (o *GetClusterInternalServerError) IsCode(code int) bool {
return code == 500
}
// Code gets the status code for the get cluster internal server error response
func (o *GetClusterInternalServerError) Code() int {
return 500
}
func (o *GetClusterInternalServerError) Error() string {
return fmt.Sprintf("[GET /clusters/{clusterIdPath}][%d] getClusterInternalServerError %+v", 500, o.Payload)
}
func (o *GetClusterInternalServerError) String() string {
return fmt.Sprintf("[GET /clusters/{clusterIdPath}][%d] getClusterInternalServerError %+v", 500, o.Payload)
}
func (o *GetClusterInternalServerError) GetPayload() *devops_models.Error {
return o.Payload
}
func (o *GetClusterInternalServerError) 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
}

View File

@ -1,132 +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 cluster
// 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"
)
// NewGetClustersObservableParams creates a new GetClustersObservableParams 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 NewGetClustersObservableParams() *GetClustersObservableParams {
return &GetClustersObservableParams{
timeout: cr.DefaultTimeout,
}
}
// NewGetClustersObservableParamsWithTimeout creates a new GetClustersObservableParams object
// with the ability to set a timeout on a request.
func NewGetClustersObservableParamsWithTimeout(timeout time.Duration) *GetClustersObservableParams {
return &GetClustersObservableParams{
timeout: timeout,
}
}
// NewGetClustersObservableParamsWithContext creates a new GetClustersObservableParams object
// with the ability to set a context for a request.
func NewGetClustersObservableParamsWithContext(ctx context.Context) *GetClustersObservableParams {
return &GetClustersObservableParams{
Context: ctx,
}
}
// NewGetClustersObservableParamsWithHTTPClient creates a new GetClustersObservableParams object
// with the ability to set a custom HTTPClient for a request.
func NewGetClustersObservableParamsWithHTTPClient(client *http.Client) *GetClustersObservableParams {
return &GetClustersObservableParams{
HTTPClient: client,
}
}
/*
GetClustersObservableParams contains all the parameters to send to the API endpoint
for the get clusters observable operation.
Typically these are written to a http.Request.
*/
type GetClustersObservableParams struct {
timeout time.Duration
Context context.Context
HTTPClient *http.Client
}
// WithDefaults hydrates default values in the get clusters observable params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *GetClustersObservableParams) WithDefaults() *GetClustersObservableParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the get clusters observable params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *GetClustersObservableParams) SetDefaults() {
// no default values defined for this parameter
}
// WithTimeout adds the timeout to the get clusters observable params
func (o *GetClustersObservableParams) WithTimeout(timeout time.Duration) *GetClustersObservableParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the get clusters observable params
func (o *GetClustersObservableParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the get clusters observable params
func (o *GetClustersObservableParams) WithContext(ctx context.Context) *GetClustersObservableParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the get clusters observable params
func (o *GetClustersObservableParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the get clusters observable params
func (o *GetClustersObservableParams) WithHTTPClient(client *http.Client) *GetClustersObservableParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the get clusters observable params
func (o *GetClustersObservableParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WriteToRequest writes these params to a swagger request
func (o *GetClustersObservableParams) 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
}

View File

@ -1,553 +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 cluster
// 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"
)
// GetClustersObservableReader is a Reader for the GetClustersObservable structure.
type GetClustersObservableReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *GetClustersObservableReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewGetClustersObservableOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
case 401:
result := NewGetClustersObservableUnauthorized()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 403:
result := NewGetClustersObservableForbidden()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 404:
result := NewGetClustersObservableNotFound()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 422:
result := NewGetClustersObservableUnprocessableEntity()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 500:
result := NewGetClustersObservableInternalServerError()
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())
}
}
// NewGetClustersObservableOK creates a GetClustersObservableOK with default headers values
func NewGetClustersObservableOK() *GetClustersObservableOK {
return &GetClustersObservableOK{}
}
/*
GetClustersObservableOK describes a response with status code 200, with default header values.
Single Cluster record response
*/
type GetClustersObservableOK struct {
AccessControlAllowOrigin string
CacheControl string
Payload []*devops_models.Cluster
}
// IsSuccess returns true when this get clusters observable o k response has a 2xx status code
func (o *GetClustersObservableOK) IsSuccess() bool {
return true
}
// IsRedirect returns true when this get clusters observable o k response has a 3xx status code
func (o *GetClustersObservableOK) IsRedirect() bool {
return false
}
// IsClientError returns true when this get clusters observable o k response has a 4xx status code
func (o *GetClustersObservableOK) IsClientError() bool {
return false
}
// IsServerError returns true when this get clusters observable o k response has a 5xx status code
func (o *GetClustersObservableOK) IsServerError() bool {
return false
}
// IsCode returns true when this get clusters observable o k response a status code equal to that given
func (o *GetClustersObservableOK) IsCode(code int) bool {
return code == 200
}
// Code gets the status code for the get clusters observable o k response
func (o *GetClustersObservableOK) Code() int {
return 200
}
func (o *GetClustersObservableOK) Error() string {
return fmt.Sprintf("[GET /clusters/observable][%d] getClustersObservableOK %+v", 200, o.Payload)
}
func (o *GetClustersObservableOK) String() string {
return fmt.Sprintf("[GET /clusters/observable][%d] getClustersObservableOK %+v", 200, o.Payload)
}
func (o *GetClustersObservableOK) GetPayload() []*devops_models.Cluster {
return o.Payload
}
func (o *GetClustersObservableOK) 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
}
// NewGetClustersObservableUnauthorized creates a GetClustersObservableUnauthorized with default headers values
func NewGetClustersObservableUnauthorized() *GetClustersObservableUnauthorized {
return &GetClustersObservableUnauthorized{}
}
/*
GetClustersObservableUnauthorized describes a response with status code 401, with default header values.
Access Unauthorized, invalid API-KEY was used
*/
type GetClustersObservableUnauthorized struct {
AccessControlAllowOrigin string
CacheControl string
Payload *devops_models.Error
}
// IsSuccess returns true when this get clusters observable unauthorized response has a 2xx status code
func (o *GetClustersObservableUnauthorized) IsSuccess() bool {
return false
}
// IsRedirect returns true when this get clusters observable unauthorized response has a 3xx status code
func (o *GetClustersObservableUnauthorized) IsRedirect() bool {
return false
}
// IsClientError returns true when this get clusters observable unauthorized response has a 4xx status code
func (o *GetClustersObservableUnauthorized) IsClientError() bool {
return true
}
// IsServerError returns true when this get clusters observable unauthorized response has a 5xx status code
func (o *GetClustersObservableUnauthorized) IsServerError() bool {
return false
}
// IsCode returns true when this get clusters observable unauthorized response a status code equal to that given
func (o *GetClustersObservableUnauthorized) IsCode(code int) bool {
return code == 401
}
// Code gets the status code for the get clusters observable unauthorized response
func (o *GetClustersObservableUnauthorized) Code() int {
return 401
}
func (o *GetClustersObservableUnauthorized) Error() string {
return fmt.Sprintf("[GET /clusters/observable][%d] getClustersObservableUnauthorized %+v", 401, o.Payload)
}
func (o *GetClustersObservableUnauthorized) String() string {
return fmt.Sprintf("[GET /clusters/observable][%d] getClustersObservableUnauthorized %+v", 401, o.Payload)
}
func (o *GetClustersObservableUnauthorized) GetPayload() *devops_models.Error {
return o.Payload
}
func (o *GetClustersObservableUnauthorized) 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
}
// NewGetClustersObservableForbidden creates a GetClustersObservableForbidden with default headers values
func NewGetClustersObservableForbidden() *GetClustersObservableForbidden {
return &GetClustersObservableForbidden{}
}
/*
GetClustersObservableForbidden describes a response with status code 403, with default header values.
Access forbidden, account lacks access
*/
type GetClustersObservableForbidden struct {
AccessControlAllowOrigin string
Payload *devops_models.Error
}
// IsSuccess returns true when this get clusters observable forbidden response has a 2xx status code
func (o *GetClustersObservableForbidden) IsSuccess() bool {
return false
}
// IsRedirect returns true when this get clusters observable forbidden response has a 3xx status code
func (o *GetClustersObservableForbidden) IsRedirect() bool {
return false
}
// IsClientError returns true when this get clusters observable forbidden response has a 4xx status code
func (o *GetClustersObservableForbidden) IsClientError() bool {
return true
}
// IsServerError returns true when this get clusters observable forbidden response has a 5xx status code
func (o *GetClustersObservableForbidden) IsServerError() bool {
return false
}
// IsCode returns true when this get clusters observable forbidden response a status code equal to that given
func (o *GetClustersObservableForbidden) IsCode(code int) bool {
return code == 403
}
// Code gets the status code for the get clusters observable forbidden response
func (o *GetClustersObservableForbidden) Code() int {
return 403
}
func (o *GetClustersObservableForbidden) Error() string {
return fmt.Sprintf("[GET /clusters/observable][%d] getClustersObservableForbidden %+v", 403, o.Payload)
}
func (o *GetClustersObservableForbidden) String() string {
return fmt.Sprintf("[GET /clusters/observable][%d] getClustersObservableForbidden %+v", 403, o.Payload)
}
func (o *GetClustersObservableForbidden) GetPayload() *devops_models.Error {
return o.Payload
}
func (o *GetClustersObservableForbidden) 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
}
// NewGetClustersObservableNotFound creates a GetClustersObservableNotFound with default headers values
func NewGetClustersObservableNotFound() *GetClustersObservableNotFound {
return &GetClustersObservableNotFound{}
}
/*
GetClustersObservableNotFound describes a response with status code 404, with default header values.
Resource was not found
*/
type GetClustersObservableNotFound struct {
AccessControlAllowOrigin string
Payload *devops_models.Error
}
// IsSuccess returns true when this get clusters observable not found response has a 2xx status code
func (o *GetClustersObservableNotFound) IsSuccess() bool {
return false
}
// IsRedirect returns true when this get clusters observable not found response has a 3xx status code
func (o *GetClustersObservableNotFound) IsRedirect() bool {
return false
}
// IsClientError returns true when this get clusters observable not found response has a 4xx status code
func (o *GetClustersObservableNotFound) IsClientError() bool {
return true
}
// IsServerError returns true when this get clusters observable not found response has a 5xx status code
func (o *GetClustersObservableNotFound) IsServerError() bool {
return false
}
// IsCode returns true when this get clusters observable not found response a status code equal to that given
func (o *GetClustersObservableNotFound) IsCode(code int) bool {
return code == 404
}
// Code gets the status code for the get clusters observable not found response
func (o *GetClustersObservableNotFound) Code() int {
return 404
}
func (o *GetClustersObservableNotFound) Error() string {
return fmt.Sprintf("[GET /clusters/observable][%d] getClustersObservableNotFound %+v", 404, o.Payload)
}
func (o *GetClustersObservableNotFound) String() string {
return fmt.Sprintf("[GET /clusters/observable][%d] getClustersObservableNotFound %+v", 404, o.Payload)
}
func (o *GetClustersObservableNotFound) GetPayload() *devops_models.Error {
return o.Payload
}
func (o *GetClustersObservableNotFound) 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
}
// NewGetClustersObservableUnprocessableEntity creates a GetClustersObservableUnprocessableEntity with default headers values
func NewGetClustersObservableUnprocessableEntity() *GetClustersObservableUnprocessableEntity {
return &GetClustersObservableUnprocessableEntity{}
}
/*
GetClustersObservableUnprocessableEntity describes a response with status code 422, with default header values.
Unprocessable Entity, likely a bad parameter
*/
type GetClustersObservableUnprocessableEntity struct {
AccessControlAllowOrigin string
CacheControl string
Payload *devops_models.Error
}
// IsSuccess returns true when this get clusters observable unprocessable entity response has a 2xx status code
func (o *GetClustersObservableUnprocessableEntity) IsSuccess() bool {
return false
}
// IsRedirect returns true when this get clusters observable unprocessable entity response has a 3xx status code
func (o *GetClustersObservableUnprocessableEntity) IsRedirect() bool {
return false
}
// IsClientError returns true when this get clusters observable unprocessable entity response has a 4xx status code
func (o *GetClustersObservableUnprocessableEntity) IsClientError() bool {
return true
}
// IsServerError returns true when this get clusters observable unprocessable entity response has a 5xx status code
func (o *GetClustersObservableUnprocessableEntity) IsServerError() bool {
return false
}
// IsCode returns true when this get clusters observable unprocessable entity response a status code equal to that given
func (o *GetClustersObservableUnprocessableEntity) IsCode(code int) bool {
return code == 422
}
// Code gets the status code for the get clusters observable unprocessable entity response
func (o *GetClustersObservableUnprocessableEntity) Code() int {
return 422
}
func (o *GetClustersObservableUnprocessableEntity) Error() string {
return fmt.Sprintf("[GET /clusters/observable][%d] getClustersObservableUnprocessableEntity %+v", 422, o.Payload)
}
func (o *GetClustersObservableUnprocessableEntity) String() string {
return fmt.Sprintf("[GET /clusters/observable][%d] getClustersObservableUnprocessableEntity %+v", 422, o.Payload)
}
func (o *GetClustersObservableUnprocessableEntity) GetPayload() *devops_models.Error {
return o.Payload
}
func (o *GetClustersObservableUnprocessableEntity) 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
}
// NewGetClustersObservableInternalServerError creates a GetClustersObservableInternalServerError with default headers values
func NewGetClustersObservableInternalServerError() *GetClustersObservableInternalServerError {
return &GetClustersObservableInternalServerError{}
}
/*
GetClustersObservableInternalServerError describes a response with status code 500, with default header values.
Server Internal Error
*/
type GetClustersObservableInternalServerError struct {
AccessControlAllowOrigin string
Payload *devops_models.Error
}
// IsSuccess returns true when this get clusters observable internal server error response has a 2xx status code
func (o *GetClustersObservableInternalServerError) IsSuccess() bool {
return false
}
// IsRedirect returns true when this get clusters observable internal server error response has a 3xx status code
func (o *GetClustersObservableInternalServerError) IsRedirect() bool {
return false
}
// IsClientError returns true when this get clusters observable internal server error response has a 4xx status code
func (o *GetClustersObservableInternalServerError) IsClientError() bool {
return false
}
// IsServerError returns true when this get clusters observable internal server error response has a 5xx status code
func (o *GetClustersObservableInternalServerError) IsServerError() bool {
return true
}
// IsCode returns true when this get clusters observable internal server error response a status code equal to that given
func (o *GetClustersObservableInternalServerError) IsCode(code int) bool {
return code == 500
}
// Code gets the status code for the get clusters observable internal server error response
func (o *GetClustersObservableInternalServerError) Code() int {
return 500
}
func (o *GetClustersObservableInternalServerError) Error() string {
return fmt.Sprintf("[GET /clusters/observable][%d] getClustersObservableInternalServerError %+v", 500, o.Payload)
}
func (o *GetClustersObservableInternalServerError) String() string {
return fmt.Sprintf("[GET /clusters/observable][%d] getClustersObservableInternalServerError %+v", 500, o.Payload)
}
func (o *GetClustersObservableInternalServerError) GetPayload() *devops_models.Error {
return o.Payload
}
func (o *GetClustersObservableInternalServerError) 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
}

View File

@ -1,132 +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"
)
// NewClusterOptionsParams creates a new ClusterOptionsParams 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 NewClusterOptionsParams() *ClusterOptionsParams {
return &ClusterOptionsParams{
timeout: cr.DefaultTimeout,
}
}
// NewClusterOptionsParamsWithTimeout creates a new ClusterOptionsParams object
// with the ability to set a timeout on a request.
func NewClusterOptionsParamsWithTimeout(timeout time.Duration) *ClusterOptionsParams {
return &ClusterOptionsParams{
timeout: timeout,
}
}
// NewClusterOptionsParamsWithContext creates a new ClusterOptionsParams object
// with the ability to set a context for a request.
func NewClusterOptionsParamsWithContext(ctx context.Context) *ClusterOptionsParams {
return &ClusterOptionsParams{
Context: ctx,
}
}
// NewClusterOptionsParamsWithHTTPClient creates a new ClusterOptionsParams object
// with the ability to set a custom HTTPClient for a request.
func NewClusterOptionsParamsWithHTTPClient(client *http.Client) *ClusterOptionsParams {
return &ClusterOptionsParams{
HTTPClient: client,
}
}
/*
ClusterOptionsParams contains all the parameters to send to the API endpoint
for the cluster options operation.
Typically these are written to a http.Request.
*/
type ClusterOptionsParams struct {
timeout time.Duration
Context context.Context
HTTPClient *http.Client
}
// WithDefaults hydrates default values in the cluster options params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *ClusterOptionsParams) WithDefaults() *ClusterOptionsParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the cluster options params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *ClusterOptionsParams) SetDefaults() {
// no default values defined for this parameter
}
// WithTimeout adds the timeout to the cluster options params
func (o *ClusterOptionsParams) WithTimeout(timeout time.Duration) *ClusterOptionsParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the cluster options params
func (o *ClusterOptionsParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the cluster options params
func (o *ClusterOptionsParams) WithContext(ctx context.Context) *ClusterOptionsParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the cluster options params
func (o *ClusterOptionsParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the cluster options params
func (o *ClusterOptionsParams) WithHTTPClient(client *http.Client) *ClusterOptionsParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the cluster options params
func (o *ClusterOptionsParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WriteToRequest writes these params to a swagger request
func (o *ClusterOptionsParams) 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
}

View File

@ -1,148 +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"
)
// ClusterOptionsReader is a Reader for the ClusterOptions structure.
type ClusterOptionsReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *ClusterOptionsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewClusterOptionsOK()
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())
}
}
// NewClusterOptionsOK creates a ClusterOptionsOK with default headers values
func NewClusterOptionsOK() *ClusterOptionsOK {
return &ClusterOptionsOK{}
}
/*
ClusterOptionsOK describes a response with status code 200, with default header values.
CORS OPTIONS response
*/
type ClusterOptionsOK struct {
AccessControlAllowCredentials string
AccessControlAllowHeaders string
AccessControlAllowMethods string
AccessControlAllowOrigin string
AccessControlExposeHeaders string
AccessControlMaxAge string
CacheControl string
}
// IsSuccess returns true when this cluster options o k response has a 2xx status code
func (o *ClusterOptionsOK) IsSuccess() bool {
return true
}
// IsRedirect returns true when this cluster options o k response has a 3xx status code
func (o *ClusterOptionsOK) IsRedirect() bool {
return false
}
// IsClientError returns true when this cluster options o k response has a 4xx status code
func (o *ClusterOptionsOK) IsClientError() bool {
return false
}
// IsServerError returns true when this cluster options o k response has a 5xx status code
func (o *ClusterOptionsOK) IsServerError() bool {
return false
}
// IsCode returns true when this cluster options o k response a status code equal to that given
func (o *ClusterOptionsOK) IsCode(code int) bool {
return code == 200
}
// Code gets the status code for the cluster options o k response
func (o *ClusterOptionsOK) Code() int {
return 200
}
func (o *ClusterOptionsOK) Error() string {
return fmt.Sprintf("[OPTIONS /clusters/observable][%d] clusterOptionsOK ", 200)
}
func (o *ClusterOptionsOK) String() string {
return fmt.Sprintf("[OPTIONS /clusters/observable][%d] clusterOptionsOK ", 200)
}
func (o *ClusterOptionsOK) 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
}

View File

@ -1,132 +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"
)
// NewClustersOptionsParams creates a new ClustersOptionsParams 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 NewClustersOptionsParams() *ClustersOptionsParams {
return &ClustersOptionsParams{
timeout: cr.DefaultTimeout,
}
}
// NewClustersOptionsParamsWithTimeout creates a new ClustersOptionsParams object
// with the ability to set a timeout on a request.
func NewClustersOptionsParamsWithTimeout(timeout time.Duration) *ClustersOptionsParams {
return &ClustersOptionsParams{
timeout: timeout,
}
}
// NewClustersOptionsParamsWithContext creates a new ClustersOptionsParams object
// with the ability to set a context for a request.
func NewClustersOptionsParamsWithContext(ctx context.Context) *ClustersOptionsParams {
return &ClustersOptionsParams{
Context: ctx,
}
}
// NewClustersOptionsParamsWithHTTPClient creates a new ClustersOptionsParams object
// with the ability to set a custom HTTPClient for a request.
func NewClustersOptionsParamsWithHTTPClient(client *http.Client) *ClustersOptionsParams {
return &ClustersOptionsParams{
HTTPClient: client,
}
}
/*
ClustersOptionsParams contains all the parameters to send to the API endpoint
for the clusters options operation.
Typically these are written to a http.Request.
*/
type ClustersOptionsParams struct {
timeout time.Duration
Context context.Context
HTTPClient *http.Client
}
// WithDefaults hydrates default values in the clusters options params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *ClustersOptionsParams) WithDefaults() *ClustersOptionsParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the clusters options params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *ClustersOptionsParams) SetDefaults() {
// no default values defined for this parameter
}
// WithTimeout adds the timeout to the clusters options params
func (o *ClustersOptionsParams) WithTimeout(timeout time.Duration) *ClustersOptionsParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the clusters options params
func (o *ClustersOptionsParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the clusters options params
func (o *ClustersOptionsParams) WithContext(ctx context.Context) *ClustersOptionsParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the clusters options params
func (o *ClustersOptionsParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the clusters options params
func (o *ClustersOptionsParams) WithHTTPClient(client *http.Client) *ClustersOptionsParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the clusters options params
func (o *ClustersOptionsParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WriteToRequest writes these params to a swagger request
func (o *ClustersOptionsParams) 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
}

View File

@ -1,148 +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"
)
// ClustersOptionsReader is a Reader for the ClustersOptions structure.
type ClustersOptionsReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *ClustersOptionsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewClustersOptionsOK()
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())
}
}
// NewClustersOptionsOK creates a ClustersOptionsOK with default headers values
func NewClustersOptionsOK() *ClustersOptionsOK {
return &ClustersOptionsOK{}
}
/*
ClustersOptionsOK describes a response with status code 200, with default header values.
CORS OPTIONS response
*/
type ClustersOptionsOK struct {
AccessControlAllowCredentials string
AccessControlAllowHeaders string
AccessControlAllowMethods string
AccessControlAllowOrigin string
AccessControlExposeHeaders string
AccessControlMaxAge string
CacheControl string
}
// IsSuccess returns true when this clusters options o k response has a 2xx status code
func (o *ClustersOptionsOK) IsSuccess() bool {
return true
}
// IsRedirect returns true when this clusters options o k response has a 3xx status code
func (o *ClustersOptionsOK) IsRedirect() bool {
return false
}
// IsClientError returns true when this clusters options o k response has a 4xx status code
func (o *ClustersOptionsOK) IsClientError() bool {
return false
}
// IsServerError returns true when this clusters options o k response has a 5xx status code
func (o *ClustersOptionsOK) IsServerError() bool {
return false
}
// IsCode returns true when this clusters options o k response a status code equal to that given
func (o *ClustersOptionsOK) IsCode(code int) bool {
return code == 200
}
// Code gets the status code for the clusters options o k response
func (o *ClustersOptionsOK) Code() int {
return 200
}
func (o *ClustersOptionsOK) Error() string {
return fmt.Sprintf("[OPTIONS /clusters][%d] clustersOptionsOK ", 200)
}
func (o *ClustersOptionsOK) String() string {
return fmt.Sprintf("[OPTIONS /clusters][%d] clustersOptionsOK ", 200)
}
func (o *ClustersOptionsOK) 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
}

View File

@ -1,443 +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"
)
// New creates a new cors API client.
func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService {
return &Client{transport: transport, formats: formats}
}
/*
Client for cors 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 {
ClusterOptions(params *ClusterOptionsParams, opts ...ClientOption) (*ClusterOptionsOK, error)
ClustersOptions(params *ClustersOptionsParams, opts ...ClientOption) (*ClustersOptionsOK, error)
DatabaseOptions(params *DatabaseOptionsParams, opts ...ClientOption) (*DatabaseOptionsOK, error)
DatabasesOptions(params *DatabasesOptionsParams, opts ...ClientOption) (*DatabasesOptionsOK, error)
TemplateOptions(params *TemplateOptionsParams, opts ...ClientOption) (*TemplateOptionsOK, error)
TemplatesOptions(params *TemplatesOptionsParams, opts ...ClientOption) (*TemplatesOptionsOK, error)
TenantOptions(params *TenantOptionsParams, opts ...ClientOption) (*TenantOptionsOK, error)
TenantsOptions(params *TenantsOptionsParams, opts ...ClientOption) (*TenantsOptionsOK, error)
UserOptions(params *UserOptionsParams, opts ...ClientOption) (*UserOptionsOK, error)
UsersOptions(params *UsersOptionsParams, opts ...ClientOption) (*UsersOptionsOK, error)
SetTransport(transport runtime.ClientTransport)
}
/*
ClusterOptions CORS support
*/
func (a *Client) ClusterOptions(params *ClusterOptionsParams, opts ...ClientOption) (*ClusterOptionsOK, error) {
// TODO: Validate the params before sending
if params == nil {
params = NewClusterOptionsParams()
}
op := &runtime.ClientOperation{
ID: "clusterOptions",
Method: "OPTIONS",
PathPattern: "/clusters/observable",
ProducesMediaTypes: []string{"application/json"},
ConsumesMediaTypes: []string{"application/json"},
Schemes: []string{"http"},
Params: params,
Reader: &ClusterOptionsReader{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.(*ClusterOptionsOK)
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 clusterOptions: API contract not enforced by server. Client expected to get an error, but got: %T", result)
panic(msg)
}
/*
ClustersOptions CORS support
*/
func (a *Client) ClustersOptions(params *ClustersOptionsParams, opts ...ClientOption) (*ClustersOptionsOK, error) {
// TODO: Validate the params before sending
if params == nil {
params = NewClustersOptionsParams()
}
op := &runtime.ClientOperation{
ID: "clustersOptions",
Method: "OPTIONS",
PathPattern: "/clusters",
ProducesMediaTypes: []string{"application/json"},
ConsumesMediaTypes: []string{"application/json"},
Schemes: []string{"http"},
Params: params,
Reader: &ClustersOptionsReader{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.(*ClustersOptionsOK)
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 clustersOptions: API contract not enforced by server. Client expected to get an error, but got: %T", result)
panic(msg)
}
/*
DatabaseOptions CORS support
*/
func (a *Client) DatabaseOptions(params *DatabaseOptionsParams, opts ...ClientOption) (*DatabaseOptionsOK, error) {
// TODO: Validate the params before sending
if params == nil {
params = NewDatabaseOptionsParams()
}
op := &runtime.ClientOperation{
ID: "databaseOptions",
Method: "OPTIONS",
PathPattern: "/databases/observable",
ProducesMediaTypes: []string{"application/json"},
ConsumesMediaTypes: []string{"application/json"},
Schemes: []string{"http"},
Params: params,
Reader: &DatabaseOptionsReader{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.(*DatabaseOptionsOK)
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 databaseOptions: API contract not enforced by server. Client expected to get an error, but got: %T", result)
panic(msg)
}
/*
DatabasesOptions CORS support
*/
func (a *Client) DatabasesOptions(params *DatabasesOptionsParams, opts ...ClientOption) (*DatabasesOptionsOK, error) {
// TODO: Validate the params before sending
if params == nil {
params = NewDatabasesOptionsParams()
}
op := &runtime.ClientOperation{
ID: "databasesOptions",
Method: "OPTIONS",
PathPattern: "/databases",
ProducesMediaTypes: []string{"application/json"},
ConsumesMediaTypes: []string{"application/json"},
Schemes: []string{"http"},
Params: params,
Reader: &DatabasesOptionsReader{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.(*DatabasesOptionsOK)
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 databasesOptions: API contract not enforced by server. Client expected to get an error, but got: %T", result)
panic(msg)
}
/*
TemplateOptions CORS support
*/
func (a *Client) TemplateOptions(params *TemplateOptionsParams, opts ...ClientOption) (*TemplateOptionsOK, error) {
// TODO: Validate the params before sending
if params == nil {
params = NewTemplateOptionsParams()
}
op := &runtime.ClientOperation{
ID: "templateOptions",
Method: "OPTIONS",
PathPattern: "/templates/observable",
ProducesMediaTypes: []string{"application/json"},
ConsumesMediaTypes: []string{"application/json"},
Schemes: []string{"http"},
Params: params,
Reader: &TemplateOptionsReader{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.(*TemplateOptionsOK)
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 templateOptions: API contract not enforced by server. Client expected to get an error, but got: %T", result)
panic(msg)
}
/*
TemplatesOptions CORS support
*/
func (a *Client) TemplatesOptions(params *TemplatesOptionsParams, opts ...ClientOption) (*TemplatesOptionsOK, error) {
// TODO: Validate the params before sending
if params == nil {
params = NewTemplatesOptionsParams()
}
op := &runtime.ClientOperation{
ID: "templatesOptions",
Method: "OPTIONS",
PathPattern: "/templates",
ProducesMediaTypes: []string{"application/json"},
ConsumesMediaTypes: []string{"application/json"},
Schemes: []string{"http"},
Params: params,
Reader: &TemplatesOptionsReader{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.(*TemplatesOptionsOK)
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 templatesOptions: API contract not enforced by server. Client expected to get an error, but got: %T", result)
panic(msg)
}
/*
TenantOptions CORS support
*/
func (a *Client) TenantOptions(params *TenantOptionsParams, opts ...ClientOption) (*TenantOptionsOK, error) {
// TODO: Validate the params before sending
if params == nil {
params = NewTenantOptionsParams()
}
op := &runtime.ClientOperation{
ID: "tenantOptions",
Method: "OPTIONS",
PathPattern: "/tenants/observable",
ProducesMediaTypes: []string{"application/json"},
ConsumesMediaTypes: []string{"application/json"},
Schemes: []string{"http"},
Params: params,
Reader: &TenantOptionsReader{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.(*TenantOptionsOK)
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 tenantOptions: API contract not enforced by server. Client expected to get an error, but got: %T", result)
panic(msg)
}
/*
TenantsOptions CORS support
*/
func (a *Client) TenantsOptions(params *TenantsOptionsParams, opts ...ClientOption) (*TenantsOptionsOK, error) {
// TODO: Validate the params before sending
if params == nil {
params = NewTenantsOptionsParams()
}
op := &runtime.ClientOperation{
ID: "tenantsOptions",
Method: "OPTIONS",
PathPattern: "/tenants",
ProducesMediaTypes: []string{"application/json"},
ConsumesMediaTypes: []string{"application/json"},
Schemes: []string{"http"},
Params: params,
Reader: &TenantsOptionsReader{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.(*TenantsOptionsOK)
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 tenantsOptions: API contract not enforced by server. Client expected to get an error, but got: %T", result)
panic(msg)
}
/*
UserOptions CORS support
*/
func (a *Client) UserOptions(params *UserOptionsParams, opts ...ClientOption) (*UserOptionsOK, error) {
// TODO: Validate the params before sending
if params == nil {
params = NewUserOptionsParams()
}
op := &runtime.ClientOperation{
ID: "userOptions",
Method: "OPTIONS",
PathPattern: "/users/observable",
ProducesMediaTypes: []string{"application/json"},
ConsumesMediaTypes: []string{"application/json"},
Schemes: []string{"http"},
Params: params,
Reader: &UserOptionsReader{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.(*UserOptionsOK)
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 userOptions: API contract not enforced by server. Client expected to get an error, but got: %T", result)
panic(msg)
}
/*
UsersOptions CORS support
*/
func (a *Client) UsersOptions(params *UsersOptionsParams, opts ...ClientOption) (*UsersOptionsOK, error) {
// TODO: Validate the params before sending
if params == nil {
params = NewUsersOptionsParams()
}
op := &runtime.ClientOperation{
ID: "usersOptions",
Method: "OPTIONS",
PathPattern: "/users",
ProducesMediaTypes: []string{"application/json"},
ConsumesMediaTypes: []string{"application/json"},
Schemes: []string{"http"},
Params: params,
Reader: &UsersOptionsReader{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.(*UsersOptionsOK)
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 usersOptions: 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
}

View File

@ -1,132 +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"
)
// NewDatabaseOptionsParams creates a new DatabaseOptionsParams 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 NewDatabaseOptionsParams() *DatabaseOptionsParams {
return &DatabaseOptionsParams{
timeout: cr.DefaultTimeout,
}
}
// NewDatabaseOptionsParamsWithTimeout creates a new DatabaseOptionsParams object
// with the ability to set a timeout on a request.
func NewDatabaseOptionsParamsWithTimeout(timeout time.Duration) *DatabaseOptionsParams {
return &DatabaseOptionsParams{
timeout: timeout,
}
}
// NewDatabaseOptionsParamsWithContext creates a new DatabaseOptionsParams object
// with the ability to set a context for a request.
func NewDatabaseOptionsParamsWithContext(ctx context.Context) *DatabaseOptionsParams {
return &DatabaseOptionsParams{
Context: ctx,
}
}
// NewDatabaseOptionsParamsWithHTTPClient creates a new DatabaseOptionsParams object
// with the ability to set a custom HTTPClient for a request.
func NewDatabaseOptionsParamsWithHTTPClient(client *http.Client) *DatabaseOptionsParams {
return &DatabaseOptionsParams{
HTTPClient: client,
}
}
/*
DatabaseOptionsParams contains all the parameters to send to the API endpoint
for the database options operation.
Typically these are written to a http.Request.
*/
type DatabaseOptionsParams struct {
timeout time.Duration
Context context.Context
HTTPClient *http.Client
}
// WithDefaults hydrates default values in the database options params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *DatabaseOptionsParams) WithDefaults() *DatabaseOptionsParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the database options params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *DatabaseOptionsParams) SetDefaults() {
// no default values defined for this parameter
}
// WithTimeout adds the timeout to the database options params
func (o *DatabaseOptionsParams) WithTimeout(timeout time.Duration) *DatabaseOptionsParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the database options params
func (o *DatabaseOptionsParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the database options params
func (o *DatabaseOptionsParams) WithContext(ctx context.Context) *DatabaseOptionsParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the database options params
func (o *DatabaseOptionsParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the database options params
func (o *DatabaseOptionsParams) WithHTTPClient(client *http.Client) *DatabaseOptionsParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the database options params
func (o *DatabaseOptionsParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WriteToRequest writes these params to a swagger request
func (o *DatabaseOptionsParams) 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
}

View File

@ -1,148 +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"
)
// DatabaseOptionsReader is a Reader for the DatabaseOptions structure.
type DatabaseOptionsReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *DatabaseOptionsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewDatabaseOptionsOK()
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())
}
}
// NewDatabaseOptionsOK creates a DatabaseOptionsOK with default headers values
func NewDatabaseOptionsOK() *DatabaseOptionsOK {
return &DatabaseOptionsOK{}
}
/*
DatabaseOptionsOK describes a response with status code 200, with default header values.
CORS OPTIONS response
*/
type DatabaseOptionsOK struct {
AccessControlAllowCredentials string
AccessControlAllowHeaders string
AccessControlAllowMethods string
AccessControlAllowOrigin string
AccessControlExposeHeaders string
AccessControlMaxAge string
CacheControl string
}
// IsSuccess returns true when this database options o k response has a 2xx status code
func (o *DatabaseOptionsOK) IsSuccess() bool {
return true
}
// IsRedirect returns true when this database options o k response has a 3xx status code
func (o *DatabaseOptionsOK) IsRedirect() bool {
return false
}
// IsClientError returns true when this database options o k response has a 4xx status code
func (o *DatabaseOptionsOK) IsClientError() bool {
return false
}
// IsServerError returns true when this database options o k response has a 5xx status code
func (o *DatabaseOptionsOK) IsServerError() bool {
return false
}
// IsCode returns true when this database options o k response a status code equal to that given
func (o *DatabaseOptionsOK) IsCode(code int) bool {
return code == 200
}
// Code gets the status code for the database options o k response
func (o *DatabaseOptionsOK) Code() int {
return 200
}
func (o *DatabaseOptionsOK) Error() string {
return fmt.Sprintf("[OPTIONS /databases/observable][%d] databaseOptionsOK ", 200)
}
func (o *DatabaseOptionsOK) String() string {
return fmt.Sprintf("[OPTIONS /databases/observable][%d] databaseOptionsOK ", 200)
}
func (o *DatabaseOptionsOK) 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
}

View File

@ -1,132 +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"
)
// NewDatabasesOptionsParams creates a new DatabasesOptionsParams 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 NewDatabasesOptionsParams() *DatabasesOptionsParams {
return &DatabasesOptionsParams{
timeout: cr.DefaultTimeout,
}
}
// NewDatabasesOptionsParamsWithTimeout creates a new DatabasesOptionsParams object
// with the ability to set a timeout on a request.
func NewDatabasesOptionsParamsWithTimeout(timeout time.Duration) *DatabasesOptionsParams {
return &DatabasesOptionsParams{
timeout: timeout,
}
}
// NewDatabasesOptionsParamsWithContext creates a new DatabasesOptionsParams object
// with the ability to set a context for a request.
func NewDatabasesOptionsParamsWithContext(ctx context.Context) *DatabasesOptionsParams {
return &DatabasesOptionsParams{
Context: ctx,
}
}
// NewDatabasesOptionsParamsWithHTTPClient creates a new DatabasesOptionsParams object
// with the ability to set a custom HTTPClient for a request.
func NewDatabasesOptionsParamsWithHTTPClient(client *http.Client) *DatabasesOptionsParams {
return &DatabasesOptionsParams{
HTTPClient: client,
}
}
/*
DatabasesOptionsParams contains all the parameters to send to the API endpoint
for the databases options operation.
Typically these are written to a http.Request.
*/
type DatabasesOptionsParams struct {
timeout time.Duration
Context context.Context
HTTPClient *http.Client
}
// WithDefaults hydrates default values in the databases options params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *DatabasesOptionsParams) WithDefaults() *DatabasesOptionsParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the databases options params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *DatabasesOptionsParams) SetDefaults() {
// no default values defined for this parameter
}
// WithTimeout adds the timeout to the databases options params
func (o *DatabasesOptionsParams) WithTimeout(timeout time.Duration) *DatabasesOptionsParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the databases options params
func (o *DatabasesOptionsParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the databases options params
func (o *DatabasesOptionsParams) WithContext(ctx context.Context) *DatabasesOptionsParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the databases options params
func (o *DatabasesOptionsParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the databases options params
func (o *DatabasesOptionsParams) WithHTTPClient(client *http.Client) *DatabasesOptionsParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the databases options params
func (o *DatabasesOptionsParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WriteToRequest writes these params to a swagger request
func (o *DatabasesOptionsParams) 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
}

View File

@ -1,148 +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"
)
// DatabasesOptionsReader is a Reader for the DatabasesOptions structure.
type DatabasesOptionsReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *DatabasesOptionsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewDatabasesOptionsOK()
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())
}
}
// NewDatabasesOptionsOK creates a DatabasesOptionsOK with default headers values
func NewDatabasesOptionsOK() *DatabasesOptionsOK {
return &DatabasesOptionsOK{}
}
/*
DatabasesOptionsOK describes a response with status code 200, with default header values.
CORS OPTIONS response
*/
type DatabasesOptionsOK struct {
AccessControlAllowCredentials string
AccessControlAllowHeaders string
AccessControlAllowMethods string
AccessControlAllowOrigin string
AccessControlExposeHeaders string
AccessControlMaxAge string
CacheControl string
}
// IsSuccess returns true when this databases options o k response has a 2xx status code
func (o *DatabasesOptionsOK) IsSuccess() bool {
return true
}
// IsRedirect returns true when this databases options o k response has a 3xx status code
func (o *DatabasesOptionsOK) IsRedirect() bool {
return false
}
// IsClientError returns true when this databases options o k response has a 4xx status code
func (o *DatabasesOptionsOK) IsClientError() bool {
return false
}
// IsServerError returns true when this databases options o k response has a 5xx status code
func (o *DatabasesOptionsOK) IsServerError() bool {
return false
}
// IsCode returns true when this databases options o k response a status code equal to that given
func (o *DatabasesOptionsOK) IsCode(code int) bool {
return code == 200
}
// Code gets the status code for the databases options o k response
func (o *DatabasesOptionsOK) Code() int {
return 200
}
func (o *DatabasesOptionsOK) Error() string {
return fmt.Sprintf("[OPTIONS /databases][%d] databasesOptionsOK ", 200)
}
func (o *DatabasesOptionsOK) String() string {
return fmt.Sprintf("[OPTIONS /databases][%d] databasesOptionsOK ", 200)
}
func (o *DatabasesOptionsOK) 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
}

View File

@ -1,132 +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"
)
// NewTemplateOptionsParams creates a new TemplateOptionsParams 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 NewTemplateOptionsParams() *TemplateOptionsParams {
return &TemplateOptionsParams{
timeout: cr.DefaultTimeout,
}
}
// NewTemplateOptionsParamsWithTimeout creates a new TemplateOptionsParams object
// with the ability to set a timeout on a request.
func NewTemplateOptionsParamsWithTimeout(timeout time.Duration) *TemplateOptionsParams {
return &TemplateOptionsParams{
timeout: timeout,
}
}
// NewTemplateOptionsParamsWithContext creates a new TemplateOptionsParams object
// with the ability to set a context for a request.
func NewTemplateOptionsParamsWithContext(ctx context.Context) *TemplateOptionsParams {
return &TemplateOptionsParams{
Context: ctx,
}
}
// NewTemplateOptionsParamsWithHTTPClient creates a new TemplateOptionsParams object
// with the ability to set a custom HTTPClient for a request.
func NewTemplateOptionsParamsWithHTTPClient(client *http.Client) *TemplateOptionsParams {
return &TemplateOptionsParams{
HTTPClient: client,
}
}
/*
TemplateOptionsParams contains all the parameters to send to the API endpoint
for the template options operation.
Typically these are written to a http.Request.
*/
type TemplateOptionsParams struct {
timeout time.Duration
Context context.Context
HTTPClient *http.Client
}
// WithDefaults hydrates default values in the template options params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *TemplateOptionsParams) WithDefaults() *TemplateOptionsParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the template options params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *TemplateOptionsParams) SetDefaults() {
// no default values defined for this parameter
}
// WithTimeout adds the timeout to the template options params
func (o *TemplateOptionsParams) WithTimeout(timeout time.Duration) *TemplateOptionsParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the template options params
func (o *TemplateOptionsParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the template options params
func (o *TemplateOptionsParams) WithContext(ctx context.Context) *TemplateOptionsParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the template options params
func (o *TemplateOptionsParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the template options params
func (o *TemplateOptionsParams) WithHTTPClient(client *http.Client) *TemplateOptionsParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the template options params
func (o *TemplateOptionsParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WriteToRequest writes these params to a swagger request
func (o *TemplateOptionsParams) 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
}

View File

@ -1,148 +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"
)
// TemplateOptionsReader is a Reader for the TemplateOptions structure.
type TemplateOptionsReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *TemplateOptionsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewTemplateOptionsOK()
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())
}
}
// NewTemplateOptionsOK creates a TemplateOptionsOK with default headers values
func NewTemplateOptionsOK() *TemplateOptionsOK {
return &TemplateOptionsOK{}
}
/*
TemplateOptionsOK describes a response with status code 200, with default header values.
CORS OPTIONS response
*/
type TemplateOptionsOK struct {
AccessControlAllowCredentials string
AccessControlAllowHeaders string
AccessControlAllowMethods string
AccessControlAllowOrigin string
AccessControlExposeHeaders string
AccessControlMaxAge string
CacheControl string
}
// IsSuccess returns true when this template options o k response has a 2xx status code
func (o *TemplateOptionsOK) IsSuccess() bool {
return true
}
// IsRedirect returns true when this template options o k response has a 3xx status code
func (o *TemplateOptionsOK) IsRedirect() bool {
return false
}
// IsClientError returns true when this template options o k response has a 4xx status code
func (o *TemplateOptionsOK) IsClientError() bool {
return false
}
// IsServerError returns true when this template options o k response has a 5xx status code
func (o *TemplateOptionsOK) IsServerError() bool {
return false
}
// IsCode returns true when this template options o k response a status code equal to that given
func (o *TemplateOptionsOK) IsCode(code int) bool {
return code == 200
}
// Code gets the status code for the template options o k response
func (o *TemplateOptionsOK) Code() int {
return 200
}
func (o *TemplateOptionsOK) Error() string {
return fmt.Sprintf("[OPTIONS /templates/observable][%d] templateOptionsOK ", 200)
}
func (o *TemplateOptionsOK) String() string {
return fmt.Sprintf("[OPTIONS /templates/observable][%d] templateOptionsOK ", 200)
}
func (o *TemplateOptionsOK) 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
}

View File

@ -1,132 +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"
)
// NewTemplatesOptionsParams creates a new TemplatesOptionsParams 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 NewTemplatesOptionsParams() *TemplatesOptionsParams {
return &TemplatesOptionsParams{
timeout: cr.DefaultTimeout,
}
}
// NewTemplatesOptionsParamsWithTimeout creates a new TemplatesOptionsParams object
// with the ability to set a timeout on a request.
func NewTemplatesOptionsParamsWithTimeout(timeout time.Duration) *TemplatesOptionsParams {
return &TemplatesOptionsParams{
timeout: timeout,
}
}
// NewTemplatesOptionsParamsWithContext creates a new TemplatesOptionsParams object
// with the ability to set a context for a request.
func NewTemplatesOptionsParamsWithContext(ctx context.Context) *TemplatesOptionsParams {
return &TemplatesOptionsParams{
Context: ctx,
}
}
// NewTemplatesOptionsParamsWithHTTPClient creates a new TemplatesOptionsParams object
// with the ability to set a custom HTTPClient for a request.
func NewTemplatesOptionsParamsWithHTTPClient(client *http.Client) *TemplatesOptionsParams {
return &TemplatesOptionsParams{
HTTPClient: client,
}
}
/*
TemplatesOptionsParams contains all the parameters to send to the API endpoint
for the templates options operation.
Typically these are written to a http.Request.
*/
type TemplatesOptionsParams struct {
timeout time.Duration
Context context.Context
HTTPClient *http.Client
}
// WithDefaults hydrates default values in the templates options params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *TemplatesOptionsParams) WithDefaults() *TemplatesOptionsParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the templates options params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *TemplatesOptionsParams) SetDefaults() {
// no default values defined for this parameter
}
// WithTimeout adds the timeout to the templates options params
func (o *TemplatesOptionsParams) WithTimeout(timeout time.Duration) *TemplatesOptionsParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the templates options params
func (o *TemplatesOptionsParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the templates options params
func (o *TemplatesOptionsParams) WithContext(ctx context.Context) *TemplatesOptionsParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the templates options params
func (o *TemplatesOptionsParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the templates options params
func (o *TemplatesOptionsParams) WithHTTPClient(client *http.Client) *TemplatesOptionsParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the templates options params
func (o *TemplatesOptionsParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WriteToRequest writes these params to a swagger request
func (o *TemplatesOptionsParams) 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
}

View File

@ -1,148 +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"
)
// TemplatesOptionsReader is a Reader for the TemplatesOptions structure.
type TemplatesOptionsReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *TemplatesOptionsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewTemplatesOptionsOK()
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())
}
}
// NewTemplatesOptionsOK creates a TemplatesOptionsOK with default headers values
func NewTemplatesOptionsOK() *TemplatesOptionsOK {
return &TemplatesOptionsOK{}
}
/*
TemplatesOptionsOK describes a response with status code 200, with default header values.
CORS OPTIONS response
*/
type TemplatesOptionsOK struct {
AccessControlAllowCredentials string
AccessControlAllowHeaders string
AccessControlAllowMethods string
AccessControlAllowOrigin string
AccessControlExposeHeaders string
AccessControlMaxAge string
CacheControl string
}
// IsSuccess returns true when this templates options o k response has a 2xx status code
func (o *TemplatesOptionsOK) IsSuccess() bool {
return true
}
// IsRedirect returns true when this templates options o k response has a 3xx status code
func (o *TemplatesOptionsOK) IsRedirect() bool {
return false
}
// IsClientError returns true when this templates options o k response has a 4xx status code
func (o *TemplatesOptionsOK) IsClientError() bool {
return false
}
// IsServerError returns true when this templates options o k response has a 5xx status code
func (o *TemplatesOptionsOK) IsServerError() bool {
return false
}
// IsCode returns true when this templates options o k response a status code equal to that given
func (o *TemplatesOptionsOK) IsCode(code int) bool {
return code == 200
}
// Code gets the status code for the templates options o k response
func (o *TemplatesOptionsOK) Code() int {
return 200
}
func (o *TemplatesOptionsOK) Error() string {
return fmt.Sprintf("[OPTIONS /templates][%d] templatesOptionsOK ", 200)
}
func (o *TemplatesOptionsOK) String() string {
return fmt.Sprintf("[OPTIONS /templates][%d] templatesOptionsOK ", 200)
}
func (o *TemplatesOptionsOK) 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
}

View File

@ -1,132 +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"
)
// NewTenantOptionsParams creates a new TenantOptionsParams 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 NewTenantOptionsParams() *TenantOptionsParams {
return &TenantOptionsParams{
timeout: cr.DefaultTimeout,
}
}
// NewTenantOptionsParamsWithTimeout creates a new TenantOptionsParams object
// with the ability to set a timeout on a request.
func NewTenantOptionsParamsWithTimeout(timeout time.Duration) *TenantOptionsParams {
return &TenantOptionsParams{
timeout: timeout,
}
}
// NewTenantOptionsParamsWithContext creates a new TenantOptionsParams object
// with the ability to set a context for a request.
func NewTenantOptionsParamsWithContext(ctx context.Context) *TenantOptionsParams {
return &TenantOptionsParams{
Context: ctx,
}
}
// NewTenantOptionsParamsWithHTTPClient creates a new TenantOptionsParams object
// with the ability to set a custom HTTPClient for a request.
func NewTenantOptionsParamsWithHTTPClient(client *http.Client) *TenantOptionsParams {
return &TenantOptionsParams{
HTTPClient: client,
}
}
/*
TenantOptionsParams contains all the parameters to send to the API endpoint
for the tenant options operation.
Typically these are written to a http.Request.
*/
type TenantOptionsParams struct {
timeout time.Duration
Context context.Context
HTTPClient *http.Client
}
// WithDefaults hydrates default values in the tenant options params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *TenantOptionsParams) WithDefaults() *TenantOptionsParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the tenant options params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *TenantOptionsParams) SetDefaults() {
// no default values defined for this parameter
}
// WithTimeout adds the timeout to the tenant options params
func (o *TenantOptionsParams) WithTimeout(timeout time.Duration) *TenantOptionsParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the tenant options params
func (o *TenantOptionsParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the tenant options params
func (o *TenantOptionsParams) WithContext(ctx context.Context) *TenantOptionsParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the tenant options params
func (o *TenantOptionsParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the tenant options params
func (o *TenantOptionsParams) WithHTTPClient(client *http.Client) *TenantOptionsParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the tenant options params
func (o *TenantOptionsParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WriteToRequest writes these params to a swagger request
func (o *TenantOptionsParams) 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
}

View File

@ -1,148 +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"
)
// TenantOptionsReader is a Reader for the TenantOptions structure.
type TenantOptionsReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *TenantOptionsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewTenantOptionsOK()
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())
}
}
// NewTenantOptionsOK creates a TenantOptionsOK with default headers values
func NewTenantOptionsOK() *TenantOptionsOK {
return &TenantOptionsOK{}
}
/*
TenantOptionsOK describes a response with status code 200, with default header values.
CORS OPTIONS response
*/
type TenantOptionsOK struct {
AccessControlAllowCredentials string
AccessControlAllowHeaders string
AccessControlAllowMethods string
AccessControlAllowOrigin string
AccessControlExposeHeaders string
AccessControlMaxAge string
CacheControl string
}
// IsSuccess returns true when this tenant options o k response has a 2xx status code
func (o *TenantOptionsOK) IsSuccess() bool {
return true
}
// IsRedirect returns true when this tenant options o k response has a 3xx status code
func (o *TenantOptionsOK) IsRedirect() bool {
return false
}
// IsClientError returns true when this tenant options o k response has a 4xx status code
func (o *TenantOptionsOK) IsClientError() bool {
return false
}
// IsServerError returns true when this tenant options o k response has a 5xx status code
func (o *TenantOptionsOK) IsServerError() bool {
return false
}
// IsCode returns true when this tenant options o k response a status code equal to that given
func (o *TenantOptionsOK) IsCode(code int) bool {
return code == 200
}
// Code gets the status code for the tenant options o k response
func (o *TenantOptionsOK) Code() int {
return 200
}
func (o *TenantOptionsOK) Error() string {
return fmt.Sprintf("[OPTIONS /tenants/observable][%d] tenantOptionsOK ", 200)
}
func (o *TenantOptionsOK) String() string {
return fmt.Sprintf("[OPTIONS /tenants/observable][%d] tenantOptionsOK ", 200)
}
func (o *TenantOptionsOK) 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
}

View File

@ -1,132 +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"
)
// NewTenantsOptionsParams creates a new TenantsOptionsParams 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 NewTenantsOptionsParams() *TenantsOptionsParams {
return &TenantsOptionsParams{
timeout: cr.DefaultTimeout,
}
}
// NewTenantsOptionsParamsWithTimeout creates a new TenantsOptionsParams object
// with the ability to set a timeout on a request.
func NewTenantsOptionsParamsWithTimeout(timeout time.Duration) *TenantsOptionsParams {
return &TenantsOptionsParams{
timeout: timeout,
}
}
// NewTenantsOptionsParamsWithContext creates a new TenantsOptionsParams object
// with the ability to set a context for a request.
func NewTenantsOptionsParamsWithContext(ctx context.Context) *TenantsOptionsParams {
return &TenantsOptionsParams{
Context: ctx,
}
}
// NewTenantsOptionsParamsWithHTTPClient creates a new TenantsOptionsParams object
// with the ability to set a custom HTTPClient for a request.
func NewTenantsOptionsParamsWithHTTPClient(client *http.Client) *TenantsOptionsParams {
return &TenantsOptionsParams{
HTTPClient: client,
}
}
/*
TenantsOptionsParams contains all the parameters to send to the API endpoint
for the tenants options operation.
Typically these are written to a http.Request.
*/
type TenantsOptionsParams struct {
timeout time.Duration
Context context.Context
HTTPClient *http.Client
}
// WithDefaults hydrates default values in the tenants options params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *TenantsOptionsParams) WithDefaults() *TenantsOptionsParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the tenants options params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *TenantsOptionsParams) SetDefaults() {
// no default values defined for this parameter
}
// WithTimeout adds the timeout to the tenants options params
func (o *TenantsOptionsParams) WithTimeout(timeout time.Duration) *TenantsOptionsParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the tenants options params
func (o *TenantsOptionsParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the tenants options params
func (o *TenantsOptionsParams) WithContext(ctx context.Context) *TenantsOptionsParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the tenants options params
func (o *TenantsOptionsParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the tenants options params
func (o *TenantsOptionsParams) WithHTTPClient(client *http.Client) *TenantsOptionsParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the tenants options params
func (o *TenantsOptionsParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WriteToRequest writes these params to a swagger request
func (o *TenantsOptionsParams) 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
}

View File

@ -1,148 +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"
)
// TenantsOptionsReader is a Reader for the TenantsOptions structure.
type TenantsOptionsReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *TenantsOptionsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewTenantsOptionsOK()
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())
}
}
// NewTenantsOptionsOK creates a TenantsOptionsOK with default headers values
func NewTenantsOptionsOK() *TenantsOptionsOK {
return &TenantsOptionsOK{}
}
/*
TenantsOptionsOK describes a response with status code 200, with default header values.
CORS OPTIONS response
*/
type TenantsOptionsOK struct {
AccessControlAllowCredentials string
AccessControlAllowHeaders string
AccessControlAllowMethods string
AccessControlAllowOrigin string
AccessControlExposeHeaders string
AccessControlMaxAge string
CacheControl string
}
// IsSuccess returns true when this tenants options o k response has a 2xx status code
func (o *TenantsOptionsOK) IsSuccess() bool {
return true
}
// IsRedirect returns true when this tenants options o k response has a 3xx status code
func (o *TenantsOptionsOK) IsRedirect() bool {
return false
}
// IsClientError returns true when this tenants options o k response has a 4xx status code
func (o *TenantsOptionsOK) IsClientError() bool {
return false
}
// IsServerError returns true when this tenants options o k response has a 5xx status code
func (o *TenantsOptionsOK) IsServerError() bool {
return false
}
// IsCode returns true when this tenants options o k response a status code equal to that given
func (o *TenantsOptionsOK) IsCode(code int) bool {
return code == 200
}
// Code gets the status code for the tenants options o k response
func (o *TenantsOptionsOK) Code() int {
return 200
}
func (o *TenantsOptionsOK) Error() string {
return fmt.Sprintf("[OPTIONS /tenants][%d] tenantsOptionsOK ", 200)
}
func (o *TenantsOptionsOK) String() string {
return fmt.Sprintf("[OPTIONS /tenants][%d] tenantsOptionsOK ", 200)
}
func (o *TenantsOptionsOK) 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
}

View File

@ -1,132 +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"
)
// NewUserOptionsParams creates a new UserOptionsParams 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 NewUserOptionsParams() *UserOptionsParams {
return &UserOptionsParams{
timeout: cr.DefaultTimeout,
}
}
// NewUserOptionsParamsWithTimeout creates a new UserOptionsParams object
// with the ability to set a timeout on a request.
func NewUserOptionsParamsWithTimeout(timeout time.Duration) *UserOptionsParams {
return &UserOptionsParams{
timeout: timeout,
}
}
// NewUserOptionsParamsWithContext creates a new UserOptionsParams object
// with the ability to set a context for a request.
func NewUserOptionsParamsWithContext(ctx context.Context) *UserOptionsParams {
return &UserOptionsParams{
Context: ctx,
}
}
// NewUserOptionsParamsWithHTTPClient creates a new UserOptionsParams object
// with the ability to set a custom HTTPClient for a request.
func NewUserOptionsParamsWithHTTPClient(client *http.Client) *UserOptionsParams {
return &UserOptionsParams{
HTTPClient: client,
}
}
/*
UserOptionsParams contains all the parameters to send to the API endpoint
for the user options operation.
Typically these are written to a http.Request.
*/
type UserOptionsParams struct {
timeout time.Duration
Context context.Context
HTTPClient *http.Client
}
// WithDefaults hydrates default values in the user options params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *UserOptionsParams) WithDefaults() *UserOptionsParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the user options params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *UserOptionsParams) SetDefaults() {
// no default values defined for this parameter
}
// WithTimeout adds the timeout to the user options params
func (o *UserOptionsParams) WithTimeout(timeout time.Duration) *UserOptionsParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the user options params
func (o *UserOptionsParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the user options params
func (o *UserOptionsParams) WithContext(ctx context.Context) *UserOptionsParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the user options params
func (o *UserOptionsParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the user options params
func (o *UserOptionsParams) WithHTTPClient(client *http.Client) *UserOptionsParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the user options params
func (o *UserOptionsParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WriteToRequest writes these params to a swagger request
func (o *UserOptionsParams) 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
}

View File

@ -1,148 +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"
)
// UserOptionsReader is a Reader for the UserOptions structure.
type UserOptionsReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *UserOptionsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewUserOptionsOK()
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())
}
}
// NewUserOptionsOK creates a UserOptionsOK with default headers values
func NewUserOptionsOK() *UserOptionsOK {
return &UserOptionsOK{}
}
/*
UserOptionsOK describes a response with status code 200, with default header values.
CORS OPTIONS response
*/
type UserOptionsOK struct {
AccessControlAllowCredentials string
AccessControlAllowHeaders string
AccessControlAllowMethods string
AccessControlAllowOrigin string
AccessControlExposeHeaders string
AccessControlMaxAge string
CacheControl string
}
// IsSuccess returns true when this user options o k response has a 2xx status code
func (o *UserOptionsOK) IsSuccess() bool {
return true
}
// IsRedirect returns true when this user options o k response has a 3xx status code
func (o *UserOptionsOK) IsRedirect() bool {
return false
}
// IsClientError returns true when this user options o k response has a 4xx status code
func (o *UserOptionsOK) IsClientError() bool {
return false
}
// IsServerError returns true when this user options o k response has a 5xx status code
func (o *UserOptionsOK) IsServerError() bool {
return false
}
// IsCode returns true when this user options o k response a status code equal to that given
func (o *UserOptionsOK) IsCode(code int) bool {
return code == 200
}
// Code gets the status code for the user options o k response
func (o *UserOptionsOK) Code() int {
return 200
}
func (o *UserOptionsOK) Error() string {
return fmt.Sprintf("[OPTIONS /users/observable][%d] userOptionsOK ", 200)
}
func (o *UserOptionsOK) String() string {
return fmt.Sprintf("[OPTIONS /users/observable][%d] userOptionsOK ", 200)
}
func (o *UserOptionsOK) 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
}

View File

@ -1,132 +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"
)
// NewUsersOptionsParams creates a new UsersOptionsParams 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 NewUsersOptionsParams() *UsersOptionsParams {
return &UsersOptionsParams{
timeout: cr.DefaultTimeout,
}
}
// NewUsersOptionsParamsWithTimeout creates a new UsersOptionsParams object
// with the ability to set a timeout on a request.
func NewUsersOptionsParamsWithTimeout(timeout time.Duration) *UsersOptionsParams {
return &UsersOptionsParams{
timeout: timeout,
}
}
// NewUsersOptionsParamsWithContext creates a new UsersOptionsParams object
// with the ability to set a context for a request.
func NewUsersOptionsParamsWithContext(ctx context.Context) *UsersOptionsParams {
return &UsersOptionsParams{
Context: ctx,
}
}
// NewUsersOptionsParamsWithHTTPClient creates a new UsersOptionsParams object
// with the ability to set a custom HTTPClient for a request.
func NewUsersOptionsParamsWithHTTPClient(client *http.Client) *UsersOptionsParams {
return &UsersOptionsParams{
HTTPClient: client,
}
}
/*
UsersOptionsParams contains all the parameters to send to the API endpoint
for the users options operation.
Typically these are written to a http.Request.
*/
type UsersOptionsParams struct {
timeout time.Duration
Context context.Context
HTTPClient *http.Client
}
// WithDefaults hydrates default values in the users options params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *UsersOptionsParams) WithDefaults() *UsersOptionsParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the users options params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *UsersOptionsParams) SetDefaults() {
// no default values defined for this parameter
}
// WithTimeout adds the timeout to the users options params
func (o *UsersOptionsParams) WithTimeout(timeout time.Duration) *UsersOptionsParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the users options params
func (o *UsersOptionsParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the users options params
func (o *UsersOptionsParams) WithContext(ctx context.Context) *UsersOptionsParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the users options params
func (o *UsersOptionsParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the users options params
func (o *UsersOptionsParams) WithHTTPClient(client *http.Client) *UsersOptionsParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the users options params
func (o *UsersOptionsParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WriteToRequest writes these params to a swagger request
func (o *UsersOptionsParams) 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
}

View File

@ -1,148 +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"
)
// UsersOptionsReader is a Reader for the UsersOptions structure.
type UsersOptionsReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *UsersOptionsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewUsersOptionsOK()
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())
}
}
// NewUsersOptionsOK creates a UsersOptionsOK with default headers values
func NewUsersOptionsOK() *UsersOptionsOK {
return &UsersOptionsOK{}
}
/*
UsersOptionsOK describes a response with status code 200, with default header values.
CORS OPTIONS response
*/
type UsersOptionsOK struct {
AccessControlAllowCredentials string
AccessControlAllowHeaders string
AccessControlAllowMethods string
AccessControlAllowOrigin string
AccessControlExposeHeaders string
AccessControlMaxAge string
CacheControl string
}
// IsSuccess returns true when this users options o k response has a 2xx status code
func (o *UsersOptionsOK) IsSuccess() bool {
return true
}
// IsRedirect returns true when this users options o k response has a 3xx status code
func (o *UsersOptionsOK) IsRedirect() bool {
return false
}
// IsClientError returns true when this users options o k response has a 4xx status code
func (o *UsersOptionsOK) IsClientError() bool {
return false
}
// IsServerError returns true when this users options o k response has a 5xx status code
func (o *UsersOptionsOK) IsServerError() bool {
return false
}
// IsCode returns true when this users options o k response a status code equal to that given
func (o *UsersOptionsOK) IsCode(code int) bool {
return code == 200
}
// Code gets the status code for the users options o k response
func (o *UsersOptionsOK) Code() int {
return 200
}
func (o *UsersOptionsOK) Error() string {
return fmt.Sprintf("[OPTIONS /users][%d] usersOptionsOK ", 200)
}
func (o *UsersOptionsOK) String() string {
return fmt.Sprintf("[OPTIONS /users][%d] usersOptionsOK ", 200)
}
func (o *UsersOptionsOK) 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
}

View File

@ -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 database
// 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"
)
// NewGetDatabaseParams creates a new GetDatabaseParams 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 NewGetDatabaseParams() *GetDatabaseParams {
return &GetDatabaseParams{
timeout: cr.DefaultTimeout,
}
}
// NewGetDatabaseParamsWithTimeout creates a new GetDatabaseParams object
// with the ability to set a timeout on a request.
func NewGetDatabaseParamsWithTimeout(timeout time.Duration) *GetDatabaseParams {
return &GetDatabaseParams{
timeout: timeout,
}
}
// NewGetDatabaseParamsWithContext creates a new GetDatabaseParams object
// with the ability to set a context for a request.
func NewGetDatabaseParamsWithContext(ctx context.Context) *GetDatabaseParams {
return &GetDatabaseParams{
Context: ctx,
}
}
// NewGetDatabaseParamsWithHTTPClient creates a new GetDatabaseParams object
// with the ability to set a custom HTTPClient for a request.
func NewGetDatabaseParamsWithHTTPClient(client *http.Client) *GetDatabaseParams {
return &GetDatabaseParams{
HTTPClient: client,
}
}
/*
GetDatabaseParams contains all the parameters to send to the API endpoint
for the get database operation.
Typically these are written to a http.Request.
*/
type GetDatabaseParams struct {
/* DatabaseIDPath.
Record Id of a Database
*/
DatabaseIDPath string
timeout time.Duration
Context context.Context
HTTPClient *http.Client
}
// WithDefaults hydrates default values in the get database params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *GetDatabaseParams) WithDefaults() *GetDatabaseParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the get database params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *GetDatabaseParams) SetDefaults() {
// no default values defined for this parameter
}
// WithTimeout adds the timeout to the get database params
func (o *GetDatabaseParams) WithTimeout(timeout time.Duration) *GetDatabaseParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the get database params
func (o *GetDatabaseParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the get database params
func (o *GetDatabaseParams) WithContext(ctx context.Context) *GetDatabaseParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the get database params
func (o *GetDatabaseParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the get database params
func (o *GetDatabaseParams) WithHTTPClient(client *http.Client) *GetDatabaseParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the get database params
func (o *GetDatabaseParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WithDatabaseIDPath adds the databaseIDPath to the get database params
func (o *GetDatabaseParams) WithDatabaseIDPath(databaseIDPath string) *GetDatabaseParams {
o.SetDatabaseIDPath(databaseIDPath)
return o
}
// SetDatabaseIDPath adds the databaseIdPath to the get database params
func (o *GetDatabaseParams) SetDatabaseIDPath(databaseIDPath string) {
o.DatabaseIDPath = databaseIDPath
}
// WriteToRequest writes these params to a swagger request
func (o *GetDatabaseParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
if err := r.SetTimeout(o.timeout); err != nil {
return err
}
var res []error
// path param databaseIdPath
if err := r.SetPathParam("databaseIdPath", o.DatabaseIDPath); err != nil {
return err
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}

View File

@ -1,555 +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 database
// 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"
)
// GetDatabaseReader is a Reader for the GetDatabase structure.
type GetDatabaseReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *GetDatabaseReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewGetDatabaseOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
case 401:
result := NewGetDatabaseUnauthorized()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 403:
result := NewGetDatabaseForbidden()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 404:
result := NewGetDatabaseNotFound()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 422:
result := NewGetDatabaseUnprocessableEntity()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 500:
result := NewGetDatabaseInternalServerError()
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())
}
}
// NewGetDatabaseOK creates a GetDatabaseOK with default headers values
func NewGetDatabaseOK() *GetDatabaseOK {
return &GetDatabaseOK{}
}
/*
GetDatabaseOK describes a response with status code 200, with default header values.
Single Database record response
*/
type GetDatabaseOK struct {
AccessControlAllowOrigin string
CacheControl string
Payload *devops_models.Database
}
// IsSuccess returns true when this get database o k response has a 2xx status code
func (o *GetDatabaseOK) IsSuccess() bool {
return true
}
// IsRedirect returns true when this get database o k response has a 3xx status code
func (o *GetDatabaseOK) IsRedirect() bool {
return false
}
// IsClientError returns true when this get database o k response has a 4xx status code
func (o *GetDatabaseOK) IsClientError() bool {
return false
}
// IsServerError returns true when this get database o k response has a 5xx status code
func (o *GetDatabaseOK) IsServerError() bool {
return false
}
// IsCode returns true when this get database o k response a status code equal to that given
func (o *GetDatabaseOK) IsCode(code int) bool {
return code == 200
}
// Code gets the status code for the get database o k response
func (o *GetDatabaseOK) Code() int {
return 200
}
func (o *GetDatabaseOK) Error() string {
return fmt.Sprintf("[GET /databases/{databaseIdPath}][%d] getDatabaseOK %+v", 200, o.Payload)
}
func (o *GetDatabaseOK) String() string {
return fmt.Sprintf("[GET /databases/{databaseIdPath}][%d] getDatabaseOK %+v", 200, o.Payload)
}
func (o *GetDatabaseOK) GetPayload() *devops_models.Database {
return o.Payload
}
func (o *GetDatabaseOK) 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.Database)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewGetDatabaseUnauthorized creates a GetDatabaseUnauthorized with default headers values
func NewGetDatabaseUnauthorized() *GetDatabaseUnauthorized {
return &GetDatabaseUnauthorized{}
}
/*
GetDatabaseUnauthorized describes a response with status code 401, with default header values.
Access Unauthorized, invalid API-KEY was used
*/
type GetDatabaseUnauthorized struct {
AccessControlAllowOrigin string
CacheControl string
Payload *devops_models.Error
}
// IsSuccess returns true when this get database unauthorized response has a 2xx status code
func (o *GetDatabaseUnauthorized) IsSuccess() bool {
return false
}
// IsRedirect returns true when this get database unauthorized response has a 3xx status code
func (o *GetDatabaseUnauthorized) IsRedirect() bool {
return false
}
// IsClientError returns true when this get database unauthorized response has a 4xx status code
func (o *GetDatabaseUnauthorized) IsClientError() bool {
return true
}
// IsServerError returns true when this get database unauthorized response has a 5xx status code
func (o *GetDatabaseUnauthorized) IsServerError() bool {
return false
}
// IsCode returns true when this get database unauthorized response a status code equal to that given
func (o *GetDatabaseUnauthorized) IsCode(code int) bool {
return code == 401
}
// Code gets the status code for the get database unauthorized response
func (o *GetDatabaseUnauthorized) Code() int {
return 401
}
func (o *GetDatabaseUnauthorized) Error() string {
return fmt.Sprintf("[GET /databases/{databaseIdPath}][%d] getDatabaseUnauthorized %+v", 401, o.Payload)
}
func (o *GetDatabaseUnauthorized) String() string {
return fmt.Sprintf("[GET /databases/{databaseIdPath}][%d] getDatabaseUnauthorized %+v", 401, o.Payload)
}
func (o *GetDatabaseUnauthorized) GetPayload() *devops_models.Error {
return o.Payload
}
func (o *GetDatabaseUnauthorized) 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
}
// NewGetDatabaseForbidden creates a GetDatabaseForbidden with default headers values
func NewGetDatabaseForbidden() *GetDatabaseForbidden {
return &GetDatabaseForbidden{}
}
/*
GetDatabaseForbidden describes a response with status code 403, with default header values.
Access forbidden, account lacks access
*/
type GetDatabaseForbidden struct {
AccessControlAllowOrigin string
Payload *devops_models.Error
}
// IsSuccess returns true when this get database forbidden response has a 2xx status code
func (o *GetDatabaseForbidden) IsSuccess() bool {
return false
}
// IsRedirect returns true when this get database forbidden response has a 3xx status code
func (o *GetDatabaseForbidden) IsRedirect() bool {
return false
}
// IsClientError returns true when this get database forbidden response has a 4xx status code
func (o *GetDatabaseForbidden) IsClientError() bool {
return true
}
// IsServerError returns true when this get database forbidden response has a 5xx status code
func (o *GetDatabaseForbidden) IsServerError() bool {
return false
}
// IsCode returns true when this get database forbidden response a status code equal to that given
func (o *GetDatabaseForbidden) IsCode(code int) bool {
return code == 403
}
// Code gets the status code for the get database forbidden response
func (o *GetDatabaseForbidden) Code() int {
return 403
}
func (o *GetDatabaseForbidden) Error() string {
return fmt.Sprintf("[GET /databases/{databaseIdPath}][%d] getDatabaseForbidden %+v", 403, o.Payload)
}
func (o *GetDatabaseForbidden) String() string {
return fmt.Sprintf("[GET /databases/{databaseIdPath}][%d] getDatabaseForbidden %+v", 403, o.Payload)
}
func (o *GetDatabaseForbidden) GetPayload() *devops_models.Error {
return o.Payload
}
func (o *GetDatabaseForbidden) 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
}
// NewGetDatabaseNotFound creates a GetDatabaseNotFound with default headers values
func NewGetDatabaseNotFound() *GetDatabaseNotFound {
return &GetDatabaseNotFound{}
}
/*
GetDatabaseNotFound describes a response with status code 404, with default header values.
Resource was not found
*/
type GetDatabaseNotFound struct {
AccessControlAllowOrigin string
Payload *devops_models.Error
}
// IsSuccess returns true when this get database not found response has a 2xx status code
func (o *GetDatabaseNotFound) IsSuccess() bool {
return false
}
// IsRedirect returns true when this get database not found response has a 3xx status code
func (o *GetDatabaseNotFound) IsRedirect() bool {
return false
}
// IsClientError returns true when this get database not found response has a 4xx status code
func (o *GetDatabaseNotFound) IsClientError() bool {
return true
}
// IsServerError returns true when this get database not found response has a 5xx status code
func (o *GetDatabaseNotFound) IsServerError() bool {
return false
}
// IsCode returns true when this get database not found response a status code equal to that given
func (o *GetDatabaseNotFound) IsCode(code int) bool {
return code == 404
}
// Code gets the status code for the get database not found response
func (o *GetDatabaseNotFound) Code() int {
return 404
}
func (o *GetDatabaseNotFound) Error() string {
return fmt.Sprintf("[GET /databases/{databaseIdPath}][%d] getDatabaseNotFound %+v", 404, o.Payload)
}
func (o *GetDatabaseNotFound) String() string {
return fmt.Sprintf("[GET /databases/{databaseIdPath}][%d] getDatabaseNotFound %+v", 404, o.Payload)
}
func (o *GetDatabaseNotFound) GetPayload() *devops_models.Error {
return o.Payload
}
func (o *GetDatabaseNotFound) 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
}
// NewGetDatabaseUnprocessableEntity creates a GetDatabaseUnprocessableEntity with default headers values
func NewGetDatabaseUnprocessableEntity() *GetDatabaseUnprocessableEntity {
return &GetDatabaseUnprocessableEntity{}
}
/*
GetDatabaseUnprocessableEntity describes a response with status code 422, with default header values.
Unprocessable Entity, likely a bad parameter
*/
type GetDatabaseUnprocessableEntity struct {
AccessControlAllowOrigin string
CacheControl string
Payload *devops_models.Error
}
// IsSuccess returns true when this get database unprocessable entity response has a 2xx status code
func (o *GetDatabaseUnprocessableEntity) IsSuccess() bool {
return false
}
// IsRedirect returns true when this get database unprocessable entity response has a 3xx status code
func (o *GetDatabaseUnprocessableEntity) IsRedirect() bool {
return false
}
// IsClientError returns true when this get database unprocessable entity response has a 4xx status code
func (o *GetDatabaseUnprocessableEntity) IsClientError() bool {
return true
}
// IsServerError returns true when this get database unprocessable entity response has a 5xx status code
func (o *GetDatabaseUnprocessableEntity) IsServerError() bool {
return false
}
// IsCode returns true when this get database unprocessable entity response a status code equal to that given
func (o *GetDatabaseUnprocessableEntity) IsCode(code int) bool {
return code == 422
}
// Code gets the status code for the get database unprocessable entity response
func (o *GetDatabaseUnprocessableEntity) Code() int {
return 422
}
func (o *GetDatabaseUnprocessableEntity) Error() string {
return fmt.Sprintf("[GET /databases/{databaseIdPath}][%d] getDatabaseUnprocessableEntity %+v", 422, o.Payload)
}
func (o *GetDatabaseUnprocessableEntity) String() string {
return fmt.Sprintf("[GET /databases/{databaseIdPath}][%d] getDatabaseUnprocessableEntity %+v", 422, o.Payload)
}
func (o *GetDatabaseUnprocessableEntity) GetPayload() *devops_models.Error {
return o.Payload
}
func (o *GetDatabaseUnprocessableEntity) 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
}
// NewGetDatabaseInternalServerError creates a GetDatabaseInternalServerError with default headers values
func NewGetDatabaseInternalServerError() *GetDatabaseInternalServerError {
return &GetDatabaseInternalServerError{}
}
/*
GetDatabaseInternalServerError describes a response with status code 500, with default header values.
Server Internal Error
*/
type GetDatabaseInternalServerError struct {
AccessControlAllowOrigin string
Payload *devops_models.Error
}
// IsSuccess returns true when this get database internal server error response has a 2xx status code
func (o *GetDatabaseInternalServerError) IsSuccess() bool {
return false
}
// IsRedirect returns true when this get database internal server error response has a 3xx status code
func (o *GetDatabaseInternalServerError) IsRedirect() bool {
return false
}
// IsClientError returns true when this get database internal server error response has a 4xx status code
func (o *GetDatabaseInternalServerError) IsClientError() bool {
return false
}
// IsServerError returns true when this get database internal server error response has a 5xx status code
func (o *GetDatabaseInternalServerError) IsServerError() bool {
return true
}
// IsCode returns true when this get database internal server error response a status code equal to that given
func (o *GetDatabaseInternalServerError) IsCode(code int) bool {
return code == 500
}
// Code gets the status code for the get database internal server error response
func (o *GetDatabaseInternalServerError) Code() int {
return 500
}
func (o *GetDatabaseInternalServerError) Error() string {
return fmt.Sprintf("[GET /databases/{databaseIdPath}][%d] getDatabaseInternalServerError %+v", 500, o.Payload)
}
func (o *GetDatabaseInternalServerError) String() string {
return fmt.Sprintf("[GET /databases/{databaseIdPath}][%d] getDatabaseInternalServerError %+v", 500, o.Payload)
}
func (o *GetDatabaseInternalServerError) GetPayload() *devops_models.Error {
return o.Payload
}
func (o *GetDatabaseInternalServerError) 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
}

View File

@ -1,132 +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 database
// 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"
)
// NewGetDatabasesObservableParams creates a new GetDatabasesObservableParams 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 NewGetDatabasesObservableParams() *GetDatabasesObservableParams {
return &GetDatabasesObservableParams{
timeout: cr.DefaultTimeout,
}
}
// NewGetDatabasesObservableParamsWithTimeout creates a new GetDatabasesObservableParams object
// with the ability to set a timeout on a request.
func NewGetDatabasesObservableParamsWithTimeout(timeout time.Duration) *GetDatabasesObservableParams {
return &GetDatabasesObservableParams{
timeout: timeout,
}
}
// NewGetDatabasesObservableParamsWithContext creates a new GetDatabasesObservableParams object
// with the ability to set a context for a request.
func NewGetDatabasesObservableParamsWithContext(ctx context.Context) *GetDatabasesObservableParams {
return &GetDatabasesObservableParams{
Context: ctx,
}
}
// NewGetDatabasesObservableParamsWithHTTPClient creates a new GetDatabasesObservableParams object
// with the ability to set a custom HTTPClient for a request.
func NewGetDatabasesObservableParamsWithHTTPClient(client *http.Client) *GetDatabasesObservableParams {
return &GetDatabasesObservableParams{
HTTPClient: client,
}
}
/*
GetDatabasesObservableParams contains all the parameters to send to the API endpoint
for the get databases observable operation.
Typically these are written to a http.Request.
*/
type GetDatabasesObservableParams struct {
timeout time.Duration
Context context.Context
HTTPClient *http.Client
}
// WithDefaults hydrates default values in the get databases observable params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *GetDatabasesObservableParams) WithDefaults() *GetDatabasesObservableParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the get databases observable params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *GetDatabasesObservableParams) SetDefaults() {
// no default values defined for this parameter
}
// WithTimeout adds the timeout to the get databases observable params
func (o *GetDatabasesObservableParams) WithTimeout(timeout time.Duration) *GetDatabasesObservableParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the get databases observable params
func (o *GetDatabasesObservableParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the get databases observable params
func (o *GetDatabasesObservableParams) WithContext(ctx context.Context) *GetDatabasesObservableParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the get databases observable params
func (o *GetDatabasesObservableParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the get databases observable params
func (o *GetDatabasesObservableParams) WithHTTPClient(client *http.Client) *GetDatabasesObservableParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the get databases observable params
func (o *GetDatabasesObservableParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WriteToRequest writes these params to a swagger request
func (o *GetDatabasesObservableParams) 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
}

View File

@ -1,553 +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 database
// 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"
)
// GetDatabasesObservableReader is a Reader for the GetDatabasesObservable structure.
type GetDatabasesObservableReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *GetDatabasesObservableReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewGetDatabasesObservableOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
case 401:
result := NewGetDatabasesObservableUnauthorized()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 403:
result := NewGetDatabasesObservableForbidden()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 404:
result := NewGetDatabasesObservableNotFound()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 422:
result := NewGetDatabasesObservableUnprocessableEntity()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 500:
result := NewGetDatabasesObservableInternalServerError()
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())
}
}
// NewGetDatabasesObservableOK creates a GetDatabasesObservableOK with default headers values
func NewGetDatabasesObservableOK() *GetDatabasesObservableOK {
return &GetDatabasesObservableOK{}
}
/*
GetDatabasesObservableOK describes a response with status code 200, with default header values.
Single Database record response
*/
type GetDatabasesObservableOK struct {
AccessControlAllowOrigin string
CacheControl string
Payload []*devops_models.Database
}
// IsSuccess returns true when this get databases observable o k response has a 2xx status code
func (o *GetDatabasesObservableOK) IsSuccess() bool {
return true
}
// IsRedirect returns true when this get databases observable o k response has a 3xx status code
func (o *GetDatabasesObservableOK) IsRedirect() bool {
return false
}
// IsClientError returns true when this get databases observable o k response has a 4xx status code
func (o *GetDatabasesObservableOK) IsClientError() bool {
return false
}
// IsServerError returns true when this get databases observable o k response has a 5xx status code
func (o *GetDatabasesObservableOK) IsServerError() bool {
return false
}
// IsCode returns true when this get databases observable o k response a status code equal to that given
func (o *GetDatabasesObservableOK) IsCode(code int) bool {
return code == 200
}
// Code gets the status code for the get databases observable o k response
func (o *GetDatabasesObservableOK) Code() int {
return 200
}
func (o *GetDatabasesObservableOK) Error() string {
return fmt.Sprintf("[GET /databases/observable][%d] getDatabasesObservableOK %+v", 200, o.Payload)
}
func (o *GetDatabasesObservableOK) String() string {
return fmt.Sprintf("[GET /databases/observable][%d] getDatabasesObservableOK %+v", 200, o.Payload)
}
func (o *GetDatabasesObservableOK) GetPayload() []*devops_models.Database {
return o.Payload
}
func (o *GetDatabasesObservableOK) 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
}
// NewGetDatabasesObservableUnauthorized creates a GetDatabasesObservableUnauthorized with default headers values
func NewGetDatabasesObservableUnauthorized() *GetDatabasesObservableUnauthorized {
return &GetDatabasesObservableUnauthorized{}
}
/*
GetDatabasesObservableUnauthorized describes a response with status code 401, with default header values.
Access Unauthorized, invalid API-KEY was used
*/
type GetDatabasesObservableUnauthorized struct {
AccessControlAllowOrigin string
CacheControl string
Payload *devops_models.Error
}
// IsSuccess returns true when this get databases observable unauthorized response has a 2xx status code
func (o *GetDatabasesObservableUnauthorized) IsSuccess() bool {
return false
}
// IsRedirect returns true when this get databases observable unauthorized response has a 3xx status code
func (o *GetDatabasesObservableUnauthorized) IsRedirect() bool {
return false
}
// IsClientError returns true when this get databases observable unauthorized response has a 4xx status code
func (o *GetDatabasesObservableUnauthorized) IsClientError() bool {
return true
}
// IsServerError returns true when this get databases observable unauthorized response has a 5xx status code
func (o *GetDatabasesObservableUnauthorized) IsServerError() bool {
return false
}
// IsCode returns true when this get databases observable unauthorized response a status code equal to that given
func (o *GetDatabasesObservableUnauthorized) IsCode(code int) bool {
return code == 401
}
// Code gets the status code for the get databases observable unauthorized response
func (o *GetDatabasesObservableUnauthorized) Code() int {
return 401
}
func (o *GetDatabasesObservableUnauthorized) Error() string {
return fmt.Sprintf("[GET /databases/observable][%d] getDatabasesObservableUnauthorized %+v", 401, o.Payload)
}
func (o *GetDatabasesObservableUnauthorized) String() string {
return fmt.Sprintf("[GET /databases/observable][%d] getDatabasesObservableUnauthorized %+v", 401, o.Payload)
}
func (o *GetDatabasesObservableUnauthorized) GetPayload() *devops_models.Error {
return o.Payload
}
func (o *GetDatabasesObservableUnauthorized) 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
}
// NewGetDatabasesObservableForbidden creates a GetDatabasesObservableForbidden with default headers values
func NewGetDatabasesObservableForbidden() *GetDatabasesObservableForbidden {
return &GetDatabasesObservableForbidden{}
}
/*
GetDatabasesObservableForbidden describes a response with status code 403, with default header values.
Access forbidden, account lacks access
*/
type GetDatabasesObservableForbidden struct {
AccessControlAllowOrigin string
Payload *devops_models.Error
}
// IsSuccess returns true when this get databases observable forbidden response has a 2xx status code
func (o *GetDatabasesObservableForbidden) IsSuccess() bool {
return false
}
// IsRedirect returns true when this get databases observable forbidden response has a 3xx status code
func (o *GetDatabasesObservableForbidden) IsRedirect() bool {
return false
}
// IsClientError returns true when this get databases observable forbidden response has a 4xx status code
func (o *GetDatabasesObservableForbidden) IsClientError() bool {
return true
}
// IsServerError returns true when this get databases observable forbidden response has a 5xx status code
func (o *GetDatabasesObservableForbidden) IsServerError() bool {
return false
}
// IsCode returns true when this get databases observable forbidden response a status code equal to that given
func (o *GetDatabasesObservableForbidden) IsCode(code int) bool {
return code == 403
}
// Code gets the status code for the get databases observable forbidden response
func (o *GetDatabasesObservableForbidden) Code() int {
return 403
}
func (o *GetDatabasesObservableForbidden) Error() string {
return fmt.Sprintf("[GET /databases/observable][%d] getDatabasesObservableForbidden %+v", 403, o.Payload)
}
func (o *GetDatabasesObservableForbidden) String() string {
return fmt.Sprintf("[GET /databases/observable][%d] getDatabasesObservableForbidden %+v", 403, o.Payload)
}
func (o *GetDatabasesObservableForbidden) GetPayload() *devops_models.Error {
return o.Payload
}
func (o *GetDatabasesObservableForbidden) 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
}
// NewGetDatabasesObservableNotFound creates a GetDatabasesObservableNotFound with default headers values
func NewGetDatabasesObservableNotFound() *GetDatabasesObservableNotFound {
return &GetDatabasesObservableNotFound{}
}
/*
GetDatabasesObservableNotFound describes a response with status code 404, with default header values.
Resource was not found
*/
type GetDatabasesObservableNotFound struct {
AccessControlAllowOrigin string
Payload *devops_models.Error
}
// IsSuccess returns true when this get databases observable not found response has a 2xx status code
func (o *GetDatabasesObservableNotFound) IsSuccess() bool {
return false
}
// IsRedirect returns true when this get databases observable not found response has a 3xx status code
func (o *GetDatabasesObservableNotFound) IsRedirect() bool {
return false
}
// IsClientError returns true when this get databases observable not found response has a 4xx status code
func (o *GetDatabasesObservableNotFound) IsClientError() bool {
return true
}
// IsServerError returns true when this get databases observable not found response has a 5xx status code
func (o *GetDatabasesObservableNotFound) IsServerError() bool {
return false
}
// IsCode returns true when this get databases observable not found response a status code equal to that given
func (o *GetDatabasesObservableNotFound) IsCode(code int) bool {
return code == 404
}
// Code gets the status code for the get databases observable not found response
func (o *GetDatabasesObservableNotFound) Code() int {
return 404
}
func (o *GetDatabasesObservableNotFound) Error() string {
return fmt.Sprintf("[GET /databases/observable][%d] getDatabasesObservableNotFound %+v", 404, o.Payload)
}
func (o *GetDatabasesObservableNotFound) String() string {
return fmt.Sprintf("[GET /databases/observable][%d] getDatabasesObservableNotFound %+v", 404, o.Payload)
}
func (o *GetDatabasesObservableNotFound) GetPayload() *devops_models.Error {
return o.Payload
}
func (o *GetDatabasesObservableNotFound) 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
}
// NewGetDatabasesObservableUnprocessableEntity creates a GetDatabasesObservableUnprocessableEntity with default headers values
func NewGetDatabasesObservableUnprocessableEntity() *GetDatabasesObservableUnprocessableEntity {
return &GetDatabasesObservableUnprocessableEntity{}
}
/*
GetDatabasesObservableUnprocessableEntity describes a response with status code 422, with default header values.
Unprocessable Entity, likely a bad parameter
*/
type GetDatabasesObservableUnprocessableEntity struct {
AccessControlAllowOrigin string
CacheControl string
Payload *devops_models.Error
}
// IsSuccess returns true when this get databases observable unprocessable entity response has a 2xx status code
func (o *GetDatabasesObservableUnprocessableEntity) IsSuccess() bool {
return false
}
// IsRedirect returns true when this get databases observable unprocessable entity response has a 3xx status code
func (o *GetDatabasesObservableUnprocessableEntity) IsRedirect() bool {
return false
}
// IsClientError returns true when this get databases observable unprocessable entity response has a 4xx status code
func (o *GetDatabasesObservableUnprocessableEntity) IsClientError() bool {
return true
}
// IsServerError returns true when this get databases observable unprocessable entity response has a 5xx status code
func (o *GetDatabasesObservableUnprocessableEntity) IsServerError() bool {
return false
}
// IsCode returns true when this get databases observable unprocessable entity response a status code equal to that given
func (o *GetDatabasesObservableUnprocessableEntity) IsCode(code int) bool {
return code == 422
}
// Code gets the status code for the get databases observable unprocessable entity response
func (o *GetDatabasesObservableUnprocessableEntity) Code() int {
return 422
}
func (o *GetDatabasesObservableUnprocessableEntity) Error() string {
return fmt.Sprintf("[GET /databases/observable][%d] getDatabasesObservableUnprocessableEntity %+v", 422, o.Payload)
}
func (o *GetDatabasesObservableUnprocessableEntity) String() string {
return fmt.Sprintf("[GET /databases/observable][%d] getDatabasesObservableUnprocessableEntity %+v", 422, o.Payload)
}
func (o *GetDatabasesObservableUnprocessableEntity) GetPayload() *devops_models.Error {
return o.Payload
}
func (o *GetDatabasesObservableUnprocessableEntity) 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
}
// NewGetDatabasesObservableInternalServerError creates a GetDatabasesObservableInternalServerError with default headers values
func NewGetDatabasesObservableInternalServerError() *GetDatabasesObservableInternalServerError {
return &GetDatabasesObservableInternalServerError{}
}
/*
GetDatabasesObservableInternalServerError describes a response with status code 500, with default header values.
Server Internal Error
*/
type GetDatabasesObservableInternalServerError struct {
AccessControlAllowOrigin string
Payload *devops_models.Error
}
// IsSuccess returns true when this get databases observable internal server error response has a 2xx status code
func (o *GetDatabasesObservableInternalServerError) IsSuccess() bool {
return false
}
// IsRedirect returns true when this get databases observable internal server error response has a 3xx status code
func (o *GetDatabasesObservableInternalServerError) IsRedirect() bool {
return false
}
// IsClientError returns true when this get databases observable internal server error response has a 4xx status code
func (o *GetDatabasesObservableInternalServerError) IsClientError() bool {
return false
}
// IsServerError returns true when this get databases observable internal server error response has a 5xx status code
func (o *GetDatabasesObservableInternalServerError) IsServerError() bool {
return true
}
// IsCode returns true when this get databases observable internal server error response a status code equal to that given
func (o *GetDatabasesObservableInternalServerError) IsCode(code int) bool {
return code == 500
}
// Code gets the status code for the get databases observable internal server error response
func (o *GetDatabasesObservableInternalServerError) Code() int {
return 500
}
func (o *GetDatabasesObservableInternalServerError) Error() string {
return fmt.Sprintf("[GET /databases/observable][%d] getDatabasesObservableInternalServerError %+v", 500, o.Payload)
}
func (o *GetDatabasesObservableInternalServerError) String() string {
return fmt.Sprintf("[GET /databases/observable][%d] getDatabasesObservableInternalServerError %+v", 500, o.Payload)
}
func (o *GetDatabasesObservableInternalServerError) GetPayload() *devops_models.Error {
return o.Payload
}
func (o *GetDatabasesObservableInternalServerError) 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
}

View File

@ -1,141 +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_client
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
import (
"github.com/go-openapi/runtime"
httptransport "github.com/go-openapi/runtime/client"
"github.com/go-openapi/strfmt"
"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/template"
"code.tnxs.net/vernonkeenan/lib/api/devops/devops_client/tenant"
"code.tnxs.net/vernonkeenan/lib/api/devops/devops_client/user"
)
// Default devops HTTP client.
var Default = NewHTTPClient(nil)
const (
// DefaultHost is the default Host
// found in Meta (info) section of spec file
DefaultHost string = "devops.vernonkeenan.com:8080"
// DefaultBasePath is the default BasePath
// found in Meta (info) section of spec file
DefaultBasePath string = "/v1"
)
// DefaultSchemes are the default schemes found in Meta (info) section of spec file
var DefaultSchemes = []string{"http"}
// NewHTTPClient creates a new devops HTTP client.
func NewHTTPClient(formats strfmt.Registry) *Devops {
return NewHTTPClientWithConfig(formats, nil)
}
// NewHTTPClientWithConfig creates a new devops HTTP client,
// using a customizable transport config.
func NewHTTPClientWithConfig(formats strfmt.Registry, cfg *TransportConfig) *Devops {
// ensure nullable parameters have default
if cfg == nil {
cfg = DefaultTransportConfig()
}
// create transport and client
transport := httptransport.New(cfg.Host, cfg.BasePath, cfg.Schemes)
return New(transport, formats)
}
// New creates a new devops client
func New(transport runtime.ClientTransport, formats strfmt.Registry) *Devops {
// ensure nullable parameters have default
if formats == nil {
formats = strfmt.Default
}
cli := new(Devops)
cli.Transport = transport
cli.Cluster = cluster.New(transport, formats)
cli.Cors = cors.New(transport, formats)
cli.Database = database.New(transport, formats)
cli.Template = template.New(transport, formats)
cli.Tenant = tenant.New(transport, formats)
cli.User = user.New(transport, formats)
return cli
}
// DefaultTransportConfig creates a TransportConfig with the
// default settings taken from the meta section of the spec file.
func DefaultTransportConfig() *TransportConfig {
return &TransportConfig{
Host: DefaultHost,
BasePath: DefaultBasePath,
Schemes: DefaultSchemes,
}
}
// TransportConfig contains the transport related info,
// found in the meta section of the spec file.
type TransportConfig struct {
Host string
BasePath string
Schemes []string
}
// WithHost overrides the default host,
// provided by the meta section of the spec file.
func (cfg *TransportConfig) WithHost(host string) *TransportConfig {
cfg.Host = host
return cfg
}
// WithBasePath overrides the default basePath,
// provided by the meta section of the spec file.
func (cfg *TransportConfig) WithBasePath(basePath string) *TransportConfig {
cfg.BasePath = basePath
return cfg
}
// WithSchemes overrides the default schemes,
// provided by the meta section of the spec file.
func (cfg *TransportConfig) WithSchemes(schemes []string) *TransportConfig {
cfg.Schemes = schemes
return cfg
}
// Devops is a client for devops
type Devops struct {
Cluster cluster.ClientService
Cors cors.ClientService
Database database.ClientService
Template template.ClientService
Tenant tenant.ClientService
User user.ClientService
Transport runtime.ClientTransport
}
// SetTransport changes the transport on the client and all its subresources
func (c *Devops) SetTransport(transport runtime.ClientTransport) {
c.Transport = transport
c.Cluster.SetTransport(transport)
c.Cors.SetTransport(transport)
c.Database.SetTransport(transport)
c.Template.SetTransport(transport)
c.Tenant.SetTransport(transport)
c.User.SetTransport(transport)
}

View File

@ -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 template
// 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"
)
// NewGetTemplateParams creates a new GetTemplateParams 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 NewGetTemplateParams() *GetTemplateParams {
return &GetTemplateParams{
timeout: cr.DefaultTimeout,
}
}
// NewGetTemplateParamsWithTimeout creates a new GetTemplateParams object
// with the ability to set a timeout on a request.
func NewGetTemplateParamsWithTimeout(timeout time.Duration) *GetTemplateParams {
return &GetTemplateParams{
timeout: timeout,
}
}
// NewGetTemplateParamsWithContext creates a new GetTemplateParams object
// with the ability to set a context for a request.
func NewGetTemplateParamsWithContext(ctx context.Context) *GetTemplateParams {
return &GetTemplateParams{
Context: ctx,
}
}
// NewGetTemplateParamsWithHTTPClient creates a new GetTemplateParams object
// with the ability to set a custom HTTPClient for a request.
func NewGetTemplateParamsWithHTTPClient(client *http.Client) *GetTemplateParams {
return &GetTemplateParams{
HTTPClient: client,
}
}
/*
GetTemplateParams contains all the parameters to send to the API endpoint
for the get template operation.
Typically these are written to a http.Request.
*/
type GetTemplateParams struct {
/* TemplateIDPath.
Record Id of a Template
*/
TemplateIDPath string
timeout time.Duration
Context context.Context
HTTPClient *http.Client
}
// WithDefaults hydrates default values in the get template params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *GetTemplateParams) WithDefaults() *GetTemplateParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the get template params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *GetTemplateParams) SetDefaults() {
// no default values defined for this parameter
}
// WithTimeout adds the timeout to the get template params
func (o *GetTemplateParams) WithTimeout(timeout time.Duration) *GetTemplateParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the get template params
func (o *GetTemplateParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the get template params
func (o *GetTemplateParams) WithContext(ctx context.Context) *GetTemplateParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the get template params
func (o *GetTemplateParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the get template params
func (o *GetTemplateParams) WithHTTPClient(client *http.Client) *GetTemplateParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the get template params
func (o *GetTemplateParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WithTemplateIDPath adds the templateIDPath to the get template params
func (o *GetTemplateParams) WithTemplateIDPath(templateIDPath string) *GetTemplateParams {
o.SetTemplateIDPath(templateIDPath)
return o
}
// SetTemplateIDPath adds the templateIdPath to the get template params
func (o *GetTemplateParams) SetTemplateIDPath(templateIDPath string) {
o.TemplateIDPath = templateIDPath
}
// WriteToRequest writes these params to a swagger request
func (o *GetTemplateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
if err := r.SetTimeout(o.timeout); err != nil {
return err
}
var res []error
// path param templateIdPath
if err := r.SetPathParam("templateIdPath", o.TemplateIDPath); err != nil {
return err
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}

View File

@ -1,555 +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 template
// 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"
)
// GetTemplateReader is a Reader for the GetTemplate structure.
type GetTemplateReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *GetTemplateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewGetTemplateOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
case 401:
result := NewGetTemplateUnauthorized()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 403:
result := NewGetTemplateForbidden()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 404:
result := NewGetTemplateNotFound()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 422:
result := NewGetTemplateUnprocessableEntity()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 500:
result := NewGetTemplateInternalServerError()
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())
}
}
// NewGetTemplateOK creates a GetTemplateOK with default headers values
func NewGetTemplateOK() *GetTemplateOK {
return &GetTemplateOK{}
}
/*
GetTemplateOK describes a response with status code 200, with default header values.
Single Template record response
*/
type GetTemplateOK struct {
AccessControlAllowOrigin string
CacheControl string
Payload *devops_models.Template
}
// IsSuccess returns true when this get template o k response has a 2xx status code
func (o *GetTemplateOK) IsSuccess() bool {
return true
}
// IsRedirect returns true when this get template o k response has a 3xx status code
func (o *GetTemplateOK) IsRedirect() bool {
return false
}
// IsClientError returns true when this get template o k response has a 4xx status code
func (o *GetTemplateOK) IsClientError() bool {
return false
}
// IsServerError returns true when this get template o k response has a 5xx status code
func (o *GetTemplateOK) IsServerError() bool {
return false
}
// IsCode returns true when this get template o k response a status code equal to that given
func (o *GetTemplateOK) IsCode(code int) bool {
return code == 200
}
// Code gets the status code for the get template o k response
func (o *GetTemplateOK) Code() int {
return 200
}
func (o *GetTemplateOK) Error() string {
return fmt.Sprintf("[GET /templates/{templateIdPath}][%d] getTemplateOK %+v", 200, o.Payload)
}
func (o *GetTemplateOK) String() string {
return fmt.Sprintf("[GET /templates/{templateIdPath}][%d] getTemplateOK %+v", 200, o.Payload)
}
func (o *GetTemplateOK) GetPayload() *devops_models.Template {
return o.Payload
}
func (o *GetTemplateOK) 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.Template)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewGetTemplateUnauthorized creates a GetTemplateUnauthorized with default headers values
func NewGetTemplateUnauthorized() *GetTemplateUnauthorized {
return &GetTemplateUnauthorized{}
}
/*
GetTemplateUnauthorized describes a response with status code 401, with default header values.
Access Unauthorized, invalid API-KEY was used
*/
type GetTemplateUnauthorized struct {
AccessControlAllowOrigin string
CacheControl string
Payload *devops_models.Error
}
// IsSuccess returns true when this get template unauthorized response has a 2xx status code
func (o *GetTemplateUnauthorized) IsSuccess() bool {
return false
}
// IsRedirect returns true when this get template unauthorized response has a 3xx status code
func (o *GetTemplateUnauthorized) IsRedirect() bool {
return false
}
// IsClientError returns true when this get template unauthorized response has a 4xx status code
func (o *GetTemplateUnauthorized) IsClientError() bool {
return true
}
// IsServerError returns true when this get template unauthorized response has a 5xx status code
func (o *GetTemplateUnauthorized) IsServerError() bool {
return false
}
// IsCode returns true when this get template unauthorized response a status code equal to that given
func (o *GetTemplateUnauthorized) IsCode(code int) bool {
return code == 401
}
// Code gets the status code for the get template unauthorized response
func (o *GetTemplateUnauthorized) Code() int {
return 401
}
func (o *GetTemplateUnauthorized) Error() string {
return fmt.Sprintf("[GET /templates/{templateIdPath}][%d] getTemplateUnauthorized %+v", 401, o.Payload)
}
func (o *GetTemplateUnauthorized) String() string {
return fmt.Sprintf("[GET /templates/{templateIdPath}][%d] getTemplateUnauthorized %+v", 401, o.Payload)
}
func (o *GetTemplateUnauthorized) GetPayload() *devops_models.Error {
return o.Payload
}
func (o *GetTemplateUnauthorized) 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
}
// NewGetTemplateForbidden creates a GetTemplateForbidden with default headers values
func NewGetTemplateForbidden() *GetTemplateForbidden {
return &GetTemplateForbidden{}
}
/*
GetTemplateForbidden describes a response with status code 403, with default header values.
Access forbidden, account lacks access
*/
type GetTemplateForbidden struct {
AccessControlAllowOrigin string
Payload *devops_models.Error
}
// IsSuccess returns true when this get template forbidden response has a 2xx status code
func (o *GetTemplateForbidden) IsSuccess() bool {
return false
}
// IsRedirect returns true when this get template forbidden response has a 3xx status code
func (o *GetTemplateForbidden) IsRedirect() bool {
return false
}
// IsClientError returns true when this get template forbidden response has a 4xx status code
func (o *GetTemplateForbidden) IsClientError() bool {
return true
}
// IsServerError returns true when this get template forbidden response has a 5xx status code
func (o *GetTemplateForbidden) IsServerError() bool {
return false
}
// IsCode returns true when this get template forbidden response a status code equal to that given
func (o *GetTemplateForbidden) IsCode(code int) bool {
return code == 403
}
// Code gets the status code for the get template forbidden response
func (o *GetTemplateForbidden) Code() int {
return 403
}
func (o *GetTemplateForbidden) Error() string {
return fmt.Sprintf("[GET /templates/{templateIdPath}][%d] getTemplateForbidden %+v", 403, o.Payload)
}
func (o *GetTemplateForbidden) String() string {
return fmt.Sprintf("[GET /templates/{templateIdPath}][%d] getTemplateForbidden %+v", 403, o.Payload)
}
func (o *GetTemplateForbidden) GetPayload() *devops_models.Error {
return o.Payload
}
func (o *GetTemplateForbidden) 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
}
// NewGetTemplateNotFound creates a GetTemplateNotFound with default headers values
func NewGetTemplateNotFound() *GetTemplateNotFound {
return &GetTemplateNotFound{}
}
/*
GetTemplateNotFound describes a response with status code 404, with default header values.
Resource was not found
*/
type GetTemplateNotFound struct {
AccessControlAllowOrigin string
Payload *devops_models.Error
}
// IsSuccess returns true when this get template not found response has a 2xx status code
func (o *GetTemplateNotFound) IsSuccess() bool {
return false
}
// IsRedirect returns true when this get template not found response has a 3xx status code
func (o *GetTemplateNotFound) IsRedirect() bool {
return false
}
// IsClientError returns true when this get template not found response has a 4xx status code
func (o *GetTemplateNotFound) IsClientError() bool {
return true
}
// IsServerError returns true when this get template not found response has a 5xx status code
func (o *GetTemplateNotFound) IsServerError() bool {
return false
}
// IsCode returns true when this get template not found response a status code equal to that given
func (o *GetTemplateNotFound) IsCode(code int) bool {
return code == 404
}
// Code gets the status code for the get template not found response
func (o *GetTemplateNotFound) Code() int {
return 404
}
func (o *GetTemplateNotFound) Error() string {
return fmt.Sprintf("[GET /templates/{templateIdPath}][%d] getTemplateNotFound %+v", 404, o.Payload)
}
func (o *GetTemplateNotFound) String() string {
return fmt.Sprintf("[GET /templates/{templateIdPath}][%d] getTemplateNotFound %+v", 404, o.Payload)
}
func (o *GetTemplateNotFound) GetPayload() *devops_models.Error {
return o.Payload
}
func (o *GetTemplateNotFound) 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
}
// NewGetTemplateUnprocessableEntity creates a GetTemplateUnprocessableEntity with default headers values
func NewGetTemplateUnprocessableEntity() *GetTemplateUnprocessableEntity {
return &GetTemplateUnprocessableEntity{}
}
/*
GetTemplateUnprocessableEntity describes a response with status code 422, with default header values.
Unprocessable Entity, likely a bad parameter
*/
type GetTemplateUnprocessableEntity struct {
AccessControlAllowOrigin string
CacheControl string
Payload *devops_models.Error
}
// IsSuccess returns true when this get template unprocessable entity response has a 2xx status code
func (o *GetTemplateUnprocessableEntity) IsSuccess() bool {
return false
}
// IsRedirect returns true when this get template unprocessable entity response has a 3xx status code
func (o *GetTemplateUnprocessableEntity) IsRedirect() bool {
return false
}
// IsClientError returns true when this get template unprocessable entity response has a 4xx status code
func (o *GetTemplateUnprocessableEntity) IsClientError() bool {
return true
}
// IsServerError returns true when this get template unprocessable entity response has a 5xx status code
func (o *GetTemplateUnprocessableEntity) IsServerError() bool {
return false
}
// IsCode returns true when this get template unprocessable entity response a status code equal to that given
func (o *GetTemplateUnprocessableEntity) IsCode(code int) bool {
return code == 422
}
// Code gets the status code for the get template unprocessable entity response
func (o *GetTemplateUnprocessableEntity) Code() int {
return 422
}
func (o *GetTemplateUnprocessableEntity) Error() string {
return fmt.Sprintf("[GET /templates/{templateIdPath}][%d] getTemplateUnprocessableEntity %+v", 422, o.Payload)
}
func (o *GetTemplateUnprocessableEntity) String() string {
return fmt.Sprintf("[GET /templates/{templateIdPath}][%d] getTemplateUnprocessableEntity %+v", 422, o.Payload)
}
func (o *GetTemplateUnprocessableEntity) GetPayload() *devops_models.Error {
return o.Payload
}
func (o *GetTemplateUnprocessableEntity) 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
}
// NewGetTemplateInternalServerError creates a GetTemplateInternalServerError with default headers values
func NewGetTemplateInternalServerError() *GetTemplateInternalServerError {
return &GetTemplateInternalServerError{}
}
/*
GetTemplateInternalServerError describes a response with status code 500, with default header values.
Server Internal Error
*/
type GetTemplateInternalServerError struct {
AccessControlAllowOrigin string
Payload *devops_models.Error
}
// IsSuccess returns true when this get template internal server error response has a 2xx status code
func (o *GetTemplateInternalServerError) IsSuccess() bool {
return false
}
// IsRedirect returns true when this get template internal server error response has a 3xx status code
func (o *GetTemplateInternalServerError) IsRedirect() bool {
return false
}
// IsClientError returns true when this get template internal server error response has a 4xx status code
func (o *GetTemplateInternalServerError) IsClientError() bool {
return false
}
// IsServerError returns true when this get template internal server error response has a 5xx status code
func (o *GetTemplateInternalServerError) IsServerError() bool {
return true
}
// IsCode returns true when this get template internal server error response a status code equal to that given
func (o *GetTemplateInternalServerError) IsCode(code int) bool {
return code == 500
}
// Code gets the status code for the get template internal server error response
func (o *GetTemplateInternalServerError) Code() int {
return 500
}
func (o *GetTemplateInternalServerError) Error() string {
return fmt.Sprintf("[GET /templates/{templateIdPath}][%d] getTemplateInternalServerError %+v", 500, o.Payload)
}
func (o *GetTemplateInternalServerError) String() string {
return fmt.Sprintf("[GET /templates/{templateIdPath}][%d] getTemplateInternalServerError %+v", 500, o.Payload)
}
func (o *GetTemplateInternalServerError) GetPayload() *devops_models.Error {
return o.Payload
}
func (o *GetTemplateInternalServerError) 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
}

View File

@ -1,132 +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 template
// 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"
)
// NewGetTemplatesObservableParams creates a new GetTemplatesObservableParams 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 NewGetTemplatesObservableParams() *GetTemplatesObservableParams {
return &GetTemplatesObservableParams{
timeout: cr.DefaultTimeout,
}
}
// NewGetTemplatesObservableParamsWithTimeout creates a new GetTemplatesObservableParams object
// with the ability to set a timeout on a request.
func NewGetTemplatesObservableParamsWithTimeout(timeout time.Duration) *GetTemplatesObservableParams {
return &GetTemplatesObservableParams{
timeout: timeout,
}
}
// NewGetTemplatesObservableParamsWithContext creates a new GetTemplatesObservableParams object
// with the ability to set a context for a request.
func NewGetTemplatesObservableParamsWithContext(ctx context.Context) *GetTemplatesObservableParams {
return &GetTemplatesObservableParams{
Context: ctx,
}
}
// NewGetTemplatesObservableParamsWithHTTPClient creates a new GetTemplatesObservableParams object
// with the ability to set a custom HTTPClient for a request.
func NewGetTemplatesObservableParamsWithHTTPClient(client *http.Client) *GetTemplatesObservableParams {
return &GetTemplatesObservableParams{
HTTPClient: client,
}
}
/*
GetTemplatesObservableParams contains all the parameters to send to the API endpoint
for the get templates observable operation.
Typically these are written to a http.Request.
*/
type GetTemplatesObservableParams struct {
timeout time.Duration
Context context.Context
HTTPClient *http.Client
}
// WithDefaults hydrates default values in the get templates observable params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *GetTemplatesObservableParams) WithDefaults() *GetTemplatesObservableParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the get templates observable params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *GetTemplatesObservableParams) SetDefaults() {
// no default values defined for this parameter
}
// WithTimeout adds the timeout to the get templates observable params
func (o *GetTemplatesObservableParams) WithTimeout(timeout time.Duration) *GetTemplatesObservableParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the get templates observable params
func (o *GetTemplatesObservableParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the get templates observable params
func (o *GetTemplatesObservableParams) WithContext(ctx context.Context) *GetTemplatesObservableParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the get templates observable params
func (o *GetTemplatesObservableParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the get templates observable params
func (o *GetTemplatesObservableParams) WithHTTPClient(client *http.Client) *GetTemplatesObservableParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the get templates observable params
func (o *GetTemplatesObservableParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WriteToRequest writes these params to a swagger request
func (o *GetTemplatesObservableParams) 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
}

View File

@ -1,553 +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 template
// 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"
)
// GetTemplatesObservableReader is a Reader for the GetTemplatesObservable structure.
type GetTemplatesObservableReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *GetTemplatesObservableReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewGetTemplatesObservableOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
case 401:
result := NewGetTemplatesObservableUnauthorized()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 403:
result := NewGetTemplatesObservableForbidden()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 404:
result := NewGetTemplatesObservableNotFound()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 422:
result := NewGetTemplatesObservableUnprocessableEntity()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 500:
result := NewGetTemplatesObservableInternalServerError()
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())
}
}
// NewGetTemplatesObservableOK creates a GetTemplatesObservableOK with default headers values
func NewGetTemplatesObservableOK() *GetTemplatesObservableOK {
return &GetTemplatesObservableOK{}
}
/*
GetTemplatesObservableOK describes a response with status code 200, with default header values.
Simple Template record response
*/
type GetTemplatesObservableOK struct {
AccessControlAllowOrigin string
CacheControl string
Payload []*devops_models.Template
}
// IsSuccess returns true when this get templates observable o k response has a 2xx status code
func (o *GetTemplatesObservableOK) IsSuccess() bool {
return true
}
// IsRedirect returns true when this get templates observable o k response has a 3xx status code
func (o *GetTemplatesObservableOK) IsRedirect() bool {
return false
}
// IsClientError returns true when this get templates observable o k response has a 4xx status code
func (o *GetTemplatesObservableOK) IsClientError() bool {
return false
}
// IsServerError returns true when this get templates observable o k response has a 5xx status code
func (o *GetTemplatesObservableOK) IsServerError() bool {
return false
}
// IsCode returns true when this get templates observable o k response a status code equal to that given
func (o *GetTemplatesObservableOK) IsCode(code int) bool {
return code == 200
}
// Code gets the status code for the get templates observable o k response
func (o *GetTemplatesObservableOK) Code() int {
return 200
}
func (o *GetTemplatesObservableOK) Error() string {
return fmt.Sprintf("[GET /templates/observable][%d] getTemplatesObservableOK %+v", 200, o.Payload)
}
func (o *GetTemplatesObservableOK) String() string {
return fmt.Sprintf("[GET /templates/observable][%d] getTemplatesObservableOK %+v", 200, o.Payload)
}
func (o *GetTemplatesObservableOK) GetPayload() []*devops_models.Template {
return o.Payload
}
func (o *GetTemplatesObservableOK) 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
}
// NewGetTemplatesObservableUnauthorized creates a GetTemplatesObservableUnauthorized with default headers values
func NewGetTemplatesObservableUnauthorized() *GetTemplatesObservableUnauthorized {
return &GetTemplatesObservableUnauthorized{}
}
/*
GetTemplatesObservableUnauthorized describes a response with status code 401, with default header values.
Access Unauthorized, invalid API-KEY was used
*/
type GetTemplatesObservableUnauthorized struct {
AccessControlAllowOrigin string
CacheControl string
Payload *devops_models.Error
}
// IsSuccess returns true when this get templates observable unauthorized response has a 2xx status code
func (o *GetTemplatesObservableUnauthorized) IsSuccess() bool {
return false
}
// IsRedirect returns true when this get templates observable unauthorized response has a 3xx status code
func (o *GetTemplatesObservableUnauthorized) IsRedirect() bool {
return false
}
// IsClientError returns true when this get templates observable unauthorized response has a 4xx status code
func (o *GetTemplatesObservableUnauthorized) IsClientError() bool {
return true
}
// IsServerError returns true when this get templates observable unauthorized response has a 5xx status code
func (o *GetTemplatesObservableUnauthorized) IsServerError() bool {
return false
}
// IsCode returns true when this get templates observable unauthorized response a status code equal to that given
func (o *GetTemplatesObservableUnauthorized) IsCode(code int) bool {
return code == 401
}
// Code gets the status code for the get templates observable unauthorized response
func (o *GetTemplatesObservableUnauthorized) Code() int {
return 401
}
func (o *GetTemplatesObservableUnauthorized) Error() string {
return fmt.Sprintf("[GET /templates/observable][%d] getTemplatesObservableUnauthorized %+v", 401, o.Payload)
}
func (o *GetTemplatesObservableUnauthorized) String() string {
return fmt.Sprintf("[GET /templates/observable][%d] getTemplatesObservableUnauthorized %+v", 401, o.Payload)
}
func (o *GetTemplatesObservableUnauthorized) GetPayload() *devops_models.Error {
return o.Payload
}
func (o *GetTemplatesObservableUnauthorized) 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
}
// NewGetTemplatesObservableForbidden creates a GetTemplatesObservableForbidden with default headers values
func NewGetTemplatesObservableForbidden() *GetTemplatesObservableForbidden {
return &GetTemplatesObservableForbidden{}
}
/*
GetTemplatesObservableForbidden describes a response with status code 403, with default header values.
Access forbidden, account lacks access
*/
type GetTemplatesObservableForbidden struct {
AccessControlAllowOrigin string
Payload *devops_models.Error
}
// IsSuccess returns true when this get templates observable forbidden response has a 2xx status code
func (o *GetTemplatesObservableForbidden) IsSuccess() bool {
return false
}
// IsRedirect returns true when this get templates observable forbidden response has a 3xx status code
func (o *GetTemplatesObservableForbidden) IsRedirect() bool {
return false
}
// IsClientError returns true when this get templates observable forbidden response has a 4xx status code
func (o *GetTemplatesObservableForbidden) IsClientError() bool {
return true
}
// IsServerError returns true when this get templates observable forbidden response has a 5xx status code
func (o *GetTemplatesObservableForbidden) IsServerError() bool {
return false
}
// IsCode returns true when this get templates observable forbidden response a status code equal to that given
func (o *GetTemplatesObservableForbidden) IsCode(code int) bool {
return code == 403
}
// Code gets the status code for the get templates observable forbidden response
func (o *GetTemplatesObservableForbidden) Code() int {
return 403
}
func (o *GetTemplatesObservableForbidden) Error() string {
return fmt.Sprintf("[GET /templates/observable][%d] getTemplatesObservableForbidden %+v", 403, o.Payload)
}
func (o *GetTemplatesObservableForbidden) String() string {
return fmt.Sprintf("[GET /templates/observable][%d] getTemplatesObservableForbidden %+v", 403, o.Payload)
}
func (o *GetTemplatesObservableForbidden) GetPayload() *devops_models.Error {
return o.Payload
}
func (o *GetTemplatesObservableForbidden) 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
}
// NewGetTemplatesObservableNotFound creates a GetTemplatesObservableNotFound with default headers values
func NewGetTemplatesObservableNotFound() *GetTemplatesObservableNotFound {
return &GetTemplatesObservableNotFound{}
}
/*
GetTemplatesObservableNotFound describes a response with status code 404, with default header values.
Resource was not found
*/
type GetTemplatesObservableNotFound struct {
AccessControlAllowOrigin string
Payload *devops_models.Error
}
// IsSuccess returns true when this get templates observable not found response has a 2xx status code
func (o *GetTemplatesObservableNotFound) IsSuccess() bool {
return false
}
// IsRedirect returns true when this get templates observable not found response has a 3xx status code
func (o *GetTemplatesObservableNotFound) IsRedirect() bool {
return false
}
// IsClientError returns true when this get templates observable not found response has a 4xx status code
func (o *GetTemplatesObservableNotFound) IsClientError() bool {
return true
}
// IsServerError returns true when this get templates observable not found response has a 5xx status code
func (o *GetTemplatesObservableNotFound) IsServerError() bool {
return false
}
// IsCode returns true when this get templates observable not found response a status code equal to that given
func (o *GetTemplatesObservableNotFound) IsCode(code int) bool {
return code == 404
}
// Code gets the status code for the get templates observable not found response
func (o *GetTemplatesObservableNotFound) Code() int {
return 404
}
func (o *GetTemplatesObservableNotFound) Error() string {
return fmt.Sprintf("[GET /templates/observable][%d] getTemplatesObservableNotFound %+v", 404, o.Payload)
}
func (o *GetTemplatesObservableNotFound) String() string {
return fmt.Sprintf("[GET /templates/observable][%d] getTemplatesObservableNotFound %+v", 404, o.Payload)
}
func (o *GetTemplatesObservableNotFound) GetPayload() *devops_models.Error {
return o.Payload
}
func (o *GetTemplatesObservableNotFound) 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
}
// NewGetTemplatesObservableUnprocessableEntity creates a GetTemplatesObservableUnprocessableEntity with default headers values
func NewGetTemplatesObservableUnprocessableEntity() *GetTemplatesObservableUnprocessableEntity {
return &GetTemplatesObservableUnprocessableEntity{}
}
/*
GetTemplatesObservableUnprocessableEntity describes a response with status code 422, with default header values.
Unprocessable Entity, likely a bad parameter
*/
type GetTemplatesObservableUnprocessableEntity struct {
AccessControlAllowOrigin string
CacheControl string
Payload *devops_models.Error
}
// IsSuccess returns true when this get templates observable unprocessable entity response has a 2xx status code
func (o *GetTemplatesObservableUnprocessableEntity) IsSuccess() bool {
return false
}
// IsRedirect returns true when this get templates observable unprocessable entity response has a 3xx status code
func (o *GetTemplatesObservableUnprocessableEntity) IsRedirect() bool {
return false
}
// IsClientError returns true when this get templates observable unprocessable entity response has a 4xx status code
func (o *GetTemplatesObservableUnprocessableEntity) IsClientError() bool {
return true
}
// IsServerError returns true when this get templates observable unprocessable entity response has a 5xx status code
func (o *GetTemplatesObservableUnprocessableEntity) IsServerError() bool {
return false
}
// IsCode returns true when this get templates observable unprocessable entity response a status code equal to that given
func (o *GetTemplatesObservableUnprocessableEntity) IsCode(code int) bool {
return code == 422
}
// Code gets the status code for the get templates observable unprocessable entity response
func (o *GetTemplatesObservableUnprocessableEntity) Code() int {
return 422
}
func (o *GetTemplatesObservableUnprocessableEntity) Error() string {
return fmt.Sprintf("[GET /templates/observable][%d] getTemplatesObservableUnprocessableEntity %+v", 422, o.Payload)
}
func (o *GetTemplatesObservableUnprocessableEntity) String() string {
return fmt.Sprintf("[GET /templates/observable][%d] getTemplatesObservableUnprocessableEntity %+v", 422, o.Payload)
}
func (o *GetTemplatesObservableUnprocessableEntity) GetPayload() *devops_models.Error {
return o.Payload
}
func (o *GetTemplatesObservableUnprocessableEntity) 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
}
// NewGetTemplatesObservableInternalServerError creates a GetTemplatesObservableInternalServerError with default headers values
func NewGetTemplatesObservableInternalServerError() *GetTemplatesObservableInternalServerError {
return &GetTemplatesObservableInternalServerError{}
}
/*
GetTemplatesObservableInternalServerError describes a response with status code 500, with default header values.
Server Internal Error
*/
type GetTemplatesObservableInternalServerError struct {
AccessControlAllowOrigin string
Payload *devops_models.Error
}
// IsSuccess returns true when this get templates observable internal server error response has a 2xx status code
func (o *GetTemplatesObservableInternalServerError) IsSuccess() bool {
return false
}
// IsRedirect returns true when this get templates observable internal server error response has a 3xx status code
func (o *GetTemplatesObservableInternalServerError) IsRedirect() bool {
return false
}
// IsClientError returns true when this get templates observable internal server error response has a 4xx status code
func (o *GetTemplatesObservableInternalServerError) IsClientError() bool {
return false
}
// IsServerError returns true when this get templates observable internal server error response has a 5xx status code
func (o *GetTemplatesObservableInternalServerError) IsServerError() bool {
return true
}
// IsCode returns true when this get templates observable internal server error response a status code equal to that given
func (o *GetTemplatesObservableInternalServerError) IsCode(code int) bool {
return code == 500
}
// Code gets the status code for the get templates observable internal server error response
func (o *GetTemplatesObservableInternalServerError) Code() int {
return 500
}
func (o *GetTemplatesObservableInternalServerError) Error() string {
return fmt.Sprintf("[GET /templates/observable][%d] getTemplatesObservableInternalServerError %+v", 500, o.Payload)
}
func (o *GetTemplatesObservableInternalServerError) String() string {
return fmt.Sprintf("[GET /templates/observable][%d] getTemplatesObservableInternalServerError %+v", 500, o.Payload)
}
func (o *GetTemplatesObservableInternalServerError) GetPayload() *devops_models.Error {
return o.Payload
}
func (o *GetTemplatesObservableInternalServerError) 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
}

View File

@ -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 tenant
// 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"
)
// NewGetTenantParams creates a new GetTenantParams 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 NewGetTenantParams() *GetTenantParams {
return &GetTenantParams{
timeout: cr.DefaultTimeout,
}
}
// NewGetTenantParamsWithTimeout creates a new GetTenantParams object
// with the ability to set a timeout on a request.
func NewGetTenantParamsWithTimeout(timeout time.Duration) *GetTenantParams {
return &GetTenantParams{
timeout: timeout,
}
}
// NewGetTenantParamsWithContext creates a new GetTenantParams object
// with the ability to set a context for a request.
func NewGetTenantParamsWithContext(ctx context.Context) *GetTenantParams {
return &GetTenantParams{
Context: ctx,
}
}
// NewGetTenantParamsWithHTTPClient creates a new GetTenantParams object
// with the ability to set a custom HTTPClient for a request.
func NewGetTenantParamsWithHTTPClient(client *http.Client) *GetTenantParams {
return &GetTenantParams{
HTTPClient: client,
}
}
/*
GetTenantParams contains all the parameters to send to the API endpoint
for the get tenant operation.
Typically these are written to a http.Request.
*/
type GetTenantParams struct {
/* TenantIDPath.
Record Id of a Tenant
*/
TenantIDPath string
timeout time.Duration
Context context.Context
HTTPClient *http.Client
}
// WithDefaults hydrates default values in the get tenant params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *GetTenantParams) WithDefaults() *GetTenantParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the get tenant params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *GetTenantParams) SetDefaults() {
// no default values defined for this parameter
}
// WithTimeout adds the timeout to the get tenant params
func (o *GetTenantParams) WithTimeout(timeout time.Duration) *GetTenantParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the get tenant params
func (o *GetTenantParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the get tenant params
func (o *GetTenantParams) WithContext(ctx context.Context) *GetTenantParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the get tenant params
func (o *GetTenantParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the get tenant params
func (o *GetTenantParams) WithHTTPClient(client *http.Client) *GetTenantParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the get tenant params
func (o *GetTenantParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WithTenantIDPath adds the tenantIDPath to the get tenant params
func (o *GetTenantParams) WithTenantIDPath(tenantIDPath string) *GetTenantParams {
o.SetTenantIDPath(tenantIDPath)
return o
}
// SetTenantIDPath adds the tenantIdPath to the get tenant params
func (o *GetTenantParams) SetTenantIDPath(tenantIDPath string) {
o.TenantIDPath = tenantIDPath
}
// WriteToRequest writes these params to a swagger request
func (o *GetTenantParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
if err := r.SetTimeout(o.timeout); err != nil {
return err
}
var res []error
// path param tenantIdPath
if err := r.SetPathParam("tenantIdPath", o.TenantIDPath); err != nil {
return err
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}

View File

@ -1,555 +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 tenant
// 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"
)
// GetTenantReader is a Reader for the GetTenant structure.
type GetTenantReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *GetTenantReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewGetTenantOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
case 401:
result := NewGetTenantUnauthorized()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 403:
result := NewGetTenantForbidden()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 404:
result := NewGetTenantNotFound()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 422:
result := NewGetTenantUnprocessableEntity()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 500:
result := NewGetTenantInternalServerError()
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())
}
}
// NewGetTenantOK creates a GetTenantOK with default headers values
func NewGetTenantOK() *GetTenantOK {
return &GetTenantOK{}
}
/*
GetTenantOK describes a response with status code 200, with default header values.
Single Tenant record response
*/
type GetTenantOK struct {
AccessControlAllowOrigin string
CacheControl string
Payload *devops_models.Tenant
}
// IsSuccess returns true when this get tenant o k response has a 2xx status code
func (o *GetTenantOK) IsSuccess() bool {
return true
}
// IsRedirect returns true when this get tenant o k response has a 3xx status code
func (o *GetTenantOK) IsRedirect() bool {
return false
}
// IsClientError returns true when this get tenant o k response has a 4xx status code
func (o *GetTenantOK) IsClientError() bool {
return false
}
// IsServerError returns true when this get tenant o k response has a 5xx status code
func (o *GetTenantOK) IsServerError() bool {
return false
}
// IsCode returns true when this get tenant o k response a status code equal to that given
func (o *GetTenantOK) IsCode(code int) bool {
return code == 200
}
// Code gets the status code for the get tenant o k response
func (o *GetTenantOK) Code() int {
return 200
}
func (o *GetTenantOK) Error() string {
return fmt.Sprintf("[GET /tenants/{tenantIdPath}][%d] getTenantOK %+v", 200, o.Payload)
}
func (o *GetTenantOK) String() string {
return fmt.Sprintf("[GET /tenants/{tenantIdPath}][%d] getTenantOK %+v", 200, o.Payload)
}
func (o *GetTenantOK) GetPayload() *devops_models.Tenant {
return o.Payload
}
func (o *GetTenantOK) 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.Tenant)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewGetTenantUnauthorized creates a GetTenantUnauthorized with default headers values
func NewGetTenantUnauthorized() *GetTenantUnauthorized {
return &GetTenantUnauthorized{}
}
/*
GetTenantUnauthorized describes a response with status code 401, with default header values.
Access Unauthorized, invalid API-KEY was used
*/
type GetTenantUnauthorized struct {
AccessControlAllowOrigin string
CacheControl string
Payload *devops_models.Error
}
// IsSuccess returns true when this get tenant unauthorized response has a 2xx status code
func (o *GetTenantUnauthorized) IsSuccess() bool {
return false
}
// IsRedirect returns true when this get tenant unauthorized response has a 3xx status code
func (o *GetTenantUnauthorized) IsRedirect() bool {
return false
}
// IsClientError returns true when this get tenant unauthorized response has a 4xx status code
func (o *GetTenantUnauthorized) IsClientError() bool {
return true
}
// IsServerError returns true when this get tenant unauthorized response has a 5xx status code
func (o *GetTenantUnauthorized) IsServerError() bool {
return false
}
// IsCode returns true when this get tenant unauthorized response a status code equal to that given
func (o *GetTenantUnauthorized) IsCode(code int) bool {
return code == 401
}
// Code gets the status code for the get tenant unauthorized response
func (o *GetTenantUnauthorized) Code() int {
return 401
}
func (o *GetTenantUnauthorized) Error() string {
return fmt.Sprintf("[GET /tenants/{tenantIdPath}][%d] getTenantUnauthorized %+v", 401, o.Payload)
}
func (o *GetTenantUnauthorized) String() string {
return fmt.Sprintf("[GET /tenants/{tenantIdPath}][%d] getTenantUnauthorized %+v", 401, o.Payload)
}
func (o *GetTenantUnauthorized) GetPayload() *devops_models.Error {
return o.Payload
}
func (o *GetTenantUnauthorized) 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
}
// NewGetTenantForbidden creates a GetTenantForbidden with default headers values
func NewGetTenantForbidden() *GetTenantForbidden {
return &GetTenantForbidden{}
}
/*
GetTenantForbidden describes a response with status code 403, with default header values.
Access forbidden, account lacks access
*/
type GetTenantForbidden struct {
AccessControlAllowOrigin string
Payload *devops_models.Error
}
// IsSuccess returns true when this get tenant forbidden response has a 2xx status code
func (o *GetTenantForbidden) IsSuccess() bool {
return false
}
// IsRedirect returns true when this get tenant forbidden response has a 3xx status code
func (o *GetTenantForbidden) IsRedirect() bool {
return false
}
// IsClientError returns true when this get tenant forbidden response has a 4xx status code
func (o *GetTenantForbidden) IsClientError() bool {
return true
}
// IsServerError returns true when this get tenant forbidden response has a 5xx status code
func (o *GetTenantForbidden) IsServerError() bool {
return false
}
// IsCode returns true when this get tenant forbidden response a status code equal to that given
func (o *GetTenantForbidden) IsCode(code int) bool {
return code == 403
}
// Code gets the status code for the get tenant forbidden response
func (o *GetTenantForbidden) Code() int {
return 403
}
func (o *GetTenantForbidden) Error() string {
return fmt.Sprintf("[GET /tenants/{tenantIdPath}][%d] getTenantForbidden %+v", 403, o.Payload)
}
func (o *GetTenantForbidden) String() string {
return fmt.Sprintf("[GET /tenants/{tenantIdPath}][%d] getTenantForbidden %+v", 403, o.Payload)
}
func (o *GetTenantForbidden) GetPayload() *devops_models.Error {
return o.Payload
}
func (o *GetTenantForbidden) 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
}
// NewGetTenantNotFound creates a GetTenantNotFound with default headers values
func NewGetTenantNotFound() *GetTenantNotFound {
return &GetTenantNotFound{}
}
/*
GetTenantNotFound describes a response with status code 404, with default header values.
Resource was not found
*/
type GetTenantNotFound struct {
AccessControlAllowOrigin string
Payload *devops_models.Error
}
// IsSuccess returns true when this get tenant not found response has a 2xx status code
func (o *GetTenantNotFound) IsSuccess() bool {
return false
}
// IsRedirect returns true when this get tenant not found response has a 3xx status code
func (o *GetTenantNotFound) IsRedirect() bool {
return false
}
// IsClientError returns true when this get tenant not found response has a 4xx status code
func (o *GetTenantNotFound) IsClientError() bool {
return true
}
// IsServerError returns true when this get tenant not found response has a 5xx status code
func (o *GetTenantNotFound) IsServerError() bool {
return false
}
// IsCode returns true when this get tenant not found response a status code equal to that given
func (o *GetTenantNotFound) IsCode(code int) bool {
return code == 404
}
// Code gets the status code for the get tenant not found response
func (o *GetTenantNotFound) Code() int {
return 404
}
func (o *GetTenantNotFound) Error() string {
return fmt.Sprintf("[GET /tenants/{tenantIdPath}][%d] getTenantNotFound %+v", 404, o.Payload)
}
func (o *GetTenantNotFound) String() string {
return fmt.Sprintf("[GET /tenants/{tenantIdPath}][%d] getTenantNotFound %+v", 404, o.Payload)
}
func (o *GetTenantNotFound) GetPayload() *devops_models.Error {
return o.Payload
}
func (o *GetTenantNotFound) 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
}
// NewGetTenantUnprocessableEntity creates a GetTenantUnprocessableEntity with default headers values
func NewGetTenantUnprocessableEntity() *GetTenantUnprocessableEntity {
return &GetTenantUnprocessableEntity{}
}
/*
GetTenantUnprocessableEntity describes a response with status code 422, with default header values.
Unprocessable Entity, likely a bad parameter
*/
type GetTenantUnprocessableEntity struct {
AccessControlAllowOrigin string
CacheControl string
Payload *devops_models.Error
}
// IsSuccess returns true when this get tenant unprocessable entity response has a 2xx status code
func (o *GetTenantUnprocessableEntity) IsSuccess() bool {
return false
}
// IsRedirect returns true when this get tenant unprocessable entity response has a 3xx status code
func (o *GetTenantUnprocessableEntity) IsRedirect() bool {
return false
}
// IsClientError returns true when this get tenant unprocessable entity response has a 4xx status code
func (o *GetTenantUnprocessableEntity) IsClientError() bool {
return true
}
// IsServerError returns true when this get tenant unprocessable entity response has a 5xx status code
func (o *GetTenantUnprocessableEntity) IsServerError() bool {
return false
}
// IsCode returns true when this get tenant unprocessable entity response a status code equal to that given
func (o *GetTenantUnprocessableEntity) IsCode(code int) bool {
return code == 422
}
// Code gets the status code for the get tenant unprocessable entity response
func (o *GetTenantUnprocessableEntity) Code() int {
return 422
}
func (o *GetTenantUnprocessableEntity) Error() string {
return fmt.Sprintf("[GET /tenants/{tenantIdPath}][%d] getTenantUnprocessableEntity %+v", 422, o.Payload)
}
func (o *GetTenantUnprocessableEntity) String() string {
return fmt.Sprintf("[GET /tenants/{tenantIdPath}][%d] getTenantUnprocessableEntity %+v", 422, o.Payload)
}
func (o *GetTenantUnprocessableEntity) GetPayload() *devops_models.Error {
return o.Payload
}
func (o *GetTenantUnprocessableEntity) 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
}
// NewGetTenantInternalServerError creates a GetTenantInternalServerError with default headers values
func NewGetTenantInternalServerError() *GetTenantInternalServerError {
return &GetTenantInternalServerError{}
}
/*
GetTenantInternalServerError describes a response with status code 500, with default header values.
Server Internal Error
*/
type GetTenantInternalServerError struct {
AccessControlAllowOrigin string
Payload *devops_models.Error
}
// IsSuccess returns true when this get tenant internal server error response has a 2xx status code
func (o *GetTenantInternalServerError) IsSuccess() bool {
return false
}
// IsRedirect returns true when this get tenant internal server error response has a 3xx status code
func (o *GetTenantInternalServerError) IsRedirect() bool {
return false
}
// IsClientError returns true when this get tenant internal server error response has a 4xx status code
func (o *GetTenantInternalServerError) IsClientError() bool {
return false
}
// IsServerError returns true when this get tenant internal server error response has a 5xx status code
func (o *GetTenantInternalServerError) IsServerError() bool {
return true
}
// IsCode returns true when this get tenant internal server error response a status code equal to that given
func (o *GetTenantInternalServerError) IsCode(code int) bool {
return code == 500
}
// Code gets the status code for the get tenant internal server error response
func (o *GetTenantInternalServerError) Code() int {
return 500
}
func (o *GetTenantInternalServerError) Error() string {
return fmt.Sprintf("[GET /tenants/{tenantIdPath}][%d] getTenantInternalServerError %+v", 500, o.Payload)
}
func (o *GetTenantInternalServerError) String() string {
return fmt.Sprintf("[GET /tenants/{tenantIdPath}][%d] getTenantInternalServerError %+v", 500, o.Payload)
}
func (o *GetTenantInternalServerError) GetPayload() *devops_models.Error {
return o.Payload
}
func (o *GetTenantInternalServerError) 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
}

View File

@ -1,132 +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 tenant
// 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"
)
// NewGetTenantsObservableParams creates a new GetTenantsObservableParams 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 NewGetTenantsObservableParams() *GetTenantsObservableParams {
return &GetTenantsObservableParams{
timeout: cr.DefaultTimeout,
}
}
// NewGetTenantsObservableParamsWithTimeout creates a new GetTenantsObservableParams object
// with the ability to set a timeout on a request.
func NewGetTenantsObservableParamsWithTimeout(timeout time.Duration) *GetTenantsObservableParams {
return &GetTenantsObservableParams{
timeout: timeout,
}
}
// NewGetTenantsObservableParamsWithContext creates a new GetTenantsObservableParams object
// with the ability to set a context for a request.
func NewGetTenantsObservableParamsWithContext(ctx context.Context) *GetTenantsObservableParams {
return &GetTenantsObservableParams{
Context: ctx,
}
}
// NewGetTenantsObservableParamsWithHTTPClient creates a new GetTenantsObservableParams object
// with the ability to set a custom HTTPClient for a request.
func NewGetTenantsObservableParamsWithHTTPClient(client *http.Client) *GetTenantsObservableParams {
return &GetTenantsObservableParams{
HTTPClient: client,
}
}
/*
GetTenantsObservableParams contains all the parameters to send to the API endpoint
for the get tenants observable operation.
Typically these are written to a http.Request.
*/
type GetTenantsObservableParams struct {
timeout time.Duration
Context context.Context
HTTPClient *http.Client
}
// WithDefaults hydrates default values in the get tenants observable params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *GetTenantsObservableParams) WithDefaults() *GetTenantsObservableParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the get tenants observable params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *GetTenantsObservableParams) SetDefaults() {
// no default values defined for this parameter
}
// WithTimeout adds the timeout to the get tenants observable params
func (o *GetTenantsObservableParams) WithTimeout(timeout time.Duration) *GetTenantsObservableParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the get tenants observable params
func (o *GetTenantsObservableParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the get tenants observable params
func (o *GetTenantsObservableParams) WithContext(ctx context.Context) *GetTenantsObservableParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the get tenants observable params
func (o *GetTenantsObservableParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the get tenants observable params
func (o *GetTenantsObservableParams) WithHTTPClient(client *http.Client) *GetTenantsObservableParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the get tenants observable params
func (o *GetTenantsObservableParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WriteToRequest writes these params to a swagger request
func (o *GetTenantsObservableParams) 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
}

View File

@ -1,553 +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 tenant
// 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"
)
// GetTenantsObservableReader is a Reader for the GetTenantsObservable structure.
type GetTenantsObservableReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *GetTenantsObservableReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewGetTenantsObservableOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
case 401:
result := NewGetTenantsObservableUnauthorized()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 403:
result := NewGetTenantsObservableForbidden()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 404:
result := NewGetTenantsObservableNotFound()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 422:
result := NewGetTenantsObservableUnprocessableEntity()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 500:
result := NewGetTenantsObservableInternalServerError()
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())
}
}
// NewGetTenantsObservableOK creates a GetTenantsObservableOK with default headers values
func NewGetTenantsObservableOK() *GetTenantsObservableOK {
return &GetTenantsObservableOK{}
}
/*
GetTenantsObservableOK describes a response with status code 200, with default header values.
Single Tenant record response
*/
type GetTenantsObservableOK struct {
AccessControlAllowOrigin string
CacheControl string
Payload []*devops_models.Tenant
}
// IsSuccess returns true when this get tenants observable o k response has a 2xx status code
func (o *GetTenantsObservableOK) IsSuccess() bool {
return true
}
// IsRedirect returns true when this get tenants observable o k response has a 3xx status code
func (o *GetTenantsObservableOK) IsRedirect() bool {
return false
}
// IsClientError returns true when this get tenants observable o k response has a 4xx status code
func (o *GetTenantsObservableOK) IsClientError() bool {
return false
}
// IsServerError returns true when this get tenants observable o k response has a 5xx status code
func (o *GetTenantsObservableOK) IsServerError() bool {
return false
}
// IsCode returns true when this get tenants observable o k response a status code equal to that given
func (o *GetTenantsObservableOK) IsCode(code int) bool {
return code == 200
}
// Code gets the status code for the get tenants observable o k response
func (o *GetTenantsObservableOK) Code() int {
return 200
}
func (o *GetTenantsObservableOK) Error() string {
return fmt.Sprintf("[GET /tenants/observable][%d] getTenantsObservableOK %+v", 200, o.Payload)
}
func (o *GetTenantsObservableOK) String() string {
return fmt.Sprintf("[GET /tenants/observable][%d] getTenantsObservableOK %+v", 200, o.Payload)
}
func (o *GetTenantsObservableOK) GetPayload() []*devops_models.Tenant {
return o.Payload
}
func (o *GetTenantsObservableOK) 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
}
// NewGetTenantsObservableUnauthorized creates a GetTenantsObservableUnauthorized with default headers values
func NewGetTenantsObservableUnauthorized() *GetTenantsObservableUnauthorized {
return &GetTenantsObservableUnauthorized{}
}
/*
GetTenantsObservableUnauthorized describes a response with status code 401, with default header values.
Access Unauthorized, invalid API-KEY was used
*/
type GetTenantsObservableUnauthorized struct {
AccessControlAllowOrigin string
CacheControl string
Payload *devops_models.Error
}
// IsSuccess returns true when this get tenants observable unauthorized response has a 2xx status code
func (o *GetTenantsObservableUnauthorized) IsSuccess() bool {
return false
}
// IsRedirect returns true when this get tenants observable unauthorized response has a 3xx status code
func (o *GetTenantsObservableUnauthorized) IsRedirect() bool {
return false
}
// IsClientError returns true when this get tenants observable unauthorized response has a 4xx status code
func (o *GetTenantsObservableUnauthorized) IsClientError() bool {
return true
}
// IsServerError returns true when this get tenants observable unauthorized response has a 5xx status code
func (o *GetTenantsObservableUnauthorized) IsServerError() bool {
return false
}
// IsCode returns true when this get tenants observable unauthorized response a status code equal to that given
func (o *GetTenantsObservableUnauthorized) IsCode(code int) bool {
return code == 401
}
// Code gets the status code for the get tenants observable unauthorized response
func (o *GetTenantsObservableUnauthorized) Code() int {
return 401
}
func (o *GetTenantsObservableUnauthorized) Error() string {
return fmt.Sprintf("[GET /tenants/observable][%d] getTenantsObservableUnauthorized %+v", 401, o.Payload)
}
func (o *GetTenantsObservableUnauthorized) String() string {
return fmt.Sprintf("[GET /tenants/observable][%d] getTenantsObservableUnauthorized %+v", 401, o.Payload)
}
func (o *GetTenantsObservableUnauthorized) GetPayload() *devops_models.Error {
return o.Payload
}
func (o *GetTenantsObservableUnauthorized) 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
}
// NewGetTenantsObservableForbidden creates a GetTenantsObservableForbidden with default headers values
func NewGetTenantsObservableForbidden() *GetTenantsObservableForbidden {
return &GetTenantsObservableForbidden{}
}
/*
GetTenantsObservableForbidden describes a response with status code 403, with default header values.
Access forbidden, account lacks access
*/
type GetTenantsObservableForbidden struct {
AccessControlAllowOrigin string
Payload *devops_models.Error
}
// IsSuccess returns true when this get tenants observable forbidden response has a 2xx status code
func (o *GetTenantsObservableForbidden) IsSuccess() bool {
return false
}
// IsRedirect returns true when this get tenants observable forbidden response has a 3xx status code
func (o *GetTenantsObservableForbidden) IsRedirect() bool {
return false
}
// IsClientError returns true when this get tenants observable forbidden response has a 4xx status code
func (o *GetTenantsObservableForbidden) IsClientError() bool {
return true
}
// IsServerError returns true when this get tenants observable forbidden response has a 5xx status code
func (o *GetTenantsObservableForbidden) IsServerError() bool {
return false
}
// IsCode returns true when this get tenants observable forbidden response a status code equal to that given
func (o *GetTenantsObservableForbidden) IsCode(code int) bool {
return code == 403
}
// Code gets the status code for the get tenants observable forbidden response
func (o *GetTenantsObservableForbidden) Code() int {
return 403
}
func (o *GetTenantsObservableForbidden) Error() string {
return fmt.Sprintf("[GET /tenants/observable][%d] getTenantsObservableForbidden %+v", 403, o.Payload)
}
func (o *GetTenantsObservableForbidden) String() string {
return fmt.Sprintf("[GET /tenants/observable][%d] getTenantsObservableForbidden %+v", 403, o.Payload)
}
func (o *GetTenantsObservableForbidden) GetPayload() *devops_models.Error {
return o.Payload
}
func (o *GetTenantsObservableForbidden) 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
}
// NewGetTenantsObservableNotFound creates a GetTenantsObservableNotFound with default headers values
func NewGetTenantsObservableNotFound() *GetTenantsObservableNotFound {
return &GetTenantsObservableNotFound{}
}
/*
GetTenantsObservableNotFound describes a response with status code 404, with default header values.
Resource was not found
*/
type GetTenantsObservableNotFound struct {
AccessControlAllowOrigin string
Payload *devops_models.Error
}
// IsSuccess returns true when this get tenants observable not found response has a 2xx status code
func (o *GetTenantsObservableNotFound) IsSuccess() bool {
return false
}
// IsRedirect returns true when this get tenants observable not found response has a 3xx status code
func (o *GetTenantsObservableNotFound) IsRedirect() bool {
return false
}
// IsClientError returns true when this get tenants observable not found response has a 4xx status code
func (o *GetTenantsObservableNotFound) IsClientError() bool {
return true
}
// IsServerError returns true when this get tenants observable not found response has a 5xx status code
func (o *GetTenantsObservableNotFound) IsServerError() bool {
return false
}
// IsCode returns true when this get tenants observable not found response a status code equal to that given
func (o *GetTenantsObservableNotFound) IsCode(code int) bool {
return code == 404
}
// Code gets the status code for the get tenants observable not found response
func (o *GetTenantsObservableNotFound) Code() int {
return 404
}
func (o *GetTenantsObservableNotFound) Error() string {
return fmt.Sprintf("[GET /tenants/observable][%d] getTenantsObservableNotFound %+v", 404, o.Payload)
}
func (o *GetTenantsObservableNotFound) String() string {
return fmt.Sprintf("[GET /tenants/observable][%d] getTenantsObservableNotFound %+v", 404, o.Payload)
}
func (o *GetTenantsObservableNotFound) GetPayload() *devops_models.Error {
return o.Payload
}
func (o *GetTenantsObservableNotFound) 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
}
// NewGetTenantsObservableUnprocessableEntity creates a GetTenantsObservableUnprocessableEntity with default headers values
func NewGetTenantsObservableUnprocessableEntity() *GetTenantsObservableUnprocessableEntity {
return &GetTenantsObservableUnprocessableEntity{}
}
/*
GetTenantsObservableUnprocessableEntity describes a response with status code 422, with default header values.
Unprocessable Entity, likely a bad parameter
*/
type GetTenantsObservableUnprocessableEntity struct {
AccessControlAllowOrigin string
CacheControl string
Payload *devops_models.Error
}
// IsSuccess returns true when this get tenants observable unprocessable entity response has a 2xx status code
func (o *GetTenantsObservableUnprocessableEntity) IsSuccess() bool {
return false
}
// IsRedirect returns true when this get tenants observable unprocessable entity response has a 3xx status code
func (o *GetTenantsObservableUnprocessableEntity) IsRedirect() bool {
return false
}
// IsClientError returns true when this get tenants observable unprocessable entity response has a 4xx status code
func (o *GetTenantsObservableUnprocessableEntity) IsClientError() bool {
return true
}
// IsServerError returns true when this get tenants observable unprocessable entity response has a 5xx status code
func (o *GetTenantsObservableUnprocessableEntity) IsServerError() bool {
return false
}
// IsCode returns true when this get tenants observable unprocessable entity response a status code equal to that given
func (o *GetTenantsObservableUnprocessableEntity) IsCode(code int) bool {
return code == 422
}
// Code gets the status code for the get tenants observable unprocessable entity response
func (o *GetTenantsObservableUnprocessableEntity) Code() int {
return 422
}
func (o *GetTenantsObservableUnprocessableEntity) Error() string {
return fmt.Sprintf("[GET /tenants/observable][%d] getTenantsObservableUnprocessableEntity %+v", 422, o.Payload)
}
func (o *GetTenantsObservableUnprocessableEntity) String() string {
return fmt.Sprintf("[GET /tenants/observable][%d] getTenantsObservableUnprocessableEntity %+v", 422, o.Payload)
}
func (o *GetTenantsObservableUnprocessableEntity) GetPayload() *devops_models.Error {
return o.Payload
}
func (o *GetTenantsObservableUnprocessableEntity) 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
}
// NewGetTenantsObservableInternalServerError creates a GetTenantsObservableInternalServerError with default headers values
func NewGetTenantsObservableInternalServerError() *GetTenantsObservableInternalServerError {
return &GetTenantsObservableInternalServerError{}
}
/*
GetTenantsObservableInternalServerError describes a response with status code 500, with default header values.
Server Internal Error
*/
type GetTenantsObservableInternalServerError struct {
AccessControlAllowOrigin string
Payload *devops_models.Error
}
// IsSuccess returns true when this get tenants observable internal server error response has a 2xx status code
func (o *GetTenantsObservableInternalServerError) IsSuccess() bool {
return false
}
// IsRedirect returns true when this get tenants observable internal server error response has a 3xx status code
func (o *GetTenantsObservableInternalServerError) IsRedirect() bool {
return false
}
// IsClientError returns true when this get tenants observable internal server error response has a 4xx status code
func (o *GetTenantsObservableInternalServerError) IsClientError() bool {
return false
}
// IsServerError returns true when this get tenants observable internal server error response has a 5xx status code
func (o *GetTenantsObservableInternalServerError) IsServerError() bool {
return true
}
// IsCode returns true when this get tenants observable internal server error response a status code equal to that given
func (o *GetTenantsObservableInternalServerError) IsCode(code int) bool {
return code == 500
}
// Code gets the status code for the get tenants observable internal server error response
func (o *GetTenantsObservableInternalServerError) Code() int {
return 500
}
func (o *GetTenantsObservableInternalServerError) Error() string {
return fmt.Sprintf("[GET /tenants/observable][%d] getTenantsObservableInternalServerError %+v", 500, o.Payload)
}
func (o *GetTenantsObservableInternalServerError) String() string {
return fmt.Sprintf("[GET /tenants/observable][%d] getTenantsObservableInternalServerError %+v", 500, o.Payload)
}
func (o *GetTenantsObservableInternalServerError) GetPayload() *devops_models.Error {
return o.Payload
}
func (o *GetTenantsObservableInternalServerError) 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
}

View File

@ -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 user
// 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"
)
// NewGetUserParams creates a new GetUserParams 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 NewGetUserParams() *GetUserParams {
return &GetUserParams{
timeout: cr.DefaultTimeout,
}
}
// NewGetUserParamsWithTimeout creates a new GetUserParams object
// with the ability to set a timeout on a request.
func NewGetUserParamsWithTimeout(timeout time.Duration) *GetUserParams {
return &GetUserParams{
timeout: timeout,
}
}
// NewGetUserParamsWithContext creates a new GetUserParams object
// with the ability to set a context for a request.
func NewGetUserParamsWithContext(ctx context.Context) *GetUserParams {
return &GetUserParams{
Context: ctx,
}
}
// NewGetUserParamsWithHTTPClient creates a new GetUserParams object
// with the ability to set a custom HTTPClient for a request.
func NewGetUserParamsWithHTTPClient(client *http.Client) *GetUserParams {
return &GetUserParams{
HTTPClient: client,
}
}
/*
GetUserParams contains all the parameters to send to the API endpoint
for the get user operation.
Typically these are written to a http.Request.
*/
type GetUserParams struct {
/* UserIDPath.
Record Id of a User
*/
UserIDPath string
timeout time.Duration
Context context.Context
HTTPClient *http.Client
}
// WithDefaults hydrates default values in the get user params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *GetUserParams) WithDefaults() *GetUserParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the get user params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *GetUserParams) SetDefaults() {
// no default values defined for this parameter
}
// WithTimeout adds the timeout to the get user params
func (o *GetUserParams) WithTimeout(timeout time.Duration) *GetUserParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the get user params
func (o *GetUserParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the get user params
func (o *GetUserParams) WithContext(ctx context.Context) *GetUserParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the get user params
func (o *GetUserParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the get user params
func (o *GetUserParams) WithHTTPClient(client *http.Client) *GetUserParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the get user params
func (o *GetUserParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WithUserIDPath adds the userIDPath to the get user params
func (o *GetUserParams) WithUserIDPath(userIDPath string) *GetUserParams {
o.SetUserIDPath(userIDPath)
return o
}
// SetUserIDPath adds the userIdPath to the get user params
func (o *GetUserParams) SetUserIDPath(userIDPath string) {
o.UserIDPath = userIDPath
}
// WriteToRequest writes these params to a swagger request
func (o *GetUserParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
if err := r.SetTimeout(o.timeout); err != nil {
return err
}
var res []error
// path param userIdPath
if err := r.SetPathParam("userIdPath", o.UserIDPath); err != nil {
return err
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}

View File

@ -1,555 +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 user
// 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"
)
// GetUserReader is a Reader for the GetUser structure.
type GetUserReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *GetUserReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewGetUserOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
case 401:
result := NewGetUserUnauthorized()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 403:
result := NewGetUserForbidden()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 404:
result := NewGetUserNotFound()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 422:
result := NewGetUserUnprocessableEntity()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 500:
result := NewGetUserInternalServerError()
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())
}
}
// NewGetUserOK creates a GetUserOK with default headers values
func NewGetUserOK() *GetUserOK {
return &GetUserOK{}
}
/*
GetUserOK describes a response with status code 200, with default header values.
Single User record response
*/
type GetUserOK struct {
AccessControlAllowOrigin string
CacheControl string
Payload *devops_models.User
}
// IsSuccess returns true when this get user o k response has a 2xx status code
func (o *GetUserOK) IsSuccess() bool {
return true
}
// IsRedirect returns true when this get user o k response has a 3xx status code
func (o *GetUserOK) IsRedirect() bool {
return false
}
// IsClientError returns true when this get user o k response has a 4xx status code
func (o *GetUserOK) IsClientError() bool {
return false
}
// IsServerError returns true when this get user o k response has a 5xx status code
func (o *GetUserOK) IsServerError() bool {
return false
}
// IsCode returns true when this get user o k response a status code equal to that given
func (o *GetUserOK) IsCode(code int) bool {
return code == 200
}
// Code gets the status code for the get user o k response
func (o *GetUserOK) Code() int {
return 200
}
func (o *GetUserOK) Error() string {
return fmt.Sprintf("[GET /users/{userIdPath}][%d] getUserOK %+v", 200, o.Payload)
}
func (o *GetUserOK) String() string {
return fmt.Sprintf("[GET /users/{userIdPath}][%d] getUserOK %+v", 200, o.Payload)
}
func (o *GetUserOK) GetPayload() *devops_models.User {
return o.Payload
}
func (o *GetUserOK) 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.User)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewGetUserUnauthorized creates a GetUserUnauthorized with default headers values
func NewGetUserUnauthorized() *GetUserUnauthorized {
return &GetUserUnauthorized{}
}
/*
GetUserUnauthorized describes a response with status code 401, with default header values.
Access Unauthorized, invalid API-KEY was used
*/
type GetUserUnauthorized struct {
AccessControlAllowOrigin string
CacheControl string
Payload *devops_models.Error
}
// IsSuccess returns true when this get user unauthorized response has a 2xx status code
func (o *GetUserUnauthorized) IsSuccess() bool {
return false
}
// IsRedirect returns true when this get user unauthorized response has a 3xx status code
func (o *GetUserUnauthorized) IsRedirect() bool {
return false
}
// IsClientError returns true when this get user unauthorized response has a 4xx status code
func (o *GetUserUnauthorized) IsClientError() bool {
return true
}
// IsServerError returns true when this get user unauthorized response has a 5xx status code
func (o *GetUserUnauthorized) IsServerError() bool {
return false
}
// IsCode returns true when this get user unauthorized response a status code equal to that given
func (o *GetUserUnauthorized) IsCode(code int) bool {
return code == 401
}
// Code gets the status code for the get user unauthorized response
func (o *GetUserUnauthorized) Code() int {
return 401
}
func (o *GetUserUnauthorized) Error() string {
return fmt.Sprintf("[GET /users/{userIdPath}][%d] getUserUnauthorized %+v", 401, o.Payload)
}
func (o *GetUserUnauthorized) String() string {
return fmt.Sprintf("[GET /users/{userIdPath}][%d] getUserUnauthorized %+v", 401, o.Payload)
}
func (o *GetUserUnauthorized) GetPayload() *devops_models.Error {
return o.Payload
}
func (o *GetUserUnauthorized) 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
}
// NewGetUserForbidden creates a GetUserForbidden with default headers values
func NewGetUserForbidden() *GetUserForbidden {
return &GetUserForbidden{}
}
/*
GetUserForbidden describes a response with status code 403, with default header values.
Access forbidden, account lacks access
*/
type GetUserForbidden struct {
AccessControlAllowOrigin string
Payload *devops_models.Error
}
// IsSuccess returns true when this get user forbidden response has a 2xx status code
func (o *GetUserForbidden) IsSuccess() bool {
return false
}
// IsRedirect returns true when this get user forbidden response has a 3xx status code
func (o *GetUserForbidden) IsRedirect() bool {
return false
}
// IsClientError returns true when this get user forbidden response has a 4xx status code
func (o *GetUserForbidden) IsClientError() bool {
return true
}
// IsServerError returns true when this get user forbidden response has a 5xx status code
func (o *GetUserForbidden) IsServerError() bool {
return false
}
// IsCode returns true when this get user forbidden response a status code equal to that given
func (o *GetUserForbidden) IsCode(code int) bool {
return code == 403
}
// Code gets the status code for the get user forbidden response
func (o *GetUserForbidden) Code() int {
return 403
}
func (o *GetUserForbidden) Error() string {
return fmt.Sprintf("[GET /users/{userIdPath}][%d] getUserForbidden %+v", 403, o.Payload)
}
func (o *GetUserForbidden) String() string {
return fmt.Sprintf("[GET /users/{userIdPath}][%d] getUserForbidden %+v", 403, o.Payload)
}
func (o *GetUserForbidden) GetPayload() *devops_models.Error {
return o.Payload
}
func (o *GetUserForbidden) 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
}
// NewGetUserNotFound creates a GetUserNotFound with default headers values
func NewGetUserNotFound() *GetUserNotFound {
return &GetUserNotFound{}
}
/*
GetUserNotFound describes a response with status code 404, with default header values.
Resource was not found
*/
type GetUserNotFound struct {
AccessControlAllowOrigin string
Payload *devops_models.Error
}
// IsSuccess returns true when this get user not found response has a 2xx status code
func (o *GetUserNotFound) IsSuccess() bool {
return false
}
// IsRedirect returns true when this get user not found response has a 3xx status code
func (o *GetUserNotFound) IsRedirect() bool {
return false
}
// IsClientError returns true when this get user not found response has a 4xx status code
func (o *GetUserNotFound) IsClientError() bool {
return true
}
// IsServerError returns true when this get user not found response has a 5xx status code
func (o *GetUserNotFound) IsServerError() bool {
return false
}
// IsCode returns true when this get user not found response a status code equal to that given
func (o *GetUserNotFound) IsCode(code int) bool {
return code == 404
}
// Code gets the status code for the get user not found response
func (o *GetUserNotFound) Code() int {
return 404
}
func (o *GetUserNotFound) Error() string {
return fmt.Sprintf("[GET /users/{userIdPath}][%d] getUserNotFound %+v", 404, o.Payload)
}
func (o *GetUserNotFound) String() string {
return fmt.Sprintf("[GET /users/{userIdPath}][%d] getUserNotFound %+v", 404, o.Payload)
}
func (o *GetUserNotFound) GetPayload() *devops_models.Error {
return o.Payload
}
func (o *GetUserNotFound) 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
}
// NewGetUserUnprocessableEntity creates a GetUserUnprocessableEntity with default headers values
func NewGetUserUnprocessableEntity() *GetUserUnprocessableEntity {
return &GetUserUnprocessableEntity{}
}
/*
GetUserUnprocessableEntity describes a response with status code 422, with default header values.
Unprocessable Entity, likely a bad parameter
*/
type GetUserUnprocessableEntity struct {
AccessControlAllowOrigin string
CacheControl string
Payload *devops_models.Error
}
// IsSuccess returns true when this get user unprocessable entity response has a 2xx status code
func (o *GetUserUnprocessableEntity) IsSuccess() bool {
return false
}
// IsRedirect returns true when this get user unprocessable entity response has a 3xx status code
func (o *GetUserUnprocessableEntity) IsRedirect() bool {
return false
}
// IsClientError returns true when this get user unprocessable entity response has a 4xx status code
func (o *GetUserUnprocessableEntity) IsClientError() bool {
return true
}
// IsServerError returns true when this get user unprocessable entity response has a 5xx status code
func (o *GetUserUnprocessableEntity) IsServerError() bool {
return false
}
// IsCode returns true when this get user unprocessable entity response a status code equal to that given
func (o *GetUserUnprocessableEntity) IsCode(code int) bool {
return code == 422
}
// Code gets the status code for the get user unprocessable entity response
func (o *GetUserUnprocessableEntity) Code() int {
return 422
}
func (o *GetUserUnprocessableEntity) Error() string {
return fmt.Sprintf("[GET /users/{userIdPath}][%d] getUserUnprocessableEntity %+v", 422, o.Payload)
}
func (o *GetUserUnprocessableEntity) String() string {
return fmt.Sprintf("[GET /users/{userIdPath}][%d] getUserUnprocessableEntity %+v", 422, o.Payload)
}
func (o *GetUserUnprocessableEntity) GetPayload() *devops_models.Error {
return o.Payload
}
func (o *GetUserUnprocessableEntity) 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
}
// NewGetUserInternalServerError creates a GetUserInternalServerError with default headers values
func NewGetUserInternalServerError() *GetUserInternalServerError {
return &GetUserInternalServerError{}
}
/*
GetUserInternalServerError describes a response with status code 500, with default header values.
Server Internal Error
*/
type GetUserInternalServerError struct {
AccessControlAllowOrigin string
Payload *devops_models.Error
}
// IsSuccess returns true when this get user internal server error response has a 2xx status code
func (o *GetUserInternalServerError) IsSuccess() bool {
return false
}
// IsRedirect returns true when this get user internal server error response has a 3xx status code
func (o *GetUserInternalServerError) IsRedirect() bool {
return false
}
// IsClientError returns true when this get user internal server error response has a 4xx status code
func (o *GetUserInternalServerError) IsClientError() bool {
return false
}
// IsServerError returns true when this get user internal server error response has a 5xx status code
func (o *GetUserInternalServerError) IsServerError() bool {
return true
}
// IsCode returns true when this get user internal server error response a status code equal to that given
func (o *GetUserInternalServerError) IsCode(code int) bool {
return code == 500
}
// Code gets the status code for the get user internal server error response
func (o *GetUserInternalServerError) Code() int {
return 500
}
func (o *GetUserInternalServerError) Error() string {
return fmt.Sprintf("[GET /users/{userIdPath}][%d] getUserInternalServerError %+v", 500, o.Payload)
}
func (o *GetUserInternalServerError) String() string {
return fmt.Sprintf("[GET /users/{userIdPath}][%d] getUserInternalServerError %+v", 500, o.Payload)
}
func (o *GetUserInternalServerError) GetPayload() *devops_models.Error {
return o.Payload
}
func (o *GetUserInternalServerError) 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
}

View File

@ -1,132 +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 user
// 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"
)
// NewGetUsersObservableParams creates a new GetUsersObservableParams 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 NewGetUsersObservableParams() *GetUsersObservableParams {
return &GetUsersObservableParams{
timeout: cr.DefaultTimeout,
}
}
// NewGetUsersObservableParamsWithTimeout creates a new GetUsersObservableParams object
// with the ability to set a timeout on a request.
func NewGetUsersObservableParamsWithTimeout(timeout time.Duration) *GetUsersObservableParams {
return &GetUsersObservableParams{
timeout: timeout,
}
}
// NewGetUsersObservableParamsWithContext creates a new GetUsersObservableParams object
// with the ability to set a context for a request.
func NewGetUsersObservableParamsWithContext(ctx context.Context) *GetUsersObservableParams {
return &GetUsersObservableParams{
Context: ctx,
}
}
// NewGetUsersObservableParamsWithHTTPClient creates a new GetUsersObservableParams object
// with the ability to set a custom HTTPClient for a request.
func NewGetUsersObservableParamsWithHTTPClient(client *http.Client) *GetUsersObservableParams {
return &GetUsersObservableParams{
HTTPClient: client,
}
}
/*
GetUsersObservableParams contains all the parameters to send to the API endpoint
for the get users observable operation.
Typically these are written to a http.Request.
*/
type GetUsersObservableParams struct {
timeout time.Duration
Context context.Context
HTTPClient *http.Client
}
// WithDefaults hydrates default values in the get users observable params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *GetUsersObservableParams) WithDefaults() *GetUsersObservableParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the get users observable params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *GetUsersObservableParams) SetDefaults() {
// no default values defined for this parameter
}
// WithTimeout adds the timeout to the get users observable params
func (o *GetUsersObservableParams) WithTimeout(timeout time.Duration) *GetUsersObservableParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the get users observable params
func (o *GetUsersObservableParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the get users observable params
func (o *GetUsersObservableParams) WithContext(ctx context.Context) *GetUsersObservableParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the get users observable params
func (o *GetUsersObservableParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the get users observable params
func (o *GetUsersObservableParams) WithHTTPClient(client *http.Client) *GetUsersObservableParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the get users observable params
func (o *GetUsersObservableParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WriteToRequest writes these params to a swagger request
func (o *GetUsersObservableParams) 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
}

View File

@ -1,553 +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 user
// 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"
)
// GetUsersObservableReader is a Reader for the GetUsersObservable structure.
type GetUsersObservableReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *GetUsersObservableReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewGetUsersObservableOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
case 401:
result := NewGetUsersObservableUnauthorized()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 403:
result := NewGetUsersObservableForbidden()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 404:
result := NewGetUsersObservableNotFound()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 422:
result := NewGetUsersObservableUnprocessableEntity()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 500:
result := NewGetUsersObservableInternalServerError()
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())
}
}
// NewGetUsersObservableOK creates a GetUsersObservableOK with default headers values
func NewGetUsersObservableOK() *GetUsersObservableOK {
return &GetUsersObservableOK{}
}
/*
GetUsersObservableOK describes a response with status code 200, with default header values.
Simple User record response
*/
type GetUsersObservableOK struct {
AccessControlAllowOrigin string
CacheControl string
Payload []*devops_models.User
}
// IsSuccess returns true when this get users observable o k response has a 2xx status code
func (o *GetUsersObservableOK) IsSuccess() bool {
return true
}
// IsRedirect returns true when this get users observable o k response has a 3xx status code
func (o *GetUsersObservableOK) IsRedirect() bool {
return false
}
// IsClientError returns true when this get users observable o k response has a 4xx status code
func (o *GetUsersObservableOK) IsClientError() bool {
return false
}
// IsServerError returns true when this get users observable o k response has a 5xx status code
func (o *GetUsersObservableOK) IsServerError() bool {
return false
}
// IsCode returns true when this get users observable o k response a status code equal to that given
func (o *GetUsersObservableOK) IsCode(code int) bool {
return code == 200
}
// Code gets the status code for the get users observable o k response
func (o *GetUsersObservableOK) Code() int {
return 200
}
func (o *GetUsersObservableOK) Error() string {
return fmt.Sprintf("[GET /users/observable][%d] getUsersObservableOK %+v", 200, o.Payload)
}
func (o *GetUsersObservableOK) String() string {
return fmt.Sprintf("[GET /users/observable][%d] getUsersObservableOK %+v", 200, o.Payload)
}
func (o *GetUsersObservableOK) GetPayload() []*devops_models.User {
return o.Payload
}
func (o *GetUsersObservableOK) 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
}
// NewGetUsersObservableUnauthorized creates a GetUsersObservableUnauthorized with default headers values
func NewGetUsersObservableUnauthorized() *GetUsersObservableUnauthorized {
return &GetUsersObservableUnauthorized{}
}
/*
GetUsersObservableUnauthorized describes a response with status code 401, with default header values.
Access Unauthorized, invalid API-KEY was used
*/
type GetUsersObservableUnauthorized struct {
AccessControlAllowOrigin string
CacheControl string
Payload *devops_models.Error
}
// IsSuccess returns true when this get users observable unauthorized response has a 2xx status code
func (o *GetUsersObservableUnauthorized) IsSuccess() bool {
return false
}
// IsRedirect returns true when this get users observable unauthorized response has a 3xx status code
func (o *GetUsersObservableUnauthorized) IsRedirect() bool {
return false
}
// IsClientError returns true when this get users observable unauthorized response has a 4xx status code
func (o *GetUsersObservableUnauthorized) IsClientError() bool {
return true
}
// IsServerError returns true when this get users observable unauthorized response has a 5xx status code
func (o *GetUsersObservableUnauthorized) IsServerError() bool {
return false
}
// IsCode returns true when this get users observable unauthorized response a status code equal to that given
func (o *GetUsersObservableUnauthorized) IsCode(code int) bool {
return code == 401
}
// Code gets the status code for the get users observable unauthorized response
func (o *GetUsersObservableUnauthorized) Code() int {
return 401
}
func (o *GetUsersObservableUnauthorized) Error() string {
return fmt.Sprintf("[GET /users/observable][%d] getUsersObservableUnauthorized %+v", 401, o.Payload)
}
func (o *GetUsersObservableUnauthorized) String() string {
return fmt.Sprintf("[GET /users/observable][%d] getUsersObservableUnauthorized %+v", 401, o.Payload)
}
func (o *GetUsersObservableUnauthorized) GetPayload() *devops_models.Error {
return o.Payload
}
func (o *GetUsersObservableUnauthorized) 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
}
// NewGetUsersObservableForbidden creates a GetUsersObservableForbidden with default headers values
func NewGetUsersObservableForbidden() *GetUsersObservableForbidden {
return &GetUsersObservableForbidden{}
}
/*
GetUsersObservableForbidden describes a response with status code 403, with default header values.
Access forbidden, account lacks access
*/
type GetUsersObservableForbidden struct {
AccessControlAllowOrigin string
Payload *devops_models.Error
}
// IsSuccess returns true when this get users observable forbidden response has a 2xx status code
func (o *GetUsersObservableForbidden) IsSuccess() bool {
return false
}
// IsRedirect returns true when this get users observable forbidden response has a 3xx status code
func (o *GetUsersObservableForbidden) IsRedirect() bool {
return false
}
// IsClientError returns true when this get users observable forbidden response has a 4xx status code
func (o *GetUsersObservableForbidden) IsClientError() bool {
return true
}
// IsServerError returns true when this get users observable forbidden response has a 5xx status code
func (o *GetUsersObservableForbidden) IsServerError() bool {
return false
}
// IsCode returns true when this get users observable forbidden response a status code equal to that given
func (o *GetUsersObservableForbidden) IsCode(code int) bool {
return code == 403
}
// Code gets the status code for the get users observable forbidden response
func (o *GetUsersObservableForbidden) Code() int {
return 403
}
func (o *GetUsersObservableForbidden) Error() string {
return fmt.Sprintf("[GET /users/observable][%d] getUsersObservableForbidden %+v", 403, o.Payload)
}
func (o *GetUsersObservableForbidden) String() string {
return fmt.Sprintf("[GET /users/observable][%d] getUsersObservableForbidden %+v", 403, o.Payload)
}
func (o *GetUsersObservableForbidden) GetPayload() *devops_models.Error {
return o.Payload
}
func (o *GetUsersObservableForbidden) 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
}
// NewGetUsersObservableNotFound creates a GetUsersObservableNotFound with default headers values
func NewGetUsersObservableNotFound() *GetUsersObservableNotFound {
return &GetUsersObservableNotFound{}
}
/*
GetUsersObservableNotFound describes a response with status code 404, with default header values.
Resource was not found
*/
type GetUsersObservableNotFound struct {
AccessControlAllowOrigin string
Payload *devops_models.Error
}
// IsSuccess returns true when this get users observable not found response has a 2xx status code
func (o *GetUsersObservableNotFound) IsSuccess() bool {
return false
}
// IsRedirect returns true when this get users observable not found response has a 3xx status code
func (o *GetUsersObservableNotFound) IsRedirect() bool {
return false
}
// IsClientError returns true when this get users observable not found response has a 4xx status code
func (o *GetUsersObservableNotFound) IsClientError() bool {
return true
}
// IsServerError returns true when this get users observable not found response has a 5xx status code
func (o *GetUsersObservableNotFound) IsServerError() bool {
return false
}
// IsCode returns true when this get users observable not found response a status code equal to that given
func (o *GetUsersObservableNotFound) IsCode(code int) bool {
return code == 404
}
// Code gets the status code for the get users observable not found response
func (o *GetUsersObservableNotFound) Code() int {
return 404
}
func (o *GetUsersObservableNotFound) Error() string {
return fmt.Sprintf("[GET /users/observable][%d] getUsersObservableNotFound %+v", 404, o.Payload)
}
func (o *GetUsersObservableNotFound) String() string {
return fmt.Sprintf("[GET /users/observable][%d] getUsersObservableNotFound %+v", 404, o.Payload)
}
func (o *GetUsersObservableNotFound) GetPayload() *devops_models.Error {
return o.Payload
}
func (o *GetUsersObservableNotFound) 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
}
// NewGetUsersObservableUnprocessableEntity creates a GetUsersObservableUnprocessableEntity with default headers values
func NewGetUsersObservableUnprocessableEntity() *GetUsersObservableUnprocessableEntity {
return &GetUsersObservableUnprocessableEntity{}
}
/*
GetUsersObservableUnprocessableEntity describes a response with status code 422, with default header values.
Unprocessable Entity, likely a bad parameter
*/
type GetUsersObservableUnprocessableEntity struct {
AccessControlAllowOrigin string
CacheControl string
Payload *devops_models.Error
}
// IsSuccess returns true when this get users observable unprocessable entity response has a 2xx status code
func (o *GetUsersObservableUnprocessableEntity) IsSuccess() bool {
return false
}
// IsRedirect returns true when this get users observable unprocessable entity response has a 3xx status code
func (o *GetUsersObservableUnprocessableEntity) IsRedirect() bool {
return false
}
// IsClientError returns true when this get users observable unprocessable entity response has a 4xx status code
func (o *GetUsersObservableUnprocessableEntity) IsClientError() bool {
return true
}
// IsServerError returns true when this get users observable unprocessable entity response has a 5xx status code
func (o *GetUsersObservableUnprocessableEntity) IsServerError() bool {
return false
}
// IsCode returns true when this get users observable unprocessable entity response a status code equal to that given
func (o *GetUsersObservableUnprocessableEntity) IsCode(code int) bool {
return code == 422
}
// Code gets the status code for the get users observable unprocessable entity response
func (o *GetUsersObservableUnprocessableEntity) Code() int {
return 422
}
func (o *GetUsersObservableUnprocessableEntity) Error() string {
return fmt.Sprintf("[GET /users/observable][%d] getUsersObservableUnprocessableEntity %+v", 422, o.Payload)
}
func (o *GetUsersObservableUnprocessableEntity) String() string {
return fmt.Sprintf("[GET /users/observable][%d] getUsersObservableUnprocessableEntity %+v", 422, o.Payload)
}
func (o *GetUsersObservableUnprocessableEntity) GetPayload() *devops_models.Error {
return o.Payload
}
func (o *GetUsersObservableUnprocessableEntity) 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
}
// NewGetUsersObservableInternalServerError creates a GetUsersObservableInternalServerError with default headers values
func NewGetUsersObservableInternalServerError() *GetUsersObservableInternalServerError {
return &GetUsersObservableInternalServerError{}
}
/*
GetUsersObservableInternalServerError describes a response with status code 500, with default header values.
Server Internal Error
*/
type GetUsersObservableInternalServerError struct {
AccessControlAllowOrigin string
Payload *devops_models.Error
}
// IsSuccess returns true when this get users observable internal server error response has a 2xx status code
func (o *GetUsersObservableInternalServerError) IsSuccess() bool {
return false
}
// IsRedirect returns true when this get users observable internal server error response has a 3xx status code
func (o *GetUsersObservableInternalServerError) IsRedirect() bool {
return false
}
// IsClientError returns true when this get users observable internal server error response has a 4xx status code
func (o *GetUsersObservableInternalServerError) IsClientError() bool {
return false
}
// IsServerError returns true when this get users observable internal server error response has a 5xx status code
func (o *GetUsersObservableInternalServerError) IsServerError() bool {
return true
}
// IsCode returns true when this get users observable internal server error response a status code equal to that given
func (o *GetUsersObservableInternalServerError) IsCode(code int) bool {
return code == 500
}
// Code gets the status code for the get users observable internal server error response
func (o *GetUsersObservableInternalServerError) Code() int {
return 500
}
func (o *GetUsersObservableInternalServerError) Error() string {
return fmt.Sprintf("[GET /users/observable][%d] getUsersObservableInternalServerError %+v", 500, o.Payload)
}
func (o *GetUsersObservableInternalServerError) String() string {
return fmt.Sprintf("[GET /users/observable][%d] getUsersObservableInternalServerError %+v", 500, o.Payload)
}
func (o *GetUsersObservableInternalServerError) GetPayload() *devops_models.Error {
return o.Payload
}
func (o *GetUsersObservableInternalServerError) 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
}

View File

@ -1,166 +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"
)
// DeleteResponse delete response
//
// swagger:model DeleteResponse
type DeleteResponse struct {
// data
Data []*Message `json:"Data"`
// meta
Meta *ResponseMeta `json:"Meta,omitempty"`
}
// Validate validates this delete response
func (m *DeleteResponse) 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 *DeleteResponse) 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))
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("Data" + "." + strconv.Itoa(i))
}
return err
}
}
}
return nil
}
func (m *DeleteResponse) 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")
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("Meta")
}
return err
}
}
return nil
}
// ContextValidate validate this delete response based on the context it is used
func (m *DeleteResponse) 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 *DeleteResponse) 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))
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("Data" + "." + strconv.Itoa(i))
}
return err
}
}
}
return nil
}
func (m *DeleteResponse) 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")
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("Meta")
}
return err
}
}
return nil
}
// MarshalBinary interface implementation
func (m *DeleteResponse) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *DeleteResponse) UnmarshalBinary(b []byte) error {
var res DeleteResponse
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}

View File

@ -0,0 +1,203 @@
// 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 attendees
// 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 attendees API client.
func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService {
return &Client{transport: transport, formats: formats}
}
/*
Client for attendees 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 {
CreateAttendee(params *CreateAttendeeParams, opts ...ClientOption) (*CreateAttendeeCreated, error)
DeleteAttendee(params *DeleteAttendeeParams, opts ...ClientOption) (*DeleteAttendeeNoContent, error)
GetAttendees(params *GetAttendeesParams, opts ...ClientOption) (*GetAttendeesOK, error)
UpdateAttendee(params *UpdateAttendeeParams, opts ...ClientOption) (*UpdateAttendeeOK, error)
SetTransport(transport runtime.ClientTransport)
}
/*
CreateAttendee creates a new attendee
*/
func (a *Client) CreateAttendee(params *CreateAttendeeParams, opts ...ClientOption) (*CreateAttendeeCreated, error) {
// TODO: Validate the params before sending
if params == nil {
params = NewCreateAttendeeParams()
}
op := &runtime.ClientOperation{
ID: "createAttendee",
Method: "POST",
PathPattern: "/attendees",
ProducesMediaTypes: []string{"application/json"},
ConsumesMediaTypes: []string{"application/json"},
Schemes: []string{"http"},
Params: params,
Reader: &CreateAttendeeReader{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.(*CreateAttendeeCreated)
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 createAttendee: API contract not enforced by server. Client expected to get an error, but got: %T", result)
panic(msg)
}
/*
DeleteAttendee deletes a attendee
*/
func (a *Client) DeleteAttendee(params *DeleteAttendeeParams, opts ...ClientOption) (*DeleteAttendeeNoContent, error) {
// TODO: Validate the params before sending
if params == nil {
params = NewDeleteAttendeeParams()
}
op := &runtime.ClientOperation{
ID: "deleteAttendee",
Method: "DELETE",
PathPattern: "/attendees",
ProducesMediaTypes: []string{"application/json"},
ConsumesMediaTypes: []string{"application/json"},
Schemes: []string{"http"},
Params: params,
Reader: &DeleteAttendeeReader{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.(*DeleteAttendeeNoContent)
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 deleteAttendee: API contract not enforced by server. Client expected to get an error, but got: %T", result)
panic(msg)
}
/*
GetAttendees gets a list of attendees
*/
func (a *Client) GetAttendees(params *GetAttendeesParams, opts ...ClientOption) (*GetAttendeesOK, error) {
// TODO: Validate the params before sending
if params == nil {
params = NewGetAttendeesParams()
}
op := &runtime.ClientOperation{
ID: "getAttendees",
Method: "GET",
PathPattern: "/attendees",
ProducesMediaTypes: []string{"application/json"},
ConsumesMediaTypes: []string{"application/json"},
Schemes: []string{"http"},
Params: params,
Reader: &GetAttendeesReader{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.(*GetAttendeesOK)
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 getAttendees: API contract not enforced by server. Client expected to get an error, but got: %T", result)
panic(msg)
}
/*
UpdateAttendee updates an existing attendee
*/
func (a *Client) UpdateAttendee(params *UpdateAttendeeParams, opts ...ClientOption) (*UpdateAttendeeOK, error) {
// TODO: Validate the params before sending
if params == nil {
params = NewUpdateAttendeeParams()
}
op := &runtime.ClientOperation{
ID: "updateAttendee",
Method: "PUT",
PathPattern: "/attendees",
ProducesMediaTypes: []string{"application/json"},
ConsumesMediaTypes: []string{"application/json"},
Schemes: []string{"http"},
Params: params,
Reader: &UpdateAttendeeReader{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.(*UpdateAttendeeOK)
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 updateAttendee: 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
}

View File

@ -4,7 +4,7 @@
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed
package operations
package attendees
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command

View File

@ -4,7 +4,7 @@
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed
package operations
package attendees
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command

View File

@ -4,7 +4,7 @@
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed
package operations
package attendees
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command

View File

@ -4,7 +4,7 @@
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed
package operations
package attendees
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command

View File

@ -4,7 +4,7 @@
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed
package operations
package attendees
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command

View File

@ -4,7 +4,7 @@
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed
package operations
package attendees
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command

View File

@ -4,7 +4,7 @@
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed
package operations
package attendees
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command

View File

@ -4,7 +4,7 @@
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed
package operations
package attendees
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command

View File

@ -0,0 +1,203 @@
// 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 certificates
// 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 certificates API client.
func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService {
return &Client{transport: transport, formats: formats}
}
/*
Client for certificates 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 {
CreateCertificate(params *CreateCertificateParams, opts ...ClientOption) (*CreateCertificateCreated, error)
DeleteCertificate(params *DeleteCertificateParams, opts ...ClientOption) (*DeleteCertificateNoContent, error)
GetCertificates(params *GetCertificatesParams, opts ...ClientOption) (*GetCertificatesOK, error)
UpdateCertificate(params *UpdateCertificateParams, opts ...ClientOption) (*UpdateCertificateOK, error)
SetTransport(transport runtime.ClientTransport)
}
/*
CreateCertificate creates a new certificate
*/
func (a *Client) CreateCertificate(params *CreateCertificateParams, opts ...ClientOption) (*CreateCertificateCreated, error) {
// TODO: Validate the params before sending
if params == nil {
params = NewCreateCertificateParams()
}
op := &runtime.ClientOperation{
ID: "createCertificate",
Method: "POST",
PathPattern: "/certificates",
ProducesMediaTypes: []string{"application/json"},
ConsumesMediaTypes: []string{"application/json"},
Schemes: []string{"http"},
Params: params,
Reader: &CreateCertificateReader{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.(*CreateCertificateCreated)
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 createCertificate: API contract not enforced by server. Client expected to get an error, but got: %T", result)
panic(msg)
}
/*
DeleteCertificate deletes a certificate
*/
func (a *Client) DeleteCertificate(params *DeleteCertificateParams, opts ...ClientOption) (*DeleteCertificateNoContent, error) {
// TODO: Validate the params before sending
if params == nil {
params = NewDeleteCertificateParams()
}
op := &runtime.ClientOperation{
ID: "deleteCertificate",
Method: "DELETE",
PathPattern: "/certificates",
ProducesMediaTypes: []string{"application/json"},
ConsumesMediaTypes: []string{"application/json"},
Schemes: []string{"http"},
Params: params,
Reader: &DeleteCertificateReader{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.(*DeleteCertificateNoContent)
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 deleteCertificate: API contract not enforced by server. Client expected to get an error, but got: %T", result)
panic(msg)
}
/*
GetCertificates gets a list of certificates
*/
func (a *Client) GetCertificates(params *GetCertificatesParams, opts ...ClientOption) (*GetCertificatesOK, error) {
// TODO: Validate the params before sending
if params == nil {
params = NewGetCertificatesParams()
}
op := &runtime.ClientOperation{
ID: "getCertificates",
Method: "GET",
PathPattern: "/certificates",
ProducesMediaTypes: []string{"application/json"},
ConsumesMediaTypes: []string{"application/json"},
Schemes: []string{"http"},
Params: params,
Reader: &GetCertificatesReader{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.(*GetCertificatesOK)
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 getCertificates: API contract not enforced by server. Client expected to get an error, but got: %T", result)
panic(msg)
}
/*
UpdateCertificate updates an existing certificate
*/
func (a *Client) UpdateCertificate(params *UpdateCertificateParams, opts ...ClientOption) (*UpdateCertificateOK, error) {
// TODO: Validate the params before sending
if params == nil {
params = NewUpdateCertificateParams()
}
op := &runtime.ClientOperation{
ID: "updateCertificate",
Method: "PUT",
PathPattern: "/certificates",
ProducesMediaTypes: []string{"application/json"},
ConsumesMediaTypes: []string{"application/json"},
Schemes: []string{"http"},
Params: params,
Reader: &UpdateCertificateReader{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.(*UpdateCertificateOK)
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 updateCertificate: 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
}

View File

@ -4,7 +4,7 @@
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed
package operations
package certificates
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command

View File

@ -4,7 +4,7 @@
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed
package operations
package certificates
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command

View File

@ -4,7 +4,7 @@
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed
package operations
package certificates
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command

View File

@ -4,7 +4,7 @@
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed
package operations
package certificates
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command

View File

@ -4,7 +4,7 @@
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed
package operations
package certificates
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command

View File

@ -4,7 +4,7 @@
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed
package operations
package certificates
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command

View File

@ -4,7 +4,7 @@
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed
package operations
package certificates
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command

View File

@ -4,7 +4,7 @@
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed
package operations
package certificates
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command

View File

@ -4,7 +4,7 @@
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed
package cluster
package clusters
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
@ -16,13 +16,13 @@ import (
"github.com/go-openapi/strfmt"
)
// New creates a new cluster API client.
// New creates a new clusters API client.
func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService {
return &Client{transport: transport, formats: formats}
}
/*
Client for cluster API
Client for clusters API
*/
type Client struct {
transport runtime.ClientTransport
@ -34,12 +34,8 @@ type ClientOption func(*runtime.ClientOperation)
// ClientService is the interface for Client methods
type ClientService interface {
GetCluster(params *GetClusterParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetClusterOK, error)
GetClusters(params *GetClustersParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetClustersOK, error)
GetClustersObservable(params *GetClustersObservableParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetClustersObservableOK, error)
PostClusters(params *PostClustersParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PostClustersOK, error)
PutClusters(params *PutClustersParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PutClustersOK, error)
@ -47,47 +43,6 @@ type ClientService interface {
SetTransport(transport runtime.ClientTransport)
}
/*
GetCluster gets a single cluster object
Return a single Cluster object from datastore as a Singleton
*/
func (a *Client) GetCluster(params *GetClusterParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetClusterOK, error) {
// TODO: Validate the params before sending
if params == nil {
params = NewGetClusterParams()
}
op := &runtime.ClientOperation{
ID: "getCluster",
Method: "GET",
PathPattern: "/clusters/{clusterIdPath}",
ProducesMediaTypes: []string{"application/json"},
ConsumesMediaTypes: []string{"application/json"},
Schemes: []string{"http"},
Params: params,
Reader: &GetClusterReader{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.(*GetClusterOK)
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 getCluster: API contract not enforced by server. Client expected to get an error, but got: %T", result)
panic(msg)
}
/*
GetClusters gets a list clusters
@ -129,47 +84,6 @@ func (a *Client) GetClusters(params *GetClustersParams, authInfo runtime.ClientA
panic(msg)
}
/*
GetClustersObservable gets clusters in an observable array
Returns a Cluster retrieval in a observable array
*/
func (a *Client) GetClustersObservable(params *GetClustersObservableParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetClustersObservableOK, error) {
// TODO: Validate the params before sending
if params == nil {
params = NewGetClustersObservableParams()
}
op := &runtime.ClientOperation{
ID: "getClustersObservable",
Method: "GET",
PathPattern: "/clusters/observable",
ProducesMediaTypes: []string{"application/json"},
ConsumesMediaTypes: []string{"application/json"},
Schemes: []string{"http"},
Params: params,
Reader: &GetClustersObservableReader{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.(*GetClustersObservableOK)
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 getClustersObservable: API contract not enforced by server. Client expected to get an error, but got: %T", result)
panic(msg)
}
/*
PostClusters creates new clusters

View File

@ -4,7 +4,7 @@
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed
package cluster
package clusters
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
@ -72,12 +72,6 @@ type GetClustersParams struct {
*/
ClusterID *string
/* CompanyID.
Record Id of a Company
*/
CompanyID *string
/* Limit.
How many objects to return at one time
@ -88,7 +82,7 @@ type GetClustersParams struct {
/* Offset.
How many objects to skip? (default 0)
How many objects to skip?
Format: int64
*/
@ -158,17 +152,6 @@ func (o *GetClustersParams) SetClusterID(clusterID *string) {
o.ClusterID = clusterID
}
// WithCompanyID adds the companyID to the get clusters params
func (o *GetClustersParams) WithCompanyID(companyID *string) *GetClustersParams {
o.SetCompanyID(companyID)
return o
}
// SetCompanyID adds the companyId to the get clusters params
func (o *GetClustersParams) SetCompanyID(companyID *string) {
o.CompanyID = companyID
}
// WithLimit adds the limit to the get clusters params
func (o *GetClustersParams) WithLimit(limit *int64) *GetClustersParams {
o.SetLimit(limit)
@ -216,23 +199,6 @@ func (o *GetClustersParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.R
}
}
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.Limit != nil {
// query param limit

View File

@ -4,7 +4,7 @@
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed
package cluster
package clusters
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
@ -16,7 +16,7 @@ import (
"github.com/go-openapi/runtime"
"github.com/go-openapi/strfmt"
"code.tnxs.net/vernonkeenan/lib/api/devops/devops_models"
"code.tnxs.net/vernonkeenan/lib/api/members/members_models"
)
// GetClustersReader is a Reader for the GetClusters structure.
@ -82,7 +82,7 @@ type GetClustersOK struct {
AccessControlAllowOrigin string
CacheControl string
Payload *devops_models.ClusterResponse
Payload *members_models.ClusterResponse
}
// IsSuccess returns true when this get clusters o k response has a 2xx status code
@ -123,7 +123,7 @@ func (o *GetClustersOK) String() string {
return fmt.Sprintf("[GET /clusters][%d] getClustersOK %+v", 200, o.Payload)
}
func (o *GetClustersOK) GetPayload() *devops_models.ClusterResponse {
func (o *GetClustersOK) GetPayload() *members_models.ClusterResponse {
return o.Payload
}
@ -143,7 +143,7 @@ func (o *GetClustersOK) readResponse(response runtime.ClientResponse, consumer r
o.CacheControl = hdrCacheControl
}
o.Payload = new(devops_models.ClusterResponse)
o.Payload = new(members_models.ClusterResponse)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
@ -167,7 +167,7 @@ type GetClustersUnauthorized struct {
AccessControlAllowOrigin string
CacheControl string
Payload *devops_models.Error
Payload *members_models.Error
}
// IsSuccess returns true when this get clusters unauthorized response has a 2xx status code
@ -208,7 +208,7 @@ func (o *GetClustersUnauthorized) String() string {
return fmt.Sprintf("[GET /clusters][%d] getClustersUnauthorized %+v", 401, o.Payload)
}
func (o *GetClustersUnauthorized) GetPayload() *devops_models.Error {
func (o *GetClustersUnauthorized) GetPayload() *members_models.Error {
return o.Payload
}
@ -228,7 +228,7 @@ func (o *GetClustersUnauthorized) readResponse(response runtime.ClientResponse,
o.CacheControl = hdrCacheControl
}
o.Payload = new(devops_models.Error)
o.Payload = new(members_models.Error)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
@ -251,7 +251,7 @@ Access forbidden, account lacks access
type GetClustersForbidden struct {
AccessControlAllowOrigin string
Payload *devops_models.Error
Payload *members_models.Error
}
// IsSuccess returns true when this get clusters forbidden response has a 2xx status code
@ -292,7 +292,7 @@ func (o *GetClustersForbidden) String() string {
return fmt.Sprintf("[GET /clusters][%d] getClustersForbidden %+v", 403, o.Payload)
}
func (o *GetClustersForbidden) GetPayload() *devops_models.Error {
func (o *GetClustersForbidden) GetPayload() *members_models.Error {
return o.Payload
}
@ -305,7 +305,7 @@ func (o *GetClustersForbidden) readResponse(response runtime.ClientResponse, con
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
}
o.Payload = new(devops_models.Error)
o.Payload = new(members_models.Error)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
@ -328,7 +328,7 @@ Resource was not found
type GetClustersNotFound struct {
AccessControlAllowOrigin string
Payload *devops_models.Error
Payload *members_models.Error
}
// IsSuccess returns true when this get clusters not found response has a 2xx status code
@ -369,7 +369,7 @@ func (o *GetClustersNotFound) String() string {
return fmt.Sprintf("[GET /clusters][%d] getClustersNotFound %+v", 404, o.Payload)
}
func (o *GetClustersNotFound) GetPayload() *devops_models.Error {
func (o *GetClustersNotFound) GetPayload() *members_models.Error {
return o.Payload
}
@ -382,7 +382,7 @@ func (o *GetClustersNotFound) readResponse(response runtime.ClientResponse, cons
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
}
o.Payload = new(devops_models.Error)
o.Payload = new(members_models.Error)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
@ -406,7 +406,7 @@ type GetClustersUnprocessableEntity struct {
AccessControlAllowOrigin string
CacheControl string
Payload *devops_models.Error
Payload *members_models.Error
}
// IsSuccess returns true when this get clusters unprocessable entity response has a 2xx status code
@ -447,7 +447,7 @@ func (o *GetClustersUnprocessableEntity) String() string {
return fmt.Sprintf("[GET /clusters][%d] getClustersUnprocessableEntity %+v", 422, o.Payload)
}
func (o *GetClustersUnprocessableEntity) GetPayload() *devops_models.Error {
func (o *GetClustersUnprocessableEntity) GetPayload() *members_models.Error {
return o.Payload
}
@ -467,7 +467,7 @@ func (o *GetClustersUnprocessableEntity) readResponse(response runtime.ClientRes
o.CacheControl = hdrCacheControl
}
o.Payload = new(devops_models.Error)
o.Payload = new(members_models.Error)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
@ -490,7 +490,7 @@ Server Internal Error
type GetClustersInternalServerError struct {
AccessControlAllowOrigin string
Payload *devops_models.Error
Payload *members_models.Error
}
// IsSuccess returns true when this get clusters internal server error response has a 2xx status code
@ -531,7 +531,7 @@ func (o *GetClustersInternalServerError) String() string {
return fmt.Sprintf("[GET /clusters][%d] getClustersInternalServerError %+v", 500, o.Payload)
}
func (o *GetClustersInternalServerError) GetPayload() *devops_models.Error {
func (o *GetClustersInternalServerError) GetPayload() *members_models.Error {
return o.Payload
}
@ -544,7 +544,7 @@ func (o *GetClustersInternalServerError) readResponse(response runtime.ClientRes
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
}
o.Payload = new(devops_models.Error)
o.Payload = new(members_models.Error)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {

View File

@ -4,7 +4,7 @@
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed
package cluster
package clusters
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
@ -19,7 +19,7 @@ import (
cr "github.com/go-openapi/runtime/client"
"github.com/go-openapi/strfmt"
"code.tnxs.net/vernonkeenan/lib/api/devops/devops_models"
"code.tnxs.net/vernonkeenan/lib/api/members/members_models"
)
// NewPostClustersParams creates a new PostClustersParams object,
@ -71,7 +71,7 @@ type PostClustersParams struct {
An array of Cluster records
*/
ClusterRequest *devops_models.ClusterRequest
ClusterRequest *members_models.ClusterRequest
timeout time.Duration
Context context.Context
@ -127,13 +127,13 @@ func (o *PostClustersParams) SetHTTPClient(client *http.Client) {
}
// WithClusterRequest adds the clusterRequest to the post clusters params
func (o *PostClustersParams) WithClusterRequest(clusterRequest *devops_models.ClusterRequest) *PostClustersParams {
func (o *PostClustersParams) WithClusterRequest(clusterRequest *members_models.ClusterRequest) *PostClustersParams {
o.SetClusterRequest(clusterRequest)
return o
}
// SetClusterRequest adds the clusterRequest to the post clusters params
func (o *PostClustersParams) SetClusterRequest(clusterRequest *devops_models.ClusterRequest) {
func (o *PostClustersParams) SetClusterRequest(clusterRequest *members_models.ClusterRequest) {
o.ClusterRequest = clusterRequest
}

View File

@ -4,7 +4,7 @@
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed
package cluster
package clusters
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
@ -16,7 +16,7 @@ import (
"github.com/go-openapi/runtime"
"github.com/go-openapi/strfmt"
"code.tnxs.net/vernonkeenan/lib/api/devops/devops_models"
"code.tnxs.net/vernonkeenan/lib/api/members/members_models"
)
// PostClustersReader is a Reader for the PostClusters structure.
@ -82,7 +82,7 @@ type PostClustersOK struct {
AccessControlAllowOrigin string
CacheControl string
Payload *devops_models.ClusterResponse
Payload *members_models.ClusterResponse
}
// IsSuccess returns true when this post clusters o k response has a 2xx status code
@ -123,7 +123,7 @@ func (o *PostClustersOK) String() string {
return fmt.Sprintf("[POST /clusters][%d] postClustersOK %+v", 200, o.Payload)
}
func (o *PostClustersOK) GetPayload() *devops_models.ClusterResponse {
func (o *PostClustersOK) GetPayload() *members_models.ClusterResponse {
return o.Payload
}
@ -143,7 +143,7 @@ func (o *PostClustersOK) readResponse(response runtime.ClientResponse, consumer
o.CacheControl = hdrCacheControl
}
o.Payload = new(devops_models.ClusterResponse)
o.Payload = new(members_models.ClusterResponse)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
@ -167,7 +167,7 @@ type PostClustersUnauthorized struct {
AccessControlAllowOrigin string
CacheControl string
Payload *devops_models.Error
Payload *members_models.Error
}
// IsSuccess returns true when this post clusters unauthorized response has a 2xx status code
@ -208,7 +208,7 @@ func (o *PostClustersUnauthorized) String() string {
return fmt.Sprintf("[POST /clusters][%d] postClustersUnauthorized %+v", 401, o.Payload)
}
func (o *PostClustersUnauthorized) GetPayload() *devops_models.Error {
func (o *PostClustersUnauthorized) GetPayload() *members_models.Error {
return o.Payload
}
@ -228,7 +228,7 @@ func (o *PostClustersUnauthorized) readResponse(response runtime.ClientResponse,
o.CacheControl = hdrCacheControl
}
o.Payload = new(devops_models.Error)
o.Payload = new(members_models.Error)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
@ -251,7 +251,7 @@ Access forbidden, account lacks access
type PostClustersForbidden struct {
AccessControlAllowOrigin string
Payload *devops_models.Error
Payload *members_models.Error
}
// IsSuccess returns true when this post clusters forbidden response has a 2xx status code
@ -292,7 +292,7 @@ func (o *PostClustersForbidden) String() string {
return fmt.Sprintf("[POST /clusters][%d] postClustersForbidden %+v", 403, o.Payload)
}
func (o *PostClustersForbidden) GetPayload() *devops_models.Error {
func (o *PostClustersForbidden) GetPayload() *members_models.Error {
return o.Payload
}
@ -305,7 +305,7 @@ func (o *PostClustersForbidden) readResponse(response runtime.ClientResponse, co
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
}
o.Payload = new(devops_models.Error)
o.Payload = new(members_models.Error)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
@ -328,7 +328,7 @@ Resource was not found
type PostClustersNotFound struct {
AccessControlAllowOrigin string
Payload *devops_models.Error
Payload *members_models.Error
}
// IsSuccess returns true when this post clusters not found response has a 2xx status code
@ -369,7 +369,7 @@ func (o *PostClustersNotFound) String() string {
return fmt.Sprintf("[POST /clusters][%d] postClustersNotFound %+v", 404, o.Payload)
}
func (o *PostClustersNotFound) GetPayload() *devops_models.Error {
func (o *PostClustersNotFound) GetPayload() *members_models.Error {
return o.Payload
}
@ -382,7 +382,7 @@ func (o *PostClustersNotFound) readResponse(response runtime.ClientResponse, con
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
}
o.Payload = new(devops_models.Error)
o.Payload = new(members_models.Error)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
@ -406,7 +406,7 @@ type PostClustersUnprocessableEntity struct {
AccessControlAllowOrigin string
CacheControl string
Payload *devops_models.Error
Payload *members_models.Error
}
// IsSuccess returns true when this post clusters unprocessable entity response has a 2xx status code
@ -447,7 +447,7 @@ func (o *PostClustersUnprocessableEntity) String() string {
return fmt.Sprintf("[POST /clusters][%d] postClustersUnprocessableEntity %+v", 422, o.Payload)
}
func (o *PostClustersUnprocessableEntity) GetPayload() *devops_models.Error {
func (o *PostClustersUnprocessableEntity) GetPayload() *members_models.Error {
return o.Payload
}
@ -467,7 +467,7 @@ func (o *PostClustersUnprocessableEntity) readResponse(response runtime.ClientRe
o.CacheControl = hdrCacheControl
}
o.Payload = new(devops_models.Error)
o.Payload = new(members_models.Error)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
@ -490,7 +490,7 @@ Server Internal Error
type PostClustersInternalServerError struct {
AccessControlAllowOrigin string
Payload *devops_models.Error
Payload *members_models.Error
}
// IsSuccess returns true when this post clusters internal server error response has a 2xx status code
@ -531,7 +531,7 @@ func (o *PostClustersInternalServerError) String() string {
return fmt.Sprintf("[POST /clusters][%d] postClustersInternalServerError %+v", 500, o.Payload)
}
func (o *PostClustersInternalServerError) GetPayload() *devops_models.Error {
func (o *PostClustersInternalServerError) GetPayload() *members_models.Error {
return o.Payload
}
@ -544,7 +544,7 @@ func (o *PostClustersInternalServerError) readResponse(response runtime.ClientRe
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
}
o.Payload = new(devops_models.Error)
o.Payload = new(members_models.Error)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {

View File

@ -4,7 +4,7 @@
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed
package cluster
package clusters
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
@ -19,7 +19,7 @@ import (
cr "github.com/go-openapi/runtime/client"
"github.com/go-openapi/strfmt"
"code.tnxs.net/vernonkeenan/lib/api/devops/devops_models"
"code.tnxs.net/vernonkeenan/lib/api/members/members_models"
)
// NewPutClustersParams creates a new PutClustersParams object,
@ -71,7 +71,7 @@ type PutClustersParams struct {
An array of Cluster records
*/
ClusterRequest *devops_models.ClusterRequest
ClusterRequest *members_models.ClusterRequest
timeout time.Duration
Context context.Context
@ -127,13 +127,13 @@ func (o *PutClustersParams) SetHTTPClient(client *http.Client) {
}
// WithClusterRequest adds the clusterRequest to the put clusters params
func (o *PutClustersParams) WithClusterRequest(clusterRequest *devops_models.ClusterRequest) *PutClustersParams {
func (o *PutClustersParams) WithClusterRequest(clusterRequest *members_models.ClusterRequest) *PutClustersParams {
o.SetClusterRequest(clusterRequest)
return o
}
// SetClusterRequest adds the clusterRequest to the put clusters params
func (o *PutClustersParams) SetClusterRequest(clusterRequest *devops_models.ClusterRequest) {
func (o *PutClustersParams) SetClusterRequest(clusterRequest *members_models.ClusterRequest) {
o.ClusterRequest = clusterRequest
}

View File

@ -4,7 +4,7 @@
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed
package cluster
package clusters
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
@ -16,7 +16,7 @@ import (
"github.com/go-openapi/runtime"
"github.com/go-openapi/strfmt"
"code.tnxs.net/vernonkeenan/lib/api/devops/devops_models"
"code.tnxs.net/vernonkeenan/lib/api/members/members_models"
)
// PutClustersReader is a Reader for the PutClusters structure.
@ -82,7 +82,7 @@ type PutClustersOK struct {
AccessControlAllowOrigin string
CacheControl string
Payload *devops_models.ClusterResponse
Payload *members_models.ClusterResponse
}
// IsSuccess returns true when this put clusters o k response has a 2xx status code
@ -123,7 +123,7 @@ func (o *PutClustersOK) String() string {
return fmt.Sprintf("[PUT /clusters][%d] putClustersOK %+v", 200, o.Payload)
}
func (o *PutClustersOK) GetPayload() *devops_models.ClusterResponse {
func (o *PutClustersOK) GetPayload() *members_models.ClusterResponse {
return o.Payload
}
@ -143,7 +143,7 @@ func (o *PutClustersOK) readResponse(response runtime.ClientResponse, consumer r
o.CacheControl = hdrCacheControl
}
o.Payload = new(devops_models.ClusterResponse)
o.Payload = new(members_models.ClusterResponse)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
@ -167,7 +167,7 @@ type PutClustersUnauthorized struct {
AccessControlAllowOrigin string
CacheControl string
Payload *devops_models.Error
Payload *members_models.Error
}
// IsSuccess returns true when this put clusters unauthorized response has a 2xx status code
@ -208,7 +208,7 @@ func (o *PutClustersUnauthorized) String() string {
return fmt.Sprintf("[PUT /clusters][%d] putClustersUnauthorized %+v", 401, o.Payload)
}
func (o *PutClustersUnauthorized) GetPayload() *devops_models.Error {
func (o *PutClustersUnauthorized) GetPayload() *members_models.Error {
return o.Payload
}
@ -228,7 +228,7 @@ func (o *PutClustersUnauthorized) readResponse(response runtime.ClientResponse,
o.CacheControl = hdrCacheControl
}
o.Payload = new(devops_models.Error)
o.Payload = new(members_models.Error)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
@ -251,7 +251,7 @@ Access forbidden, account lacks access
type PutClustersForbidden struct {
AccessControlAllowOrigin string
Payload *devops_models.Error
Payload *members_models.Error
}
// IsSuccess returns true when this put clusters forbidden response has a 2xx status code
@ -292,7 +292,7 @@ func (o *PutClustersForbidden) String() string {
return fmt.Sprintf("[PUT /clusters][%d] putClustersForbidden %+v", 403, o.Payload)
}
func (o *PutClustersForbidden) GetPayload() *devops_models.Error {
func (o *PutClustersForbidden) GetPayload() *members_models.Error {
return o.Payload
}
@ -305,7 +305,7 @@ func (o *PutClustersForbidden) readResponse(response runtime.ClientResponse, con
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
}
o.Payload = new(devops_models.Error)
o.Payload = new(members_models.Error)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
@ -328,7 +328,7 @@ Resource was not found
type PutClustersNotFound struct {
AccessControlAllowOrigin string
Payload *devops_models.Error
Payload *members_models.Error
}
// IsSuccess returns true when this put clusters not found response has a 2xx status code
@ -369,7 +369,7 @@ func (o *PutClustersNotFound) String() string {
return fmt.Sprintf("[PUT /clusters][%d] putClustersNotFound %+v", 404, o.Payload)
}
func (o *PutClustersNotFound) GetPayload() *devops_models.Error {
func (o *PutClustersNotFound) GetPayload() *members_models.Error {
return o.Payload
}
@ -382,7 +382,7 @@ func (o *PutClustersNotFound) readResponse(response runtime.ClientResponse, cons
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
}
o.Payload = new(devops_models.Error)
o.Payload = new(members_models.Error)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
@ -406,7 +406,7 @@ type PutClustersUnprocessableEntity struct {
AccessControlAllowOrigin string
CacheControl string
Payload *devops_models.Error
Payload *members_models.Error
}
// IsSuccess returns true when this put clusters unprocessable entity response has a 2xx status code
@ -447,7 +447,7 @@ func (o *PutClustersUnprocessableEntity) String() string {
return fmt.Sprintf("[PUT /clusters][%d] putClustersUnprocessableEntity %+v", 422, o.Payload)
}
func (o *PutClustersUnprocessableEntity) GetPayload() *devops_models.Error {
func (o *PutClustersUnprocessableEntity) GetPayload() *members_models.Error {
return o.Payload
}
@ -467,7 +467,7 @@ func (o *PutClustersUnprocessableEntity) readResponse(response runtime.ClientRes
o.CacheControl = hdrCacheControl
}
o.Payload = new(devops_models.Error)
o.Payload = new(members_models.Error)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
@ -490,7 +490,7 @@ Server Internal Error
type PutClustersInternalServerError struct {
AccessControlAllowOrigin string
Payload *devops_models.Error
Payload *members_models.Error
}
// IsSuccess returns true when this put clusters internal server error response has a 2xx status code
@ -531,7 +531,7 @@ func (o *PutClustersInternalServerError) String() string {
return fmt.Sprintf("[PUT /clusters][%d] putClustersInternalServerError %+v", 500, o.Payload)
}
func (o *PutClustersInternalServerError) GetPayload() *devops_models.Error {
func (o *PutClustersInternalServerError) GetPayload() *members_models.Error {
return o.Payload
}
@ -544,7 +544,7 @@ func (o *PutClustersInternalServerError) readResponse(response runtime.ClientRes
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
}
o.Payload = new(devops_models.Error)
o.Payload = new(members_models.Error)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {

View File

@ -0,0 +1,203 @@
// 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 course_lessons
// 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 course lessons API client.
func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService {
return &Client{transport: transport, formats: formats}
}
/*
Client for course lessons 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 {
CreateCourseLesson(params *CreateCourseLessonParams, opts ...ClientOption) (*CreateCourseLessonCreated, error)
DeleteCourseLesson(params *DeleteCourseLessonParams, opts ...ClientOption) (*DeleteCourseLessonNoContent, error)
GetCourseLessons(params *GetCourseLessonsParams, opts ...ClientOption) (*GetCourseLessonsOK, error)
UpdateCourseLesson(params *UpdateCourseLessonParams, opts ...ClientOption) (*UpdateCourseLessonOK, error)
SetTransport(transport runtime.ClientTransport)
}
/*
CreateCourseLesson creates a new course lesson
*/
func (a *Client) CreateCourseLesson(params *CreateCourseLessonParams, opts ...ClientOption) (*CreateCourseLessonCreated, error) {
// TODO: Validate the params before sending
if params == nil {
params = NewCreateCourseLessonParams()
}
op := &runtime.ClientOperation{
ID: "createCourseLesson",
Method: "POST",
PathPattern: "/courselessons",
ProducesMediaTypes: []string{"application/json"},
ConsumesMediaTypes: []string{"application/json"},
Schemes: []string{"http"},
Params: params,
Reader: &CreateCourseLessonReader{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.(*CreateCourseLessonCreated)
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 createCourseLesson: API contract not enforced by server. Client expected to get an error, but got: %T", result)
panic(msg)
}
/*
DeleteCourseLesson deletes a course lesson
*/
func (a *Client) DeleteCourseLesson(params *DeleteCourseLessonParams, opts ...ClientOption) (*DeleteCourseLessonNoContent, error) {
// TODO: Validate the params before sending
if params == nil {
params = NewDeleteCourseLessonParams()
}
op := &runtime.ClientOperation{
ID: "deleteCourseLesson",
Method: "DELETE",
PathPattern: "/courselessons",
ProducesMediaTypes: []string{"application/json"},
ConsumesMediaTypes: []string{"application/json"},
Schemes: []string{"http"},
Params: params,
Reader: &DeleteCourseLessonReader{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.(*DeleteCourseLessonNoContent)
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 deleteCourseLesson: API contract not enforced by server. Client expected to get an error, but got: %T", result)
panic(msg)
}
/*
GetCourseLessons gets a list of course lessons
*/
func (a *Client) GetCourseLessons(params *GetCourseLessonsParams, opts ...ClientOption) (*GetCourseLessonsOK, error) {
// TODO: Validate the params before sending
if params == nil {
params = NewGetCourseLessonsParams()
}
op := &runtime.ClientOperation{
ID: "getCourseLessons",
Method: "GET",
PathPattern: "/courselessons",
ProducesMediaTypes: []string{"application/json"},
ConsumesMediaTypes: []string{"application/json"},
Schemes: []string{"http"},
Params: params,
Reader: &GetCourseLessonsReader{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.(*GetCourseLessonsOK)
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 getCourseLessons: API contract not enforced by server. Client expected to get an error, but got: %T", result)
panic(msg)
}
/*
UpdateCourseLesson updates an existing course lesson
*/
func (a *Client) UpdateCourseLesson(params *UpdateCourseLessonParams, opts ...ClientOption) (*UpdateCourseLessonOK, error) {
// TODO: Validate the params before sending
if params == nil {
params = NewUpdateCourseLessonParams()
}
op := &runtime.ClientOperation{
ID: "updateCourseLesson",
Method: "PUT",
PathPattern: "/courselessons",
ProducesMediaTypes: []string{"application/json"},
ConsumesMediaTypes: []string{"application/json"},
Schemes: []string{"http"},
Params: params,
Reader: &UpdateCourseLessonReader{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.(*UpdateCourseLessonOK)
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 updateCourseLesson: 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
}

View File

@ -4,7 +4,7 @@
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed
package operations
package course_lessons
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command

View File

@ -4,7 +4,7 @@
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed
package operations
package course_lessons
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command

View File

@ -4,7 +4,7 @@
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed
package operations
package course_lessons
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command

View File

@ -4,7 +4,7 @@
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed
package operations
package course_lessons
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command

View File

@ -4,7 +4,7 @@
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed
package operations
package course_lessons
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command

View File

@ -4,7 +4,7 @@
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed
package operations
package course_lessons
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command

View File

@ -4,7 +4,7 @@
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed
package operations
package course_lessons
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command

View File

@ -4,7 +4,7 @@
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed
package operations
package course_lessons
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command

View File

@ -0,0 +1,203 @@
// 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 course_sections
// 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 course sections API client.
func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService {
return &Client{transport: transport, formats: formats}
}
/*
Client for course sections 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 {
CreateCourseSection(params *CreateCourseSectionParams, opts ...ClientOption) (*CreateCourseSectionCreated, error)
DeleteCourseSection(params *DeleteCourseSectionParams, opts ...ClientOption) (*DeleteCourseSectionNoContent, error)
GetCourseSections(params *GetCourseSectionsParams, opts ...ClientOption) (*GetCourseSectionsOK, error)
UpdateCourseSection(params *UpdateCourseSectionParams, opts ...ClientOption) (*UpdateCourseSectionOK, error)
SetTransport(transport runtime.ClientTransport)
}
/*
CreateCourseSection creates a new course section
*/
func (a *Client) CreateCourseSection(params *CreateCourseSectionParams, opts ...ClientOption) (*CreateCourseSectionCreated, error) {
// TODO: Validate the params before sending
if params == nil {
params = NewCreateCourseSectionParams()
}
op := &runtime.ClientOperation{
ID: "createCourseSection",
Method: "POST",
PathPattern: "/coursesections",
ProducesMediaTypes: []string{"application/json"},
ConsumesMediaTypes: []string{"application/json"},
Schemes: []string{"http"},
Params: params,
Reader: &CreateCourseSectionReader{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.(*CreateCourseSectionCreated)
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 createCourseSection: API contract not enforced by server. Client expected to get an error, but got: %T", result)
panic(msg)
}
/*
DeleteCourseSection deletes a course section
*/
func (a *Client) DeleteCourseSection(params *DeleteCourseSectionParams, opts ...ClientOption) (*DeleteCourseSectionNoContent, error) {
// TODO: Validate the params before sending
if params == nil {
params = NewDeleteCourseSectionParams()
}
op := &runtime.ClientOperation{
ID: "deleteCourseSection",
Method: "DELETE",
PathPattern: "/coursesections",
ProducesMediaTypes: []string{"application/json"},
ConsumesMediaTypes: []string{"application/json"},
Schemes: []string{"http"},
Params: params,
Reader: &DeleteCourseSectionReader{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.(*DeleteCourseSectionNoContent)
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 deleteCourseSection: API contract not enforced by server. Client expected to get an error, but got: %T", result)
panic(msg)
}
/*
GetCourseSections gets a list of course sections
*/
func (a *Client) GetCourseSections(params *GetCourseSectionsParams, opts ...ClientOption) (*GetCourseSectionsOK, error) {
// TODO: Validate the params before sending
if params == nil {
params = NewGetCourseSectionsParams()
}
op := &runtime.ClientOperation{
ID: "getCourseSections",
Method: "GET",
PathPattern: "/coursesections",
ProducesMediaTypes: []string{"application/json"},
ConsumesMediaTypes: []string{"application/json"},
Schemes: []string{"http"},
Params: params,
Reader: &GetCourseSectionsReader{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.(*GetCourseSectionsOK)
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 getCourseSections: API contract not enforced by server. Client expected to get an error, but got: %T", result)
panic(msg)
}
/*
UpdateCourseSection updates an existing course section
*/
func (a *Client) UpdateCourseSection(params *UpdateCourseSectionParams, opts ...ClientOption) (*UpdateCourseSectionOK, error) {
// TODO: Validate the params before sending
if params == nil {
params = NewUpdateCourseSectionParams()
}
op := &runtime.ClientOperation{
ID: "updateCourseSection",
Method: "PUT",
PathPattern: "/coursesections",
ProducesMediaTypes: []string{"application/json"},
ConsumesMediaTypes: []string{"application/json"},
Schemes: []string{"http"},
Params: params,
Reader: &UpdateCourseSectionReader{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.(*UpdateCourseSectionOK)
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 updateCourseSection: 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
}

View File

@ -4,7 +4,7 @@
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed
package operations
package course_sections
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command

View File

@ -4,7 +4,7 @@
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed
package operations
package course_sections
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command

View File

@ -4,7 +4,7 @@
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed
package operations
package course_sections
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command

View File

@ -4,7 +4,7 @@
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed
package operations
package course_sections
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command

View File

@ -4,7 +4,7 @@
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed
package operations
package course_sections
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command

View File

@ -4,7 +4,7 @@
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed
package operations
package course_sections
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command

View File

@ -4,7 +4,7 @@
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed
package operations
package course_sections
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command

View File

@ -4,7 +4,7 @@
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed
package operations
package course_sections
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command

View File

@ -0,0 +1,203 @@
// 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 courses
// 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 courses API client.
func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService {
return &Client{transport: transport, formats: formats}
}
/*
Client for courses 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 {
CreateCourse(params *CreateCourseParams, opts ...ClientOption) (*CreateCourseCreated, error)
DeleteCourse(params *DeleteCourseParams, opts ...ClientOption) (*DeleteCourseNoContent, error)
GetCourses(params *GetCoursesParams, opts ...ClientOption) (*GetCoursesOK, error)
UpdateCourse(params *UpdateCourseParams, opts ...ClientOption) (*UpdateCourseOK, error)
SetTransport(transport runtime.ClientTransport)
}
/*
CreateCourse creates a new course
*/
func (a *Client) CreateCourse(params *CreateCourseParams, opts ...ClientOption) (*CreateCourseCreated, error) {
// TODO: Validate the params before sending
if params == nil {
params = NewCreateCourseParams()
}
op := &runtime.ClientOperation{
ID: "createCourse",
Method: "POST",
PathPattern: "/courses",
ProducesMediaTypes: []string{"application/json"},
ConsumesMediaTypes: []string{"application/json"},
Schemes: []string{"http"},
Params: params,
Reader: &CreateCourseReader{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.(*CreateCourseCreated)
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 createCourse: API contract not enforced by server. Client expected to get an error, but got: %T", result)
panic(msg)
}
/*
DeleteCourse deletes a course
*/
func (a *Client) DeleteCourse(params *DeleteCourseParams, opts ...ClientOption) (*DeleteCourseNoContent, error) {
// TODO: Validate the params before sending
if params == nil {
params = NewDeleteCourseParams()
}
op := &runtime.ClientOperation{
ID: "deleteCourse",
Method: "DELETE",
PathPattern: "/courses",
ProducesMediaTypes: []string{"application/json"},
ConsumesMediaTypes: []string{"application/json"},
Schemes: []string{"http"},
Params: params,
Reader: &DeleteCourseReader{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.(*DeleteCourseNoContent)
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 deleteCourse: API contract not enforced by server. Client expected to get an error, but got: %T", result)
panic(msg)
}
/*
GetCourses gets a list of courses
*/
func (a *Client) GetCourses(params *GetCoursesParams, opts ...ClientOption) (*GetCoursesOK, error) {
// TODO: Validate the params before sending
if params == nil {
params = NewGetCoursesParams()
}
op := &runtime.ClientOperation{
ID: "getCourses",
Method: "GET",
PathPattern: "/courses",
ProducesMediaTypes: []string{"application/json"},
ConsumesMediaTypes: []string{"application/json"},
Schemes: []string{"http"},
Params: params,
Reader: &GetCoursesReader{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.(*GetCoursesOK)
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 getCourses: API contract not enforced by server. Client expected to get an error, but got: %T", result)
panic(msg)
}
/*
UpdateCourse updates an existing course
*/
func (a *Client) UpdateCourse(params *UpdateCourseParams, opts ...ClientOption) (*UpdateCourseOK, error) {
// TODO: Validate the params before sending
if params == nil {
params = NewUpdateCourseParams()
}
op := &runtime.ClientOperation{
ID: "updateCourse",
Method: "PUT",
PathPattern: "/courses",
ProducesMediaTypes: []string{"application/json"},
ConsumesMediaTypes: []string{"application/json"},
Schemes: []string{"http"},
Params: params,
Reader: &UpdateCourseReader{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.(*UpdateCourseOK)
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 updateCourse: 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
}

View File

@ -4,7 +4,7 @@
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed
package operations
package courses
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command

View File

@ -4,7 +4,7 @@
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed
package operations
package courses
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command

View File

@ -4,7 +4,7 @@
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed
package operations
package courses
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command

View File

@ -4,7 +4,7 @@
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed
package operations
package courses
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command

View File

@ -4,7 +4,7 @@
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed
package operations
package courses
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command

View File

@ -4,7 +4,7 @@
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed
package operations
package courses
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command

View File

@ -4,7 +4,7 @@
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed
package operations
package courses
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command

View File

@ -4,7 +4,7 @@
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed
package operations
package courses
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command

View File

@ -4,7 +4,7 @@
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed
package database
package databases
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
@ -16,13 +16,13 @@ import (
"github.com/go-openapi/strfmt"
)
// New creates a new database API client.
// New creates a new databases API client.
func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService {
return &Client{transport: transport, formats: formats}
}
/*
Client for database API
Client for databases API
*/
type Client struct {
transport runtime.ClientTransport
@ -34,12 +34,8 @@ type ClientOption func(*runtime.ClientOperation)
// ClientService is the interface for Client methods
type ClientService interface {
GetDatabase(params *GetDatabaseParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetDatabaseOK, error)
GetDatabases(params *GetDatabasesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetDatabasesOK, error)
GetDatabasesObservable(params *GetDatabasesObservableParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetDatabasesObservableOK, error)
PostDatabases(params *PostDatabasesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PostDatabasesOK, error)
PutDatabases(params *PutDatabasesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PutDatabasesOK, error)
@ -47,47 +43,6 @@ type ClientService interface {
SetTransport(transport runtime.ClientTransport)
}
/*
GetDatabase gets a single database object
Return a single Database object from datastore as a Singleton
*/
func (a *Client) GetDatabase(params *GetDatabaseParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetDatabaseOK, error) {
// TODO: Validate the params before sending
if params == nil {
params = NewGetDatabaseParams()
}
op := &runtime.ClientOperation{
ID: "getDatabase",
Method: "GET",
PathPattern: "/databases/{databaseIdPath}",
ProducesMediaTypes: []string{"application/json"},
ConsumesMediaTypes: []string{"application/json"},
Schemes: []string{"http"},
Params: params,
Reader: &GetDatabaseReader{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.(*GetDatabaseOK)
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 getDatabase: API contract not enforced by server. Client expected to get an error, but got: %T", result)
panic(msg)
}
/*
GetDatabases gets a list databases
@ -129,47 +84,6 @@ func (a *Client) GetDatabases(params *GetDatabasesParams, authInfo runtime.Clien
panic(msg)
}
/*
GetDatabasesObservable gets databases in an observable array
Returns a Database retrieval in a observable array
*/
func (a *Client) GetDatabasesObservable(params *GetDatabasesObservableParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetDatabasesObservableOK, error) {
// TODO: Validate the params before sending
if params == nil {
params = NewGetDatabasesObservableParams()
}
op := &runtime.ClientOperation{
ID: "getDatabasesObservable",
Method: "GET",
PathPattern: "/databases/observable",
ProducesMediaTypes: []string{"application/json"},
ConsumesMediaTypes: []string{"application/json"},
Schemes: []string{"http"},
Params: params,
Reader: &GetDatabasesObservableReader{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.(*GetDatabasesObservableOK)
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 getDatabasesObservable: API contract not enforced by server. Client expected to get an error, but got: %T", result)
panic(msg)
}
/*
PostDatabases creates new databases

View File

@ -4,7 +4,7 @@
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed
package database
package databases
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
@ -66,17 +66,11 @@ GetDatabasesParams contains all the parameters to send to the API endpoint
*/
type GetDatabasesParams struct {
/* CompanyID.
Record Id of a Company
*/
CompanyID *string
/* DatabaseID.
Record Id of a Database
*/
DatabaseID *string
DatabaseID string
/* Limit.
@ -88,7 +82,7 @@ type GetDatabasesParams struct {
/* Offset.
How many objects to skip? (default 0)
How many objects to skip?
Format: int64
*/
@ -147,25 +141,14 @@ func (o *GetDatabasesParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WithCompanyID adds the companyID to the get databases params
func (o *GetDatabasesParams) WithCompanyID(companyID *string) *GetDatabasesParams {
o.SetCompanyID(companyID)
return o
}
// SetCompanyID adds the companyId to the get databases params
func (o *GetDatabasesParams) SetCompanyID(companyID *string) {
o.CompanyID = companyID
}
// WithDatabaseID adds the databaseID to the get databases params
func (o *GetDatabasesParams) WithDatabaseID(databaseID *string) *GetDatabasesParams {
func (o *GetDatabasesParams) WithDatabaseID(databaseID string) *GetDatabasesParams {
o.SetDatabaseID(databaseID)
return o
}
// SetDatabaseID adds the databaseId to the get databases params
func (o *GetDatabasesParams) SetDatabaseID(databaseID *string) {
func (o *GetDatabasesParams) SetDatabaseID(databaseID string) {
o.DatabaseID = databaseID
}
@ -199,31 +182,8 @@ func (o *GetDatabasesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.
}
var res []error
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.DatabaseID != nil {
// query param databaseId
var qrDatabaseID string
if o.DatabaseID != nil {
qrDatabaseID = *o.DatabaseID
}
qrDatabaseID := o.DatabaseID
qDatabaseID := qrDatabaseID
if qDatabaseID != "" {
@ -231,7 +191,6 @@ func (o *GetDatabasesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.
return err
}
}
}
if o.Limit != nil {

View File

@ -4,7 +4,7 @@
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed
package database
package databases
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
@ -16,7 +16,7 @@ import (
"github.com/go-openapi/runtime"
"github.com/go-openapi/strfmt"
"code.tnxs.net/vernonkeenan/lib/api/devops/devops_models"
"code.tnxs.net/vernonkeenan/lib/api/members/members_models"
)
// GetDatabasesReader is a Reader for the GetDatabases structure.
@ -81,7 +81,7 @@ Response with Database objects
type GetDatabasesOK struct {
AccessControlAllowOrigin string
Payload *devops_models.DatabaseResponse
Payload *members_models.DatabaseResponse
}
// IsSuccess returns true when this get databases o k response has a 2xx status code
@ -122,7 +122,7 @@ func (o *GetDatabasesOK) String() string {
return fmt.Sprintf("[GET /databases][%d] getDatabasesOK %+v", 200, o.Payload)
}
func (o *GetDatabasesOK) GetPayload() *devops_models.DatabaseResponse {
func (o *GetDatabasesOK) GetPayload() *members_models.DatabaseResponse {
return o.Payload
}
@ -135,7 +135,7 @@ func (o *GetDatabasesOK) readResponse(response runtime.ClientResponse, consumer
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
}
o.Payload = new(devops_models.DatabaseResponse)
o.Payload = new(members_models.DatabaseResponse)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
@ -159,7 +159,7 @@ type GetDatabasesUnauthorized struct {
AccessControlAllowOrigin string
CacheControl string
Payload *devops_models.Error
Payload *members_models.Error
}
// IsSuccess returns true when this get databases unauthorized response has a 2xx status code
@ -200,7 +200,7 @@ func (o *GetDatabasesUnauthorized) String() string {
return fmt.Sprintf("[GET /databases][%d] getDatabasesUnauthorized %+v", 401, o.Payload)
}
func (o *GetDatabasesUnauthorized) GetPayload() *devops_models.Error {
func (o *GetDatabasesUnauthorized) GetPayload() *members_models.Error {
return o.Payload
}
@ -220,7 +220,7 @@ func (o *GetDatabasesUnauthorized) readResponse(response runtime.ClientResponse,
o.CacheControl = hdrCacheControl
}
o.Payload = new(devops_models.Error)
o.Payload = new(members_models.Error)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
@ -243,7 +243,7 @@ Access forbidden, account lacks access
type GetDatabasesForbidden struct {
AccessControlAllowOrigin string
Payload *devops_models.Error
Payload *members_models.Error
}
// IsSuccess returns true when this get databases forbidden response has a 2xx status code
@ -284,7 +284,7 @@ func (o *GetDatabasesForbidden) String() string {
return fmt.Sprintf("[GET /databases][%d] getDatabasesForbidden %+v", 403, o.Payload)
}
func (o *GetDatabasesForbidden) GetPayload() *devops_models.Error {
func (o *GetDatabasesForbidden) GetPayload() *members_models.Error {
return o.Payload
}
@ -297,7 +297,7 @@ func (o *GetDatabasesForbidden) readResponse(response runtime.ClientResponse, co
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
}
o.Payload = new(devops_models.Error)
o.Payload = new(members_models.Error)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
@ -320,7 +320,7 @@ Resource was not found
type GetDatabasesNotFound struct {
AccessControlAllowOrigin string
Payload *devops_models.Error
Payload *members_models.Error
}
// IsSuccess returns true when this get databases not found response has a 2xx status code
@ -361,7 +361,7 @@ func (o *GetDatabasesNotFound) String() string {
return fmt.Sprintf("[GET /databases][%d] getDatabasesNotFound %+v", 404, o.Payload)
}
func (o *GetDatabasesNotFound) GetPayload() *devops_models.Error {
func (o *GetDatabasesNotFound) GetPayload() *members_models.Error {
return o.Payload
}
@ -374,7 +374,7 @@ func (o *GetDatabasesNotFound) readResponse(response runtime.ClientResponse, con
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
}
o.Payload = new(devops_models.Error)
o.Payload = new(members_models.Error)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
@ -398,7 +398,7 @@ type GetDatabasesUnprocessableEntity struct {
AccessControlAllowOrigin string
CacheControl string
Payload *devops_models.Error
Payload *members_models.Error
}
// IsSuccess returns true when this get databases unprocessable entity response has a 2xx status code
@ -439,7 +439,7 @@ func (o *GetDatabasesUnprocessableEntity) String() string {
return fmt.Sprintf("[GET /databases][%d] getDatabasesUnprocessableEntity %+v", 422, o.Payload)
}
func (o *GetDatabasesUnprocessableEntity) GetPayload() *devops_models.Error {
func (o *GetDatabasesUnprocessableEntity) GetPayload() *members_models.Error {
return o.Payload
}
@ -459,7 +459,7 @@ func (o *GetDatabasesUnprocessableEntity) readResponse(response runtime.ClientRe
o.CacheControl = hdrCacheControl
}
o.Payload = new(devops_models.Error)
o.Payload = new(members_models.Error)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
@ -482,7 +482,7 @@ Server Internal Error
type GetDatabasesInternalServerError struct {
AccessControlAllowOrigin string
Payload *devops_models.Error
Payload *members_models.Error
}
// IsSuccess returns true when this get databases internal server error response has a 2xx status code
@ -523,7 +523,7 @@ func (o *GetDatabasesInternalServerError) String() string {
return fmt.Sprintf("[GET /databases][%d] getDatabasesInternalServerError %+v", 500, o.Payload)
}
func (o *GetDatabasesInternalServerError) GetPayload() *devops_models.Error {
func (o *GetDatabasesInternalServerError) GetPayload() *members_models.Error {
return o.Payload
}
@ -536,7 +536,7 @@ func (o *GetDatabasesInternalServerError) readResponse(response runtime.ClientRe
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
}
o.Payload = new(devops_models.Error)
o.Payload = new(members_models.Error)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {

View File

@ -4,7 +4,7 @@
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed
package database
package databases
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
@ -19,7 +19,7 @@ import (
cr "github.com/go-openapi/runtime/client"
"github.com/go-openapi/strfmt"
"code.tnxs.net/vernonkeenan/lib/api/devops/devops_models"
"code.tnxs.net/vernonkeenan/lib/api/members/members_models"
)
// NewPostDatabasesParams creates a new PostDatabasesParams object,
@ -71,7 +71,7 @@ type PostDatabasesParams struct {
An array of Database records
*/
DatabaseRequest *devops_models.DatabaseRequest
DatabaseRequest *members_models.DatabaseRequest
timeout time.Duration
Context context.Context
@ -127,13 +127,13 @@ func (o *PostDatabasesParams) SetHTTPClient(client *http.Client) {
}
// WithDatabaseRequest adds the databaseRequest to the post databases params
func (o *PostDatabasesParams) WithDatabaseRequest(databaseRequest *devops_models.DatabaseRequest) *PostDatabasesParams {
func (o *PostDatabasesParams) WithDatabaseRequest(databaseRequest *members_models.DatabaseRequest) *PostDatabasesParams {
o.SetDatabaseRequest(databaseRequest)
return o
}
// SetDatabaseRequest adds the databaseRequest to the post databases params
func (o *PostDatabasesParams) SetDatabaseRequest(databaseRequest *devops_models.DatabaseRequest) {
func (o *PostDatabasesParams) SetDatabaseRequest(databaseRequest *members_models.DatabaseRequest) {
o.DatabaseRequest = databaseRequest
}

Some files were not shown because too many files have changed in this diff Show More