Cyclops 4 HPC is the purpose built stack to support large HPC centers with resource accounting and billing of cluster as well as cloud resources.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
cyclops-4-hpc/services/plan-manager/client/cycle_management/cycle_management_client.go

166 lines
4.3 KiB

// Code generated by go-swagger; DO NOT EDIT.
package cycle_management
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
import (
"context"
"github.com/go-openapi/runtime"
strfmt "github.com/go-openapi/strfmt"
)
//go:generate mockery -name API -inpkg
// API is the interface of the cycle management client
type API interface {
/*
CreateCycle creates a plan
Creates a new cycle*/
CreateCycle(ctx context.Context, params *CreateCycleParams) (*CreateCycleCreated, error)
/*
GetCycle gets specific cycle
get cycle with given id*/
GetCycle(ctx context.Context, params *GetCycleParams) (*GetCycleOK, error)
/*
ListCycles lists all cycles
lists all cycles*/
ListCycles(ctx context.Context, params *ListCyclesParams) (*ListCyclesOK, error)
/*
UpdateCycle updates specific cycle
Update cycle with given id*/
UpdateCycle(ctx context.Context, params *UpdateCycleParams) (*UpdateCycleOK, error)
}
// New creates a new cycle management API client.
func New(transport runtime.ClientTransport, formats strfmt.Registry, authInfo runtime.ClientAuthInfoWriter) *Client {
return &Client{
transport: transport,
formats: formats,
authInfo: authInfo,
}
}
/*
Client for cycle management API
*/
type Client struct {
transport runtime.ClientTransport
formats strfmt.Registry
authInfo runtime.ClientAuthInfoWriter
}
/*
CreateCycle creates a plan
Creates a new cycle
*/
func (a *Client) CreateCycle(ctx context.Context, params *CreateCycleParams) (*CreateCycleCreated, error) {
result, err := a.transport.Submit(&runtime.ClientOperation{
ID: "createCycle",
Method: "POST",
PathPattern: "/cycle",
ProducesMediaTypes: []string{"application/json"},
ConsumesMediaTypes: []string{"application/json"},
Schemes: []string{"http", "https"},
Params: params,
Reader: &CreateCycleReader{formats: a.formats},
AuthInfo: a.authInfo,
Context: ctx,
Client: params.HTTPClient,
})
if err != nil {
return nil, err
}
return result.(*CreateCycleCreated), nil
}
/*
GetCycle gets specific cycle
get cycle with given id
*/
func (a *Client) GetCycle(ctx context.Context, params *GetCycleParams) (*GetCycleOK, error) {
result, err := a.transport.Submit(&runtime.ClientOperation{
ID: "getCycle",
Method: "GET",
PathPattern: "/cycle/{id}",
ProducesMediaTypes: []string{"application/json"},
ConsumesMediaTypes: []string{"application/json"},
Schemes: []string{"http", "https"},
Params: params,
Reader: &GetCycleReader{formats: a.formats},
AuthInfo: a.authInfo,
Context: ctx,
Client: params.HTTPClient,
})
if err != nil {
return nil, err
}
return result.(*GetCycleOK), nil
}
/*
ListCycles lists all cycles
lists all cycles
*/
func (a *Client) ListCycles(ctx context.Context, params *ListCyclesParams) (*ListCyclesOK, error) {
result, err := a.transport.Submit(&runtime.ClientOperation{
ID: "listCycles",
Method: "GET",
PathPattern: "/cycle",
ProducesMediaTypes: []string{"application/json"},
ConsumesMediaTypes: []string{"application/json"},
Schemes: []string{"http", "https"},
Params: params,
Reader: &ListCyclesReader{formats: a.formats},
AuthInfo: a.authInfo,
Context: ctx,
Client: params.HTTPClient,
})
if err != nil {
return nil, err
}
return result.(*ListCyclesOK), nil
}
/*
UpdateCycle updates specific cycle
Update cycle with given id
*/
func (a *Client) UpdateCycle(ctx context.Context, params *UpdateCycleParams) (*UpdateCycleOK, error) {
result, err := a.transport.Submit(&runtime.ClientOperation{
ID: "updateCycle",
Method: "PUT",
PathPattern: "/cycle/{id}",
ProducesMediaTypes: []string{"application/json"},
ConsumesMediaTypes: []string{"application/json"},
Schemes: []string{"http", "https"},
Params: params,
Reader: &UpdateCycleReader{formats: a.formats},
AuthInfo: a.authInfo,
Context: ctx,
Client: params.HTTPClient,
})
if err != nil {
return nil, err
}
return result.(*UpdateCycleOK), nil
}