Documentation
¶
Overview ¶
Package apiclient provides primitives to interact with the openapi HTTP API.
Code generated by github.com/deepmap/oapi-codegen version v1.16.2 DO NOT EDIT.
Index ¶
- func NewBearerTokenProvider(token string) *bearerToken
- func NewCreateClusterRequest(server string, body CreateClusterJSONRequestBody) (*http.Request, error)
- func NewCreateClusterRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
- func NewDeleteClusterRequest(server string, clusterId string) (*http.Request, error)
- func NewGetClusterRequest(server string, clusterId string) (*http.Request, error)
- func NewListClustersRequest(server string) (*http.Request, error)
- type Capacity
- type Client
- func (c *Client) CreateCluster(ctx context.Context, body CreateClusterJSONRequestBody, ...) (*http.Response, error)
- func (c *Client) CreateClusterWithBody(ctx context.Context, contentType string, body io.Reader, ...) (*http.Response, error)
- func (c *Client) DeleteCluster(ctx context.Context, clusterId string, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) GetCluster(ctx context.Context, clusterId string, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) ListClusters(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
- type ClientInterface
- type ClientOption
- type ClientWithResponses
- func (c *ClientWithResponses) CreateClusterWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, ...) (*CreateClusterResponse, error)
- func (c *ClientWithResponses) CreateClusterWithResponse(ctx context.Context, body CreateClusterJSONRequestBody, ...) (*CreateClusterResponse, error)
- func (c *ClientWithResponses) DeleteClusterWithResponse(ctx context.Context, clusterId string, reqEditors ...RequestEditorFn) (*DeleteClusterResponse, error)
- func (c *ClientWithResponses) GetClusterWithResponse(ctx context.Context, clusterId string, reqEditors ...RequestEditorFn) (*GetClusterResponse, error)
- func (c *ClientWithResponses) ListClustersWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ListClustersResponse, error)
- type ClientWithResponsesInterface
- type Cluster
- type ClusterType
- type Clusters
- type CreateCluster
- type CreateClusterJSONRequestBody
- type CreateClusterResponse
- type DeleteClusterResponse
- type GetClusterResponse
- type HttpRequestDoer
- type ListClustersResponse
- type MockClientWithResponsesInterface
- func (_m *MockClientWithResponsesInterface) CreateClusterWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, ...) (*CreateClusterResponse, error)
- func (_m *MockClientWithResponsesInterface) CreateClusterWithResponse(ctx context.Context, body CreateCluster, reqEditors ...RequestEditorFn) (*CreateClusterResponse, error)
- func (_m *MockClientWithResponsesInterface) DeleteClusterWithResponse(ctx context.Context, clusterId string, reqEditors ...RequestEditorFn) (*DeleteClusterResponse, error)
- func (_m *MockClientWithResponsesInterface) EXPECT() *MockClientWithResponsesInterface_Expecter
- func (_m *MockClientWithResponsesInterface) GetClusterWithResponse(ctx context.Context, clusterId string, reqEditors ...RequestEditorFn) (*GetClusterResponse, error)
- func (_m *MockClientWithResponsesInterface) ListClustersWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ListClustersResponse, error)
- type MockClientWithResponsesInterface_CreateClusterWithBodyWithResponse_Call
- func (_c *MockClientWithResponsesInterface_CreateClusterWithBodyWithResponse_Call) Return(_a0 *CreateClusterResponse, _a1 error) *MockClientWithResponsesInterface_CreateClusterWithBodyWithResponse_Call
- func (_c *MockClientWithResponsesInterface_CreateClusterWithBodyWithResponse_Call) Run(run func(ctx context.Context, contentType string, body io.Reader, ...)) *MockClientWithResponsesInterface_CreateClusterWithBodyWithResponse_Call
- func (_c *MockClientWithResponsesInterface_CreateClusterWithBodyWithResponse_Call) RunAndReturn(...) *MockClientWithResponsesInterface_CreateClusterWithBodyWithResponse_Call
- type MockClientWithResponsesInterface_CreateClusterWithResponse_Call
- func (_c *MockClientWithResponsesInterface_CreateClusterWithResponse_Call) Return(_a0 *CreateClusterResponse, _a1 error) *MockClientWithResponsesInterface_CreateClusterWithResponse_Call
- func (_c *MockClientWithResponsesInterface_CreateClusterWithResponse_Call) Run(...) *MockClientWithResponsesInterface_CreateClusterWithResponse_Call
- func (_c *MockClientWithResponsesInterface_CreateClusterWithResponse_Call) RunAndReturn(...) *MockClientWithResponsesInterface_CreateClusterWithResponse_Call
- type MockClientWithResponsesInterface_DeleteClusterWithResponse_Call
- func (_c *MockClientWithResponsesInterface_DeleteClusterWithResponse_Call) Return(_a0 *DeleteClusterResponse, _a1 error) *MockClientWithResponsesInterface_DeleteClusterWithResponse_Call
- func (_c *MockClientWithResponsesInterface_DeleteClusterWithResponse_Call) Run(run func(ctx context.Context, clusterId string, reqEditors ...RequestEditorFn)) *MockClientWithResponsesInterface_DeleteClusterWithResponse_Call
- func (_c *MockClientWithResponsesInterface_DeleteClusterWithResponse_Call) RunAndReturn(...) *MockClientWithResponsesInterface_DeleteClusterWithResponse_Call
- type MockClientWithResponsesInterface_Expecter
- func (_e *MockClientWithResponsesInterface_Expecter) CreateClusterWithBodyWithResponse(ctx interface{}, contentType interface{}, body interface{}, ...) *MockClientWithResponsesInterface_CreateClusterWithBodyWithResponse_Call
- func (_e *MockClientWithResponsesInterface_Expecter) CreateClusterWithResponse(ctx interface{}, body interface{}, reqEditors ...interface{}) *MockClientWithResponsesInterface_CreateClusterWithResponse_Call
- func (_e *MockClientWithResponsesInterface_Expecter) DeleteClusterWithResponse(ctx interface{}, clusterId interface{}, reqEditors ...interface{}) *MockClientWithResponsesInterface_DeleteClusterWithResponse_Call
- func (_e *MockClientWithResponsesInterface_Expecter) GetClusterWithResponse(ctx interface{}, clusterId interface{}, reqEditors ...interface{}) *MockClientWithResponsesInterface_GetClusterWithResponse_Call
- func (_e *MockClientWithResponsesInterface_Expecter) ListClustersWithResponse(ctx interface{}, reqEditors ...interface{}) *MockClientWithResponsesInterface_ListClustersWithResponse_Call
- type MockClientWithResponsesInterface_GetClusterWithResponse_Call
- func (_c *MockClientWithResponsesInterface_GetClusterWithResponse_Call) Return(_a0 *GetClusterResponse, _a1 error) *MockClientWithResponsesInterface_GetClusterWithResponse_Call
- func (_c *MockClientWithResponsesInterface_GetClusterWithResponse_Call) Run(run func(ctx context.Context, clusterId string, reqEditors ...RequestEditorFn)) *MockClientWithResponsesInterface_GetClusterWithResponse_Call
- func (_c *MockClientWithResponsesInterface_GetClusterWithResponse_Call) RunAndReturn(...) *MockClientWithResponsesInterface_GetClusterWithResponse_Call
- type MockClientWithResponsesInterface_ListClustersWithResponse_Call
- func (_c *MockClientWithResponsesInterface_ListClustersWithResponse_Call) Return(_a0 *ListClustersResponse, _a1 error) *MockClientWithResponsesInterface_ListClustersWithResponse_Call
- func (_c *MockClientWithResponsesInterface_ListClustersWithResponse_Call) Run(run func(ctx context.Context, reqEditors ...RequestEditorFn)) *MockClientWithResponsesInterface_ListClustersWithResponse_Call
- func (_c *MockClientWithResponsesInterface_ListClustersWithResponse_Call) RunAndReturn(run func(context.Context, ...RequestEditorFn) (*ListClustersResponse, error)) *MockClientWithResponsesInterface_ListClustersWithResponse_Call
- type Pagination
- type Problem
- type RequestEditorFn
- type Version
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewBearerTokenProvider ¶
func NewBearerTokenProvider(token string) *bearerToken
NewBearerTokenProvider creates a new bearer token authentication provider
func NewCreateClusterRequest ¶
func NewCreateClusterRequest(server string, body CreateClusterJSONRequestBody) (*http.Request, error)
NewCreateClusterRequest calls the generic CreateCluster builder with application/json body
func NewCreateClusterRequestWithBody ¶
func NewCreateClusterRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
NewCreateClusterRequestWithBody generates requests for CreateCluster with any type of body
func NewDeleteClusterRequest ¶
NewDeleteClusterRequest generates requests for DeleteCluster
func NewGetClusterRequest ¶
NewGetClusterRequest generates requests for GetCluster
Types ¶
type Capacity ¶
type Capacity struct { // Cores CPU is the total amount of allocatable millicores Cores *int64 `json:"cores,omitempty"` // Memory Memory is the total amount of allocatable bytes of memory Memory *int64 `json:"memory,omitempty"` // Nodes Nodes is the total number of nodes Nodes *int64 `json:"nodes,omitempty"` }
Capacity defines model for capacity.
type Client ¶
type Client struct { // The endpoint of the server conforming to this interface, with scheme, // https://api.deepmap.com for example. This can contain a path relative // to the server, such as https://api.deepmap.com/dev-test, and all the // paths in the swagger spec will be appended to the server. Server string // Doer for performing requests, typically a *http.Client with any // customized settings, such as certificate chains. Client HttpRequestDoer // A list of callbacks for modifying requests which are generated before sending over // the network. RequestEditors []RequestEditorFn }
Client which conforms to the OpenAPI3 specification for this service.
func NewClient ¶
func NewClient(server string, opts ...ClientOption) (*Client, error)
Creates a new Client, with reasonable defaults
func (*Client) CreateCluster ¶
func (c *Client) CreateCluster(ctx context.Context, body CreateClusterJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) CreateClusterWithBody ¶
func (*Client) DeleteCluster ¶
func (*Client) GetCluster ¶
func (*Client) ListClusters ¶
type ClientInterface ¶
type ClientInterface interface { // ListClusters request ListClusters(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) // CreateClusterWithBody request with any body CreateClusterWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) CreateCluster(ctx context.Context, body CreateClusterJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) // DeleteCluster request DeleteCluster(ctx context.Context, clusterId string, reqEditors ...RequestEditorFn) (*http.Response, error) // GetCluster request GetCluster(ctx context.Context, clusterId string, reqEditors ...RequestEditorFn) (*http.Response, error) }
The interface specification for the client above.
type ClientOption ¶
ClientOption allows setting custom parameters during construction
func WithHTTPClient ¶
func WithHTTPClient(doer HttpRequestDoer) ClientOption
WithHTTPClient allows overriding the default Doer, which is automatically created using http.Client. This is useful for tests.
func WithRequestEditorFn ¶
func WithRequestEditorFn(fn RequestEditorFn) ClientOption
WithRequestEditorFn allows setting up a callback function, which will be called right before sending the request. This can be used to mutate the request.
type ClientWithResponses ¶
type ClientWithResponses struct {
ClientInterface
}
ClientWithResponses builds on ClientInterface to offer response payloads
func NewClientWithResponses ¶
func NewClientWithResponses(server string, opts ...ClientOption) (*ClientWithResponses, error)
NewClientWithResponses creates a new ClientWithResponses, which wraps Client with return type handling
func (*ClientWithResponses) CreateClusterWithBodyWithResponse ¶
func (c *ClientWithResponses) CreateClusterWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateClusterResponse, error)
CreateClusterWithBodyWithResponse request with arbitrary body returning *CreateClusterResponse
func (*ClientWithResponses) CreateClusterWithResponse ¶
func (c *ClientWithResponses) CreateClusterWithResponse(ctx context.Context, body CreateClusterJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateClusterResponse, error)
func (*ClientWithResponses) DeleteClusterWithResponse ¶
func (c *ClientWithResponses) DeleteClusterWithResponse(ctx context.Context, clusterId string, reqEditors ...RequestEditorFn) (*DeleteClusterResponse, error)
DeleteClusterWithResponse request returning *DeleteClusterResponse
func (*ClientWithResponses) GetClusterWithResponse ¶
func (c *ClientWithResponses) GetClusterWithResponse(ctx context.Context, clusterId string, reqEditors ...RequestEditorFn) (*GetClusterResponse, error)
GetClusterWithResponse request returning *GetClusterResponse
func (*ClientWithResponses) ListClustersWithResponse ¶
func (c *ClientWithResponses) ListClustersWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ListClustersResponse, error)
ListClustersWithResponse request returning *ListClustersResponse
type ClientWithResponsesInterface ¶
type ClientWithResponsesInterface interface { // ListClustersWithResponse request ListClustersWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ListClustersResponse, error) // CreateClusterWithBodyWithResponse request with any body CreateClusterWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateClusterResponse, error) CreateClusterWithResponse(ctx context.Context, body CreateClusterJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateClusterResponse, error) // DeleteClusterWithResponse request DeleteClusterWithResponse(ctx context.Context, clusterId string, reqEditors ...RequestEditorFn) (*DeleteClusterResponse, error) // GetClusterWithResponse request GetClusterWithResponse(ctx context.Context, clusterId string, reqEditors ...RequestEditorFn) (*GetClusterResponse, error) }
ClientWithResponsesInterface is the interface specification for the client with responses above.
type Cluster ¶
type Cluster struct { // Context Context is defining the JSON-LD context for dereferencing the data as stated in the JSON-LD specification https://www.w3.org/TR/json-ld/#keywords Context *map[string]interface{} `json:"@context,omitempty"` // Id ID is identifying the node with an IRI as stated in the JSON-LD specification https://www.w3.org/TR/json-ld/#keywords Id *string `json:"@id,omitempty"` // Included Included will container linked resources included here for convenience Included *[]map[string]interface{} `json:"@included,omitempty"` // Type Type is optional explicit definition of the type of node as stated in the JSON-LD specification https://www.w3.org/TR/json-ld/#keywords Type *string `json:"@type,omitempty"` // ApiEndpoint ApiEndpoint is the uri for the Kubernetes api, this may be empty ApiEndpoint *string `json:"apiEndpoint,omitempty"` // Capacity Capacity is the capacity per node type, i.e., control-plane and worker nodes Capacity *map[string]Capacity `json:"capacity,omitempty"` ClientVersion *Version `json:"clientVersion,omitempty"` // ClusterType ClusterType specifies the type of cluster sharing ClusterType *ClusterType `json:"clusterType,omitempty"` // Components Components is a reference to the collection of components detected to be running in the cluster Components *string `json:"components,omitempty"` // Description Description is the humanreadable cluster description of the cluster Description *string `json:"description,omitempty"` // EnvironmentName EnvironmentName specifies the name of the environment to which the cluster is associated - this is generic determined by the cluster provider and tenants but suggested to be, e.g., "production" EnvironmentName *string `json:"environmentName,omitempty"` // Fqdn FQDN is deprecated, was a string identifying the cluster with a DNS valid string often also registered in DNS - this will not be provided going forward please use the NRN Fqdn *string `json:"fqdn,omitempty"` // Images Images is a reference to the collection of images discovered from the cluster Images *string `json:"images,omitempty"` // InfrastructureProvider InfrastructureProvider indicates the provider of the underlying infrastructure, e.g., azure, aws, netic etc. it may not be possible to determine the infrastructure provider InfrastructureProvider *string `json:"infrastructureProvider,omitempty"` // KubernetesProvider KubernetesProvider indicates the Kubernetes distribution, e.g., rke2, aks, eks, kubeadm, etc. KubernetesProvider *string `json:"kubernetesProvider,omitempty"` KubernetesVersion *Version `json:"kubernetesVersion,omitempty"` // Name Name uniquely identifying the cluster within the provider of the cluster Name *string `json:"name,omitempty"` // Namespaces Namespaces is a reference to the collection of namespace for the cluster Namespaces *string `json:"namespaces,omitempty"` // Nrn NRN is the Netic Resource Name uniquely identifying the cluster among all other Netic resource names Nrn *string `json:"nrn,omitempty"` // Partition Partition specifies the partition in which the cluster is running Partition *string `json:"partition,omitempty"` // Provider Provider identification of cluster provider, i.e., the organizational unit responsible for providing the cluster to the tenants Provider *string `json:"provider,omitempty"` // Region Region specifies the region in which the cluster is running Region *string `json:"region,omitempty"` // ResilienceZone ResilienceZone identified the resilienze to which the cluster is associated ResilienceZone *string `json:"resilienceZone,omitempty"` // Subscription Subscription is the Netic subscription identifier used for accounting - this will only be included when the client is authorized for this information Subscription *string `json:"subscription,omitempty"` // Timestamp Timestamp indicating when data was collected Timestamp *time.Time `json:"timestamp,omitempty"` // Vulnerabilities Vulnerabilities is a reference to the collection of vulnerabilities detected from the cluster Vulnerabilities *string `json:"vulnerabilities,omitempty"` // Workloads Workloads is a reference to the collection of workloads for the cluster Workloads *string `json:"workloads,omitempty"` }
Cluster Cluster represents a secure cloud stack Kubernetes cluster
type ClusterType ¶
type ClusterType = string
ClusterType ClusterType specifies the type of cluster sharing
type Clusters ¶
type Clusters struct { // Context Context is defining the JSON-LD context for dereferencing the data as stated in the JSON-LD specification https://www.w3.org/TR/json-ld/#keywords Context *map[string]interface{} `json:"@context,omitempty"` // Id ID is identifying the node with an IRI as stated in the JSON-LD specification https://www.w3.org/TR/json-ld/#keywords Id *string `json:"@id,omitempty"` // Included Included will container linked resources included here for convenience Included *[]map[string]interface{} `json:"@included,omitempty"` // Type Type is optional explicit definition of the type of node as stated in the JSON-LD specification https://www.w3.org/TR/json-ld/#keywords Type *string `json:"@type,omitempty"` // Clusters Clusters is the identification of the clusters in the collection Clusters *[]string `json:"clusters,omitempty"` // Count Count is the number of clusters in the collection Count *int32 `json:"count,omitempty"` // Pagination Pagination contains data on other collection data Pagination *Pagination `json:"pagination,omitempty"` // Total TotalCount is the total number of clusters Total *int32 `json:"total,omitempty"` }
Clusters Clusters represents a collection of clusters
type CreateCluster ¶
type CreateCluster struct { // ApiEndpoint APIEndpoint is the URL for the Kubernetes API server endpoint ApiEndpoint *string `json:"apiEndpoint,omitempty"` // CustomOperationsURL CustomOperationsURL is the URL for the site that documents the custom operations for the cluster. This must be et if HasCustomOperations is enabled. CustomOperationsURL *string `json:"customOperationsURL,omitempty"` // Description Description is the humanreadable cluster description of the cluster Description *string `json:"description,omitempty"` // EnvironmentName EnvironmentName specifies the name of the environment to which the cluster is associated - this is generic determined by the cluster provider and tenants but suggested to be, e.g., "production" EnvironmentName *string `json:"environmentName,omitempty"` // HasApplicationManagement HasApplicationManagement specifies that the service level of the cluster includes Application Management HasApplicationManagement *bool `json:"hasApplicationManagement,omitempty"` // HasApplicationOperations HasApplicationOperations specifies that the service level of the cluster includes Application Operations. This must be enabled if HasApplicationManagement is enabled. HasApplicationOperations *bool `json:"hasApplicationOperations,omitempty"` // HasCustomOperations HasCustomOperations specifies that the service level of the cluster includes Custom Operations. This must en enabled if HasTechnicalManagement is disabled. HasCustomOperations *bool `json:"hasCustomOperations,omitempty"` // HasTechnicalManagement HasTechnicalManagement specifies that the service level of the cluster includes Technical Management. This must be enabled if HasApplicationOperations is enabled. HasTechnicalManagement *bool `json:"hasTechnicalManagement,omitempty"` // HasTechnicalOperations HasTechnicalOperations specifies that the service level of the cluster includes Technical Operations. This must be enabled if HasTechnicalManagement is enabled. HasTechnicalOperations *bool `json:"hasTechnicalOperations,omitempty"` // InfrastructureProvider InfrastructureProvider is the name of the entity that provides the infrastructure for the cluster. One of: "netic", "azure", "aws" InfrastructureProvider *string `json:"infrastructureProvider,omitempty"` // Name Name uniquely identifying the cluster within the provider of the cluster Name *string `json:"name,omitempty"` // Partition Partition is the partition in which the cluster is running. One of: "netic", "azure", "aws" Partition *string `json:"partition,omitempty"` // Provider Provider identification of cluster provider, i.e., the organizational unit responsible for providing the cluster to the tenants Provider *string `json:"provider,omitempty"` // Region Region is the region within the partition in which the cluster is running Region *string `json:"region,omitempty"` // ResilienceZone ResilienceZone is the name of the resilience zone the cluster is running in ResilienceZone *string `json:"resilienceZone,omitempty"` // SubscriptionID SubscriptionID is the subscription ID associated with the cluster SubscriptionID *string `json:"subscriptionID,omitempty"` }
CreateCluster CreateCluster represents the information used to create a secure cloud stack Kubernetes cluster
type CreateClusterJSONRequestBody ¶
type CreateClusterJSONRequestBody = CreateCluster
CreateClusterJSONRequestBody defines body for CreateCluster for application/json ContentType.
type CreateClusterResponse ¶
type CreateClusterResponse struct { Body []byte HTTPResponse *http.Response ApplicationldJSON201 *Cluster ApplicationproblemJSON201 *Cluster ApplicationldJSON400 *Problem ApplicationproblemJSON400 *Problem ApplicationldJSON401 *Problem ApplicationproblemJSON401 *Problem ApplicationldJSON403 *Problem ApplicationproblemJSON403 *Problem ApplicationldJSON409 *Problem ApplicationproblemJSON409 *Problem ApplicationldJSON500 *Problem ApplicationproblemJSON500 *Problem ApplicationldJSONDefault *Cluster ApplicationproblemJSONDefault *Cluster }
func ParseCreateClusterResponse ¶
func ParseCreateClusterResponse(rsp *http.Response) (*CreateClusterResponse, error)
ParseCreateClusterResponse parses an HTTP response from a CreateClusterWithResponse call
func (CreateClusterResponse) Status ¶
func (r CreateClusterResponse) Status() string
Status returns HTTPResponse.Status
func (CreateClusterResponse) StatusCode ¶
func (r CreateClusterResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type DeleteClusterResponse ¶
type DeleteClusterResponse struct { Body []byte HTTPResponse *http.Response ApplicationproblemJSON401 *Problem ApplicationproblemJSON403 *Problem ApplicationproblemJSON404 *Problem ApplicationproblemJSON500 *Problem }
func ParseDeleteClusterResponse ¶
func ParseDeleteClusterResponse(rsp *http.Response) (*DeleteClusterResponse, error)
ParseDeleteClusterResponse parses an HTTP response from a DeleteClusterWithResponse call
func (DeleteClusterResponse) Status ¶
func (r DeleteClusterResponse) Status() string
Status returns HTTPResponse.Status
func (DeleteClusterResponse) StatusCode ¶
func (r DeleteClusterResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetClusterResponse ¶
type GetClusterResponse struct { Body []byte HTTPResponse *http.Response ApplicationldJSON401 *Problem ApplicationproblemJSON401 *Problem ApplicationldJSON404 *Problem ApplicationproblemJSON404 *Problem ApplicationldJSON500 *Problem ApplicationproblemJSON500 *Problem ApplicationldJSONDefault *Cluster ApplicationproblemJSONDefault *Cluster }
func ParseGetClusterResponse ¶
func ParseGetClusterResponse(rsp *http.Response) (*GetClusterResponse, error)
ParseGetClusterResponse parses an HTTP response from a GetClusterWithResponse call
func (GetClusterResponse) Status ¶
func (r GetClusterResponse) Status() string
Status returns HTTPResponse.Status
func (GetClusterResponse) StatusCode ¶
func (r GetClusterResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type HttpRequestDoer ¶
Doer performs HTTP requests.
The standard http.Client implements this interface.
type ListClustersResponse ¶
type ListClustersResponse struct { Body []byte HTTPResponse *http.Response ApplicationldJSON400 *Problem ApplicationproblemJSON400 *Problem ApplicationldJSON401 *Problem ApplicationproblemJSON401 *Problem ApplicationldJSON500 *Problem ApplicationproblemJSON500 *Problem ApplicationldJSONDefault *Clusters ApplicationproblemJSONDefault *Clusters }
func ParseListClustersResponse ¶
func ParseListClustersResponse(rsp *http.Response) (*ListClustersResponse, error)
ParseListClustersResponse parses an HTTP response from a ListClustersWithResponse call
func (ListClustersResponse) Status ¶
func (r ListClustersResponse) Status() string
Status returns HTTPResponse.Status
func (ListClustersResponse) StatusCode ¶
func (r ListClustersResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type MockClientWithResponsesInterface ¶
MockClientWithResponsesInterface is an autogenerated mock type for the ClientWithResponsesInterface type
func NewMockClientWithResponsesInterface ¶
func NewMockClientWithResponsesInterface(t interface { mock.TestingT Cleanup(func()) }) *MockClientWithResponsesInterface
NewMockClientWithResponsesInterface creates a new instance of MockClientWithResponsesInterface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.
func (*MockClientWithResponsesInterface) CreateClusterWithBodyWithResponse ¶
func (_m *MockClientWithResponsesInterface) CreateClusterWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateClusterResponse, error)
CreateClusterWithBodyWithResponse provides a mock function with given fields: ctx, contentType, body, reqEditors
func (*MockClientWithResponsesInterface) CreateClusterWithResponse ¶
func (_m *MockClientWithResponsesInterface) CreateClusterWithResponse(ctx context.Context, body CreateCluster, reqEditors ...RequestEditorFn) (*CreateClusterResponse, error)
CreateClusterWithResponse provides a mock function with given fields: ctx, body, reqEditors
func (*MockClientWithResponsesInterface) DeleteClusterWithResponse ¶
func (_m *MockClientWithResponsesInterface) DeleteClusterWithResponse(ctx context.Context, clusterId string, reqEditors ...RequestEditorFn) (*DeleteClusterResponse, error)
DeleteClusterWithResponse provides a mock function with given fields: ctx, clusterId, reqEditors
func (*MockClientWithResponsesInterface) EXPECT ¶
func (_m *MockClientWithResponsesInterface) EXPECT() *MockClientWithResponsesInterface_Expecter
func (*MockClientWithResponsesInterface) GetClusterWithResponse ¶
func (_m *MockClientWithResponsesInterface) GetClusterWithResponse(ctx context.Context, clusterId string, reqEditors ...RequestEditorFn) (*GetClusterResponse, error)
GetClusterWithResponse provides a mock function with given fields: ctx, clusterId, reqEditors
func (*MockClientWithResponsesInterface) ListClustersWithResponse ¶
func (_m *MockClientWithResponsesInterface) ListClustersWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ListClustersResponse, error)
ListClustersWithResponse provides a mock function with given fields: ctx, reqEditors
type MockClientWithResponsesInterface_CreateClusterWithBodyWithResponse_Call ¶
MockClientWithResponsesInterface_CreateClusterWithBodyWithResponse_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateClusterWithBodyWithResponse'
func (*MockClientWithResponsesInterface_CreateClusterWithBodyWithResponse_Call) Run ¶
func (_c *MockClientWithResponsesInterface_CreateClusterWithBodyWithResponse_Call) Run(run func(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn)) *MockClientWithResponsesInterface_CreateClusterWithBodyWithResponse_Call
func (*MockClientWithResponsesInterface_CreateClusterWithBodyWithResponse_Call) RunAndReturn ¶
func (_c *MockClientWithResponsesInterface_CreateClusterWithBodyWithResponse_Call) RunAndReturn(run func(context.Context, string, io.Reader, ...RequestEditorFn) (*CreateClusterResponse, error)) *MockClientWithResponsesInterface_CreateClusterWithBodyWithResponse_Call
type MockClientWithResponsesInterface_CreateClusterWithResponse_Call ¶
MockClientWithResponsesInterface_CreateClusterWithResponse_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateClusterWithResponse'
func (*MockClientWithResponsesInterface_CreateClusterWithResponse_Call) Run ¶
func (_c *MockClientWithResponsesInterface_CreateClusterWithResponse_Call) Run(run func(ctx context.Context, body CreateCluster, reqEditors ...RequestEditorFn)) *MockClientWithResponsesInterface_CreateClusterWithResponse_Call
func (*MockClientWithResponsesInterface_CreateClusterWithResponse_Call) RunAndReturn ¶
func (_c *MockClientWithResponsesInterface_CreateClusterWithResponse_Call) RunAndReturn(run func(context.Context, CreateCluster, ...RequestEditorFn) (*CreateClusterResponse, error)) *MockClientWithResponsesInterface_CreateClusterWithResponse_Call
type MockClientWithResponsesInterface_DeleteClusterWithResponse_Call ¶
MockClientWithResponsesInterface_DeleteClusterWithResponse_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteClusterWithResponse'
func (*MockClientWithResponsesInterface_DeleteClusterWithResponse_Call) Run ¶
func (_c *MockClientWithResponsesInterface_DeleteClusterWithResponse_Call) Run(run func(ctx context.Context, clusterId string, reqEditors ...RequestEditorFn)) *MockClientWithResponsesInterface_DeleteClusterWithResponse_Call
func (*MockClientWithResponsesInterface_DeleteClusterWithResponse_Call) RunAndReturn ¶
func (_c *MockClientWithResponsesInterface_DeleteClusterWithResponse_Call) RunAndReturn(run func(context.Context, string, ...RequestEditorFn) (*DeleteClusterResponse, error)) *MockClientWithResponsesInterface_DeleteClusterWithResponse_Call
type MockClientWithResponsesInterface_Expecter ¶
type MockClientWithResponsesInterface_Expecter struct {
// contains filtered or unexported fields
}
func (*MockClientWithResponsesInterface_Expecter) CreateClusterWithBodyWithResponse ¶
func (_e *MockClientWithResponsesInterface_Expecter) CreateClusterWithBodyWithResponse(ctx interface{}, contentType interface{}, body interface{}, reqEditors ...interface{}) *MockClientWithResponsesInterface_CreateClusterWithBodyWithResponse_Call
CreateClusterWithBodyWithResponse is a helper method to define mock.On call
- ctx context.Context
- contentType string
- body io.Reader
- reqEditors ...RequestEditorFn
func (*MockClientWithResponsesInterface_Expecter) CreateClusterWithResponse ¶
func (_e *MockClientWithResponsesInterface_Expecter) CreateClusterWithResponse(ctx interface{}, body interface{}, reqEditors ...interface{}) *MockClientWithResponsesInterface_CreateClusterWithResponse_Call
CreateClusterWithResponse is a helper method to define mock.On call
- ctx context.Context
- body CreateCluster
- reqEditors ...RequestEditorFn
func (*MockClientWithResponsesInterface_Expecter) DeleteClusterWithResponse ¶
func (_e *MockClientWithResponsesInterface_Expecter) DeleteClusterWithResponse(ctx interface{}, clusterId interface{}, reqEditors ...interface{}) *MockClientWithResponsesInterface_DeleteClusterWithResponse_Call
DeleteClusterWithResponse is a helper method to define mock.On call
- ctx context.Context
- clusterId string
- reqEditors ...RequestEditorFn
func (*MockClientWithResponsesInterface_Expecter) GetClusterWithResponse ¶
func (_e *MockClientWithResponsesInterface_Expecter) GetClusterWithResponse(ctx interface{}, clusterId interface{}, reqEditors ...interface{}) *MockClientWithResponsesInterface_GetClusterWithResponse_Call
GetClusterWithResponse is a helper method to define mock.On call
- ctx context.Context
- clusterId string
- reqEditors ...RequestEditorFn
func (*MockClientWithResponsesInterface_Expecter) ListClustersWithResponse ¶
func (_e *MockClientWithResponsesInterface_Expecter) ListClustersWithResponse(ctx interface{}, reqEditors ...interface{}) *MockClientWithResponsesInterface_ListClustersWithResponse_Call
ListClustersWithResponse is a helper method to define mock.On call
- ctx context.Context
- reqEditors ...RequestEditorFn
type MockClientWithResponsesInterface_GetClusterWithResponse_Call ¶
MockClientWithResponsesInterface_GetClusterWithResponse_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetClusterWithResponse'
func (*MockClientWithResponsesInterface_GetClusterWithResponse_Call) Run ¶
func (_c *MockClientWithResponsesInterface_GetClusterWithResponse_Call) Run(run func(ctx context.Context, clusterId string, reqEditors ...RequestEditorFn)) *MockClientWithResponsesInterface_GetClusterWithResponse_Call
func (*MockClientWithResponsesInterface_GetClusterWithResponse_Call) RunAndReturn ¶
func (_c *MockClientWithResponsesInterface_GetClusterWithResponse_Call) RunAndReturn(run func(context.Context, string, ...RequestEditorFn) (*GetClusterResponse, error)) *MockClientWithResponsesInterface_GetClusterWithResponse_Call
type MockClientWithResponsesInterface_ListClustersWithResponse_Call ¶
MockClientWithResponsesInterface_ListClustersWithResponse_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListClustersWithResponse'
func (*MockClientWithResponsesInterface_ListClustersWithResponse_Call) Run ¶
func (_c *MockClientWithResponsesInterface_ListClustersWithResponse_Call) Run(run func(ctx context.Context, reqEditors ...RequestEditorFn)) *MockClientWithResponsesInterface_ListClustersWithResponse_Call
func (*MockClientWithResponsesInterface_ListClustersWithResponse_Call) RunAndReturn ¶
func (_c *MockClientWithResponsesInterface_ListClustersWithResponse_Call) RunAndReturn(run func(context.Context, ...RequestEditorFn) (*ListClustersResponse, error)) *MockClientWithResponsesInterface_ListClustersWithResponse_Call
type Pagination ¶
type Pagination struct { // First First is link to the first page in the collection First *string `json:"first,omitempty"` // Last Last is link to the last page in the collection Last *string `json:"last,omitempty"` // Next Next is link to the next page, if any Next *string `json:"next,omitempty"` // Prev Prev is link to the previous page, if any Prev *string `json:"prev,omitempty"` }
Pagination Pagination contains data on other collection data
type Problem ¶
type Problem struct { // Detail Detail is humanreadable explanation of the specific occurence of the problem RFC-9457#3.1.4 Detail *string `json:"detail,omitempty"` // Instance Instance identifies the specific instance of the problem RFC-9457#3.1.5 Instance *string `json:"instance,omitempty"` // Status Status is the http status code and must be consistent with the server status code RFC-9457#3.1.2 Status *int32 `json:"status,omitempty"` // Title Title is short humanreadable summary RFC-9457#3.1.3 Title *string `json:"title,omitempty"` // Type Type identify problem type RFC-9457#3.1.1 Type *string `json:"type,omitempty"` }
Problem Problem is simple implementation of (RFC9457)[https://datatracker.ietf.org/doc/html/rfc9457]
type RequestEditorFn ¶
RequestEditorFn is the function signature for the RequestEditor callback function
type Version ¶
type Version struct { // Commit Commit is the commit sha of the source code for the binary Commit *string `json:"commit,omitempty"` // Date Date is the date the binary was build Date *string `json:"date,omitempty"` // Version Version is the semver version Version *string `json:"version,omitempty"` }
Version defines model for version.