Add scaleset commands
Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
This commit is contained in:
parent
7e1a83c79a
commit
7174e030e2
26 changed files with 3313 additions and 8 deletions
173
client/repositories/create_repo_scale_set_parameters.go
Normal file
173
client/repositories/create_repo_scale_set_parameters.go
Normal file
|
|
@ -0,0 +1,173 @@
|
|||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
package repositories
|
||||
|
||||
// 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"
|
||||
|
||||
garm_params "github.com/cloudbase/garm/params"
|
||||
)
|
||||
|
||||
// NewCreateRepoScaleSetParams creates a new CreateRepoScaleSetParams 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 NewCreateRepoScaleSetParams() *CreateRepoScaleSetParams {
|
||||
return &CreateRepoScaleSetParams{
|
||||
timeout: cr.DefaultTimeout,
|
||||
}
|
||||
}
|
||||
|
||||
// NewCreateRepoScaleSetParamsWithTimeout creates a new CreateRepoScaleSetParams object
|
||||
// with the ability to set a timeout on a request.
|
||||
func NewCreateRepoScaleSetParamsWithTimeout(timeout time.Duration) *CreateRepoScaleSetParams {
|
||||
return &CreateRepoScaleSetParams{
|
||||
timeout: timeout,
|
||||
}
|
||||
}
|
||||
|
||||
// NewCreateRepoScaleSetParamsWithContext creates a new CreateRepoScaleSetParams object
|
||||
// with the ability to set a context for a request.
|
||||
func NewCreateRepoScaleSetParamsWithContext(ctx context.Context) *CreateRepoScaleSetParams {
|
||||
return &CreateRepoScaleSetParams{
|
||||
Context: ctx,
|
||||
}
|
||||
}
|
||||
|
||||
// NewCreateRepoScaleSetParamsWithHTTPClient creates a new CreateRepoScaleSetParams object
|
||||
// with the ability to set a custom HTTPClient for a request.
|
||||
func NewCreateRepoScaleSetParamsWithHTTPClient(client *http.Client) *CreateRepoScaleSetParams {
|
||||
return &CreateRepoScaleSetParams{
|
||||
HTTPClient: client,
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
CreateRepoScaleSetParams contains all the parameters to send to the API endpoint
|
||||
|
||||
for the create repo scale set operation.
|
||||
|
||||
Typically these are written to a http.Request.
|
||||
*/
|
||||
type CreateRepoScaleSetParams struct {
|
||||
|
||||
/* Body.
|
||||
|
||||
Parameters used when creating the repository scale set.
|
||||
*/
|
||||
Body garm_params.CreateScaleSetParams
|
||||
|
||||
/* RepoID.
|
||||
|
||||
Repository ID.
|
||||
*/
|
||||
RepoID string
|
||||
|
||||
timeout time.Duration
|
||||
Context context.Context
|
||||
HTTPClient *http.Client
|
||||
}
|
||||
|
||||
// WithDefaults hydrates default values in the create repo scale set params (not the query body).
|
||||
//
|
||||
// All values with no default are reset to their zero value.
|
||||
func (o *CreateRepoScaleSetParams) WithDefaults() *CreateRepoScaleSetParams {
|
||||
o.SetDefaults()
|
||||
return o
|
||||
}
|
||||
|
||||
// SetDefaults hydrates default values in the create repo scale set params (not the query body).
|
||||
//
|
||||
// All values with no default are reset to their zero value.
|
||||
func (o *CreateRepoScaleSetParams) SetDefaults() {
|
||||
// no default values defined for this parameter
|
||||
}
|
||||
|
||||
// WithTimeout adds the timeout to the create repo scale set params
|
||||
func (o *CreateRepoScaleSetParams) WithTimeout(timeout time.Duration) *CreateRepoScaleSetParams {
|
||||
o.SetTimeout(timeout)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetTimeout adds the timeout to the create repo scale set params
|
||||
func (o *CreateRepoScaleSetParams) SetTimeout(timeout time.Duration) {
|
||||
o.timeout = timeout
|
||||
}
|
||||
|
||||
// WithContext adds the context to the create repo scale set params
|
||||
func (o *CreateRepoScaleSetParams) WithContext(ctx context.Context) *CreateRepoScaleSetParams {
|
||||
o.SetContext(ctx)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetContext adds the context to the create repo scale set params
|
||||
func (o *CreateRepoScaleSetParams) SetContext(ctx context.Context) {
|
||||
o.Context = ctx
|
||||
}
|
||||
|
||||
// WithHTTPClient adds the HTTPClient to the create repo scale set params
|
||||
func (o *CreateRepoScaleSetParams) WithHTTPClient(client *http.Client) *CreateRepoScaleSetParams {
|
||||
o.SetHTTPClient(client)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetHTTPClient adds the HTTPClient to the create repo scale set params
|
||||
func (o *CreateRepoScaleSetParams) SetHTTPClient(client *http.Client) {
|
||||
o.HTTPClient = client
|
||||
}
|
||||
|
||||
// WithBody adds the body to the create repo scale set params
|
||||
func (o *CreateRepoScaleSetParams) WithBody(body garm_params.CreateScaleSetParams) *CreateRepoScaleSetParams {
|
||||
o.SetBody(body)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetBody adds the body to the create repo scale set params
|
||||
func (o *CreateRepoScaleSetParams) SetBody(body garm_params.CreateScaleSetParams) {
|
||||
o.Body = body
|
||||
}
|
||||
|
||||
// WithRepoID adds the repoID to the create repo scale set params
|
||||
func (o *CreateRepoScaleSetParams) WithRepoID(repoID string) *CreateRepoScaleSetParams {
|
||||
o.SetRepoID(repoID)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetRepoID adds the repoId to the create repo scale set params
|
||||
func (o *CreateRepoScaleSetParams) SetRepoID(repoID string) {
|
||||
o.RepoID = repoID
|
||||
}
|
||||
|
||||
// WriteToRequest writes these params to a swagger request
|
||||
func (o *CreateRepoScaleSetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
|
||||
|
||||
if err := r.SetTimeout(o.timeout); err != nil {
|
||||
return err
|
||||
}
|
||||
var res []error
|
||||
if err := r.SetBodyParam(o.Body); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
// path param repoID
|
||||
if err := r.SetPathParam("repoID", o.RepoID); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if len(res) > 0 {
|
||||
return errors.CompositeValidationError(res...)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
184
client/repositories/create_repo_scale_set_responses.go
Normal file
184
client/repositories/create_repo_scale_set_responses.go
Normal file
|
|
@ -0,0 +1,184 @@
|
|||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
package repositories
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
// Editing this file might prove futile when you re-run the swagger generate command
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"io"
|
||||
|
||||
"github.com/go-openapi/runtime"
|
||||
"github.com/go-openapi/strfmt"
|
||||
|
||||
apiserver_params "github.com/cloudbase/garm/apiserver/params"
|
||||
garm_params "github.com/cloudbase/garm/params"
|
||||
)
|
||||
|
||||
// CreateRepoScaleSetReader is a Reader for the CreateRepoScaleSet structure.
|
||||
type CreateRepoScaleSetReader struct {
|
||||
formats strfmt.Registry
|
||||
}
|
||||
|
||||
// ReadResponse reads a server response into the received o.
|
||||
func (o *CreateRepoScaleSetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
|
||||
switch response.Code() {
|
||||
case 200:
|
||||
result := NewCreateRepoScaleSetOK()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return result, nil
|
||||
default:
|
||||
result := NewCreateRepoScaleSetDefault(response.Code())
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if response.Code()/100 == 2 {
|
||||
return result, nil
|
||||
}
|
||||
return nil, result
|
||||
}
|
||||
}
|
||||
|
||||
// NewCreateRepoScaleSetOK creates a CreateRepoScaleSetOK with default headers values
|
||||
func NewCreateRepoScaleSetOK() *CreateRepoScaleSetOK {
|
||||
return &CreateRepoScaleSetOK{}
|
||||
}
|
||||
|
||||
/*
|
||||
CreateRepoScaleSetOK describes a response with status code 200, with default header values.
|
||||
|
||||
ScaleSet
|
||||
*/
|
||||
type CreateRepoScaleSetOK struct {
|
||||
Payload garm_params.ScaleSet
|
||||
}
|
||||
|
||||
// IsSuccess returns true when this create repo scale set o k response has a 2xx status code
|
||||
func (o *CreateRepoScaleSetOK) IsSuccess() bool {
|
||||
return true
|
||||
}
|
||||
|
||||
// IsRedirect returns true when this create repo scale set o k response has a 3xx status code
|
||||
func (o *CreateRepoScaleSetOK) IsRedirect() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsClientError returns true when this create repo scale set o k response has a 4xx status code
|
||||
func (o *CreateRepoScaleSetOK) IsClientError() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsServerError returns true when this create repo scale set o k response has a 5xx status code
|
||||
func (o *CreateRepoScaleSetOK) IsServerError() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsCode returns true when this create repo scale set o k response a status code equal to that given
|
||||
func (o *CreateRepoScaleSetOK) IsCode(code int) bool {
|
||||
return code == 200
|
||||
}
|
||||
|
||||
// Code gets the status code for the create repo scale set o k response
|
||||
func (o *CreateRepoScaleSetOK) Code() int {
|
||||
return 200
|
||||
}
|
||||
|
||||
func (o *CreateRepoScaleSetOK) Error() string {
|
||||
payload, _ := json.Marshal(o.Payload)
|
||||
return fmt.Sprintf("[POST /repositories/{repoID}/scalesets][%d] createRepoScaleSetOK %s", 200, payload)
|
||||
}
|
||||
|
||||
func (o *CreateRepoScaleSetOK) String() string {
|
||||
payload, _ := json.Marshal(o.Payload)
|
||||
return fmt.Sprintf("[POST /repositories/{repoID}/scalesets][%d] createRepoScaleSetOK %s", 200, payload)
|
||||
}
|
||||
|
||||
func (o *CreateRepoScaleSetOK) GetPayload() garm_params.ScaleSet {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *CreateRepoScaleSetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewCreateRepoScaleSetDefault creates a CreateRepoScaleSetDefault with default headers values
|
||||
func NewCreateRepoScaleSetDefault(code int) *CreateRepoScaleSetDefault {
|
||||
return &CreateRepoScaleSetDefault{
|
||||
_statusCode: code,
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
CreateRepoScaleSetDefault describes a response with status code -1, with default header values.
|
||||
|
||||
APIErrorResponse
|
||||
*/
|
||||
type CreateRepoScaleSetDefault struct {
|
||||
_statusCode int
|
||||
|
||||
Payload apiserver_params.APIErrorResponse
|
||||
}
|
||||
|
||||
// IsSuccess returns true when this create repo scale set default response has a 2xx status code
|
||||
func (o *CreateRepoScaleSetDefault) IsSuccess() bool {
|
||||
return o._statusCode/100 == 2
|
||||
}
|
||||
|
||||
// IsRedirect returns true when this create repo scale set default response has a 3xx status code
|
||||
func (o *CreateRepoScaleSetDefault) IsRedirect() bool {
|
||||
return o._statusCode/100 == 3
|
||||
}
|
||||
|
||||
// IsClientError returns true when this create repo scale set default response has a 4xx status code
|
||||
func (o *CreateRepoScaleSetDefault) IsClientError() bool {
|
||||
return o._statusCode/100 == 4
|
||||
}
|
||||
|
||||
// IsServerError returns true when this create repo scale set default response has a 5xx status code
|
||||
func (o *CreateRepoScaleSetDefault) IsServerError() bool {
|
||||
return o._statusCode/100 == 5
|
||||
}
|
||||
|
||||
// IsCode returns true when this create repo scale set default response a status code equal to that given
|
||||
func (o *CreateRepoScaleSetDefault) IsCode(code int) bool {
|
||||
return o._statusCode == code
|
||||
}
|
||||
|
||||
// Code gets the status code for the create repo scale set default response
|
||||
func (o *CreateRepoScaleSetDefault) Code() int {
|
||||
return o._statusCode
|
||||
}
|
||||
|
||||
func (o *CreateRepoScaleSetDefault) Error() string {
|
||||
payload, _ := json.Marshal(o.Payload)
|
||||
return fmt.Sprintf("[POST /repositories/{repoID}/scalesets][%d] CreateRepoScaleSet default %s", o._statusCode, payload)
|
||||
}
|
||||
|
||||
func (o *CreateRepoScaleSetDefault) String() string {
|
||||
payload, _ := json.Marshal(o.Payload)
|
||||
return fmt.Sprintf("[POST /repositories/{repoID}/scalesets][%d] CreateRepoScaleSet default %s", o._statusCode, payload)
|
||||
}
|
||||
|
||||
func (o *CreateRepoScaleSetDefault) GetPayload() apiserver_params.APIErrorResponse {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *CreateRepoScaleSetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
151
client/repositories/list_repo_scale_sets_parameters.go
Normal file
151
client/repositories/list_repo_scale_sets_parameters.go
Normal file
|
|
@ -0,0 +1,151 @@
|
|||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
package repositories
|
||||
|
||||
// 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"
|
||||
)
|
||||
|
||||
// NewListRepoScaleSetsParams creates a new ListRepoScaleSetsParams 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 NewListRepoScaleSetsParams() *ListRepoScaleSetsParams {
|
||||
return &ListRepoScaleSetsParams{
|
||||
timeout: cr.DefaultTimeout,
|
||||
}
|
||||
}
|
||||
|
||||
// NewListRepoScaleSetsParamsWithTimeout creates a new ListRepoScaleSetsParams object
|
||||
// with the ability to set a timeout on a request.
|
||||
func NewListRepoScaleSetsParamsWithTimeout(timeout time.Duration) *ListRepoScaleSetsParams {
|
||||
return &ListRepoScaleSetsParams{
|
||||
timeout: timeout,
|
||||
}
|
||||
}
|
||||
|
||||
// NewListRepoScaleSetsParamsWithContext creates a new ListRepoScaleSetsParams object
|
||||
// with the ability to set a context for a request.
|
||||
func NewListRepoScaleSetsParamsWithContext(ctx context.Context) *ListRepoScaleSetsParams {
|
||||
return &ListRepoScaleSetsParams{
|
||||
Context: ctx,
|
||||
}
|
||||
}
|
||||
|
||||
// NewListRepoScaleSetsParamsWithHTTPClient creates a new ListRepoScaleSetsParams object
|
||||
// with the ability to set a custom HTTPClient for a request.
|
||||
func NewListRepoScaleSetsParamsWithHTTPClient(client *http.Client) *ListRepoScaleSetsParams {
|
||||
return &ListRepoScaleSetsParams{
|
||||
HTTPClient: client,
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
ListRepoScaleSetsParams contains all the parameters to send to the API endpoint
|
||||
|
||||
for the list repo scale sets operation.
|
||||
|
||||
Typically these are written to a http.Request.
|
||||
*/
|
||||
type ListRepoScaleSetsParams struct {
|
||||
|
||||
/* RepoID.
|
||||
|
||||
Repository ID.
|
||||
*/
|
||||
RepoID string
|
||||
|
||||
timeout time.Duration
|
||||
Context context.Context
|
||||
HTTPClient *http.Client
|
||||
}
|
||||
|
||||
// WithDefaults hydrates default values in the list repo scale sets params (not the query body).
|
||||
//
|
||||
// All values with no default are reset to their zero value.
|
||||
func (o *ListRepoScaleSetsParams) WithDefaults() *ListRepoScaleSetsParams {
|
||||
o.SetDefaults()
|
||||
return o
|
||||
}
|
||||
|
||||
// SetDefaults hydrates default values in the list repo scale sets params (not the query body).
|
||||
//
|
||||
// All values with no default are reset to their zero value.
|
||||
func (o *ListRepoScaleSetsParams) SetDefaults() {
|
||||
// no default values defined for this parameter
|
||||
}
|
||||
|
||||
// WithTimeout adds the timeout to the list repo scale sets params
|
||||
func (o *ListRepoScaleSetsParams) WithTimeout(timeout time.Duration) *ListRepoScaleSetsParams {
|
||||
o.SetTimeout(timeout)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetTimeout adds the timeout to the list repo scale sets params
|
||||
func (o *ListRepoScaleSetsParams) SetTimeout(timeout time.Duration) {
|
||||
o.timeout = timeout
|
||||
}
|
||||
|
||||
// WithContext adds the context to the list repo scale sets params
|
||||
func (o *ListRepoScaleSetsParams) WithContext(ctx context.Context) *ListRepoScaleSetsParams {
|
||||
o.SetContext(ctx)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetContext adds the context to the list repo scale sets params
|
||||
func (o *ListRepoScaleSetsParams) SetContext(ctx context.Context) {
|
||||
o.Context = ctx
|
||||
}
|
||||
|
||||
// WithHTTPClient adds the HTTPClient to the list repo scale sets params
|
||||
func (o *ListRepoScaleSetsParams) WithHTTPClient(client *http.Client) *ListRepoScaleSetsParams {
|
||||
o.SetHTTPClient(client)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetHTTPClient adds the HTTPClient to the list repo scale sets params
|
||||
func (o *ListRepoScaleSetsParams) SetHTTPClient(client *http.Client) {
|
||||
o.HTTPClient = client
|
||||
}
|
||||
|
||||
// WithRepoID adds the repoID to the list repo scale sets params
|
||||
func (o *ListRepoScaleSetsParams) WithRepoID(repoID string) *ListRepoScaleSetsParams {
|
||||
o.SetRepoID(repoID)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetRepoID adds the repoId to the list repo scale sets params
|
||||
func (o *ListRepoScaleSetsParams) SetRepoID(repoID string) {
|
||||
o.RepoID = repoID
|
||||
}
|
||||
|
||||
// WriteToRequest writes these params to a swagger request
|
||||
func (o *ListRepoScaleSetsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
|
||||
|
||||
if err := r.SetTimeout(o.timeout); err != nil {
|
||||
return err
|
||||
}
|
||||
var res []error
|
||||
|
||||
// path param repoID
|
||||
if err := r.SetPathParam("repoID", o.RepoID); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if len(res) > 0 {
|
||||
return errors.CompositeValidationError(res...)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
184
client/repositories/list_repo_scale_sets_responses.go
Normal file
184
client/repositories/list_repo_scale_sets_responses.go
Normal file
|
|
@ -0,0 +1,184 @@
|
|||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
package repositories
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
// Editing this file might prove futile when you re-run the swagger generate command
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"io"
|
||||
|
||||
"github.com/go-openapi/runtime"
|
||||
"github.com/go-openapi/strfmt"
|
||||
|
||||
apiserver_params "github.com/cloudbase/garm/apiserver/params"
|
||||
garm_params "github.com/cloudbase/garm/params"
|
||||
)
|
||||
|
||||
// ListRepoScaleSetsReader is a Reader for the ListRepoScaleSets structure.
|
||||
type ListRepoScaleSetsReader struct {
|
||||
formats strfmt.Registry
|
||||
}
|
||||
|
||||
// ReadResponse reads a server response into the received o.
|
||||
func (o *ListRepoScaleSetsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
|
||||
switch response.Code() {
|
||||
case 200:
|
||||
result := NewListRepoScaleSetsOK()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return result, nil
|
||||
default:
|
||||
result := NewListRepoScaleSetsDefault(response.Code())
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if response.Code()/100 == 2 {
|
||||
return result, nil
|
||||
}
|
||||
return nil, result
|
||||
}
|
||||
}
|
||||
|
||||
// NewListRepoScaleSetsOK creates a ListRepoScaleSetsOK with default headers values
|
||||
func NewListRepoScaleSetsOK() *ListRepoScaleSetsOK {
|
||||
return &ListRepoScaleSetsOK{}
|
||||
}
|
||||
|
||||
/*
|
||||
ListRepoScaleSetsOK describes a response with status code 200, with default header values.
|
||||
|
||||
ScaleSets
|
||||
*/
|
||||
type ListRepoScaleSetsOK struct {
|
||||
Payload garm_params.ScaleSets
|
||||
}
|
||||
|
||||
// IsSuccess returns true when this list repo scale sets o k response has a 2xx status code
|
||||
func (o *ListRepoScaleSetsOK) IsSuccess() bool {
|
||||
return true
|
||||
}
|
||||
|
||||
// IsRedirect returns true when this list repo scale sets o k response has a 3xx status code
|
||||
func (o *ListRepoScaleSetsOK) IsRedirect() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsClientError returns true when this list repo scale sets o k response has a 4xx status code
|
||||
func (o *ListRepoScaleSetsOK) IsClientError() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsServerError returns true when this list repo scale sets o k response has a 5xx status code
|
||||
func (o *ListRepoScaleSetsOK) IsServerError() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsCode returns true when this list repo scale sets o k response a status code equal to that given
|
||||
func (o *ListRepoScaleSetsOK) IsCode(code int) bool {
|
||||
return code == 200
|
||||
}
|
||||
|
||||
// Code gets the status code for the list repo scale sets o k response
|
||||
func (o *ListRepoScaleSetsOK) Code() int {
|
||||
return 200
|
||||
}
|
||||
|
||||
func (o *ListRepoScaleSetsOK) Error() string {
|
||||
payload, _ := json.Marshal(o.Payload)
|
||||
return fmt.Sprintf("[GET /repositories/{repoID}/scalesets][%d] listRepoScaleSetsOK %s", 200, payload)
|
||||
}
|
||||
|
||||
func (o *ListRepoScaleSetsOK) String() string {
|
||||
payload, _ := json.Marshal(o.Payload)
|
||||
return fmt.Sprintf("[GET /repositories/{repoID}/scalesets][%d] listRepoScaleSetsOK %s", 200, payload)
|
||||
}
|
||||
|
||||
func (o *ListRepoScaleSetsOK) GetPayload() garm_params.ScaleSets {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *ListRepoScaleSetsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewListRepoScaleSetsDefault creates a ListRepoScaleSetsDefault with default headers values
|
||||
func NewListRepoScaleSetsDefault(code int) *ListRepoScaleSetsDefault {
|
||||
return &ListRepoScaleSetsDefault{
|
||||
_statusCode: code,
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
ListRepoScaleSetsDefault describes a response with status code -1, with default header values.
|
||||
|
||||
APIErrorResponse
|
||||
*/
|
||||
type ListRepoScaleSetsDefault struct {
|
||||
_statusCode int
|
||||
|
||||
Payload apiserver_params.APIErrorResponse
|
||||
}
|
||||
|
||||
// IsSuccess returns true when this list repo scale sets default response has a 2xx status code
|
||||
func (o *ListRepoScaleSetsDefault) IsSuccess() bool {
|
||||
return o._statusCode/100 == 2
|
||||
}
|
||||
|
||||
// IsRedirect returns true when this list repo scale sets default response has a 3xx status code
|
||||
func (o *ListRepoScaleSetsDefault) IsRedirect() bool {
|
||||
return o._statusCode/100 == 3
|
||||
}
|
||||
|
||||
// IsClientError returns true when this list repo scale sets default response has a 4xx status code
|
||||
func (o *ListRepoScaleSetsDefault) IsClientError() bool {
|
||||
return o._statusCode/100 == 4
|
||||
}
|
||||
|
||||
// IsServerError returns true when this list repo scale sets default response has a 5xx status code
|
||||
func (o *ListRepoScaleSetsDefault) IsServerError() bool {
|
||||
return o._statusCode/100 == 5
|
||||
}
|
||||
|
||||
// IsCode returns true when this list repo scale sets default response a status code equal to that given
|
||||
func (o *ListRepoScaleSetsDefault) IsCode(code int) bool {
|
||||
return o._statusCode == code
|
||||
}
|
||||
|
||||
// Code gets the status code for the list repo scale sets default response
|
||||
func (o *ListRepoScaleSetsDefault) Code() int {
|
||||
return o._statusCode
|
||||
}
|
||||
|
||||
func (o *ListRepoScaleSetsDefault) Error() string {
|
||||
payload, _ := json.Marshal(o.Payload)
|
||||
return fmt.Sprintf("[GET /repositories/{repoID}/scalesets][%d] ListRepoScaleSets default %s", o._statusCode, payload)
|
||||
}
|
||||
|
||||
func (o *ListRepoScaleSetsDefault) String() string {
|
||||
payload, _ := json.Marshal(o.Payload)
|
||||
return fmt.Sprintf("[GET /repositories/{repoID}/scalesets][%d] ListRepoScaleSets default %s", o._statusCode, payload)
|
||||
}
|
||||
|
||||
func (o *ListRepoScaleSetsDefault) GetPayload() apiserver_params.APIErrorResponse {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *ListRepoScaleSetsDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
|
@ -58,6 +58,8 @@ type ClientService interface {
|
|||
|
||||
CreateRepoPool(params *CreateRepoPoolParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CreateRepoPoolOK, error)
|
||||
|
||||
CreateRepoScaleSet(params *CreateRepoScaleSetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CreateRepoScaleSetOK, error)
|
||||
|
||||
DeleteRepo(params *DeleteRepoParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) error
|
||||
|
||||
DeleteRepoPool(params *DeleteRepoPoolParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) error
|
||||
|
|
@ -74,6 +76,8 @@ type ClientService interface {
|
|||
|
||||
ListRepoPools(params *ListRepoPoolsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ListRepoPoolsOK, error)
|
||||
|
||||
ListRepoScaleSets(params *ListRepoScaleSetsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ListRepoScaleSetsOK, error)
|
||||
|
||||
ListRepos(params *ListReposParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ListReposOK, error)
|
||||
|
||||
UninstallRepoWebhook(params *UninstallRepoWebhookParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) error
|
||||
|
|
@ -161,6 +165,44 @@ func (a *Client) CreateRepoPool(params *CreateRepoPoolParams, authInfo runtime.C
|
|||
return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code())
|
||||
}
|
||||
|
||||
/*
|
||||
CreateRepoScaleSet creates repository scale set with the parameters given
|
||||
*/
|
||||
func (a *Client) CreateRepoScaleSet(params *CreateRepoScaleSetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CreateRepoScaleSetOK, error) {
|
||||
// TODO: Validate the params before sending
|
||||
if params == nil {
|
||||
params = NewCreateRepoScaleSetParams()
|
||||
}
|
||||
op := &runtime.ClientOperation{
|
||||
ID: "CreateRepoScaleSet",
|
||||
Method: "POST",
|
||||
PathPattern: "/repositories/{repoID}/scalesets",
|
||||
ProducesMediaTypes: []string{"application/json"},
|
||||
ConsumesMediaTypes: []string{"application/json"},
|
||||
Schemes: []string{"http"},
|
||||
Params: params,
|
||||
Reader: &CreateRepoScaleSetReader{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.(*CreateRepoScaleSetOK)
|
||||
if ok {
|
||||
return success, nil
|
||||
}
|
||||
// unexpected success response
|
||||
unexpectedSuccess := result.(*CreateRepoScaleSetDefault)
|
||||
return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code())
|
||||
}
|
||||
|
||||
/*
|
||||
DeleteRepo deletes repository by ID
|
||||
*/
|
||||
|
|
@ -455,6 +497,44 @@ func (a *Client) ListRepoPools(params *ListRepoPoolsParams, authInfo runtime.Cli
|
|||
return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code())
|
||||
}
|
||||
|
||||
/*
|
||||
ListRepoScaleSets lists repository scale sets
|
||||
*/
|
||||
func (a *Client) ListRepoScaleSets(params *ListRepoScaleSetsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ListRepoScaleSetsOK, error) {
|
||||
// TODO: Validate the params before sending
|
||||
if params == nil {
|
||||
params = NewListRepoScaleSetsParams()
|
||||
}
|
||||
op := &runtime.ClientOperation{
|
||||
ID: "ListRepoScaleSets",
|
||||
Method: "GET",
|
||||
PathPattern: "/repositories/{repoID}/scalesets",
|
||||
ProducesMediaTypes: []string{"application/json"},
|
||||
ConsumesMediaTypes: []string{"application/json"},
|
||||
Schemes: []string{"http"},
|
||||
Params: params,
|
||||
Reader: &ListRepoScaleSetsReader{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.(*ListRepoScaleSetsOK)
|
||||
if ok {
|
||||
return success, nil
|
||||
}
|
||||
// unexpected success response
|
||||
unexpectedSuccess := result.(*ListRepoScaleSetsDefault)
|
||||
return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code())
|
||||
}
|
||||
|
||||
/*
|
||||
ListRepos lists repositories
|
||||
*/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue