apiclient

package
v0.4.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 22, 2024 License: MIT Imports: 11 Imported by: 0

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

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

func NewDeleteClusterRequest(server string, clusterId string) (*http.Request, error)

NewDeleteClusterRequest generates requests for DeleteCluster

func NewGetClusterRequest

func NewGetClusterRequest(server string, clusterId string) (*http.Request, error)

NewGetClusterRequest generates requests for GetCluster

func NewListClustersRequest

func NewListClustersRequest(server string) (*http.Request, error)

NewListClustersRequest generates requests for ListClusters

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 (c *Client) CreateClusterWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) DeleteCluster

func (c *Client) DeleteCluster(ctx context.Context, clusterId string, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GetCluster

func (c *Client) GetCluster(ctx context.Context, clusterId string, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) ListClusters

func (c *Client) ListClusters(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)

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

type ClientOption func(*Client) error

ClientOption allows setting custom parameters during construction

func WithBaseURL

func WithBaseURL(baseURL string) ClientOption

WithBaseURL overrides the baseURL.

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

type HttpRequestDoer interface {
	Do(req *http.Request) (*http.Response, error)
}

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

type MockClientWithResponsesInterface struct {
	mock.Mock
}

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 (*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

type MockClientWithResponsesInterface_CreateClusterWithBodyWithResponse_Call struct {
	*mock.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

type MockClientWithResponsesInterface_CreateClusterWithResponse_Call

type MockClientWithResponsesInterface_CreateClusterWithResponse_Call struct {
	*mock.Call
}

MockClientWithResponsesInterface_CreateClusterWithResponse_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateClusterWithResponse'

func (*MockClientWithResponsesInterface_CreateClusterWithResponse_Call) Return

func (*MockClientWithResponsesInterface_CreateClusterWithResponse_Call) Run

type MockClientWithResponsesInterface_DeleteClusterWithResponse_Call

type MockClientWithResponsesInterface_DeleteClusterWithResponse_Call struct {
	*mock.Call
}

MockClientWithResponsesInterface_DeleteClusterWithResponse_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteClusterWithResponse'

func (*MockClientWithResponsesInterface_DeleteClusterWithResponse_Call) Return

func (*MockClientWithResponsesInterface_DeleteClusterWithResponse_Call) Run

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

type MockClientWithResponsesInterface_GetClusterWithResponse_Call struct {
	*mock.Call
}

MockClientWithResponsesInterface_GetClusterWithResponse_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetClusterWithResponse'

func (*MockClientWithResponsesInterface_GetClusterWithResponse_Call) Return

func (*MockClientWithResponsesInterface_GetClusterWithResponse_Call) Run

type MockClientWithResponsesInterface_ListClustersWithResponse_Call

type MockClientWithResponsesInterface_ListClustersWithResponse_Call struct {
	*mock.Call
}

MockClientWithResponsesInterface_ListClustersWithResponse_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListClustersWithResponse'

func (*MockClientWithResponsesInterface_ListClustersWithResponse_Call) Return

func (*MockClientWithResponsesInterface_ListClustersWithResponse_Call) Run

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

type RequestEditorFn func(ctx context.Context, req *http.Request) error

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL