Update go-swagger and run generate

This updates go-swagger to v0.31.0, which no longer panics when used
with golang v1.22+.

Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
This commit is contained in:
Gabriel Adrian Samfira 2024-05-23 10:24:44 +00:00
parent ab3bef8b41
commit ff6db9bd61
77 changed files with 873 additions and 244 deletions

View file

@ -9,6 +9,7 @@ import (
"fmt"
"github.com/go-openapi/runtime"
httptransport "github.com/go-openapi/runtime/client"
"github.com/go-openapi/strfmt"
)
@ -17,6 +18,31 @@ func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientServi
return &Client{transport: transport, formats: formats}
}
// New creates a new controller info API client with basic auth credentials.
// It takes the following parameters:
// - host: http host (github.com).
// - basePath: any base path for the API client ("/v1", "/v3").
// - scheme: http scheme ("http", "https").
// - user: user for basic authentication header.
// - password: password for basic authentication header.
func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService {
transport := httptransport.New(host, basePath, []string{scheme})
transport.DefaultAuthentication = httptransport.BasicAuth(user, password)
return &Client{transport: transport, formats: strfmt.Default}
}
// New creates a new controller info API client with a bearer token for authentication.
// It takes the following parameters:
// - host: http host (github.com).
// - basePath: any base path for the API client ("/v1", "/v3").
// - scheme: http scheme ("http", "https").
// - bearerToken: bearer token for Bearer authentication header.
func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService {
transport := httptransport.New(host, basePath, []string{scheme})
transport.DefaultAuthentication = httptransport.BearerToken(bearerToken)
return &Client{transport: transport, formats: strfmt.Default}
}
/*
Client for controller info API
*/
@ -25,7 +51,7 @@ type Client struct {
formats strfmt.Registry
}
// ClientOption is the option for Client methods
// ClientOption may be used to customize the behavior of Client methods.
type ClientOption func(*runtime.ClientOperation)
// ClientService is the interface for Client methods

View file

@ -6,6 +6,7 @@ package controller_info
// Editing this file might prove futile when you re-run the swagger generate command
import (
"encoding/json"
"fmt"
"io"
@ -86,11 +87,13 @@ func (o *ControllerInfoOK) Code() int {
}
func (o *ControllerInfoOK) Error() string {
return fmt.Sprintf("[GET /controller-info][%d] controllerInfoOK %+v", 200, o.Payload)
payload, _ := json.Marshal(o.Payload)
return fmt.Sprintf("[GET /controller-info][%d] controllerInfoOK %s", 200, payload)
}
func (o *ControllerInfoOK) String() string {
return fmt.Sprintf("[GET /controller-info][%d] controllerInfoOK %+v", 200, o.Payload)
payload, _ := json.Marshal(o.Payload)
return fmt.Sprintf("[GET /controller-info][%d] controllerInfoOK %s", 200, payload)
}
func (o *ControllerInfoOK) GetPayload() garm_params.ControllerInfo {
@ -152,11 +155,13 @@ func (o *ControllerInfoConflict) Code() int {
}
func (o *ControllerInfoConflict) Error() string {
return fmt.Sprintf("[GET /controller-info][%d] controllerInfoConflict %+v", 409, o.Payload)
payload, _ := json.Marshal(o.Payload)
return fmt.Sprintf("[GET /controller-info][%d] controllerInfoConflict %s", 409, payload)
}
func (o *ControllerInfoConflict) String() string {
return fmt.Sprintf("[GET /controller-info][%d] controllerInfoConflict %+v", 409, o.Payload)
payload, _ := json.Marshal(o.Payload)
return fmt.Sprintf("[GET /controller-info][%d] controllerInfoConflict %s", 409, payload)
}
func (o *ControllerInfoConflict) GetPayload() apiserver_params.APIErrorResponse {