cluster

package
v0.4.5 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewClusterRenderer

func NewClusterRenderer(cluster *clusterResponse, jsonData []byte, writer io.Writer) *clusterRenderer

NewClusterRenderer creates a new renderer of a single cluster

func NewClustersRenderer

func NewClustersRenderer(clusters *clusterListResponse, jsonData []byte, writer io.Writer, noHeaders bool) *clustersRenderer

NewClustersRenderer creates a new renderer for a list of clusters

Types

type ClusterList

type ClusterList struct {
	Included []map[string]interface{}
	Clusters []string
}

func (*ClusterList) MarshalJSON

func (cl *ClusterList) MarshalJSON() ([]byte, error)

func (*ClusterList) ToResponse

func (cl *ClusterList) ToResponse() *clusterListResponse

type CreateClusterInput

type CreateClusterInput struct {
	Logger                   logger.Logger
	APIClient                apiclient.ClientWithResponsesInterface
	Name                     string
	Description              string
	EnvironmentName          string
	Provider                 string
	Partition                string
	Region                   string
	ResilienceZone           string
	SubscriptionID           string
	InfrastructureProvider   string
	HasTechnicalOperations   bool
	HasTechnicalManagement   bool
	HasApplicationOperations bool
	HasApplicationManagement bool
	HasCustomOperations      bool
	CustomOperationsURL      string
	APIEndpoint              string
}

CreateClusterInput is the input used by CreateCluster()

type CreateClusterResult

type CreateClusterResult struct {
	ClusterResponse *clusterResponse
	JSONResponse    []byte
	Problem         *apiclient.Problem
}

CreateClusterResult is the result of CreateCluster

func CreateCluster

func CreateCluster(ctx context.Context, in CreateClusterInput) (*CreateClusterResult, error)

CreateCluster creates a cluster

type DeleteClusterInput

type DeleteClusterInput struct {
	Logger    logger.Logger
	APIClient apiclient.ClientWithResponsesInterface
}

DeleteClusterInput is the input used by DeleteCluster()

type DeleteClusterResult

type DeleteClusterResult struct {
	Problem *apiclient.Problem
}

DeleteClusterResult is the result of DeleteCluster

func DeleteCluster

func DeleteCluster(ctx context.Context, clusterID string, in DeleteClusterInput) (*DeleteClusterResult, error)

DeleteCluster deletes a cluster

type GetClusterInput

type GetClusterInput struct {
	Logger    logger.Logger
	APIClient apiclient.ClientWithResponsesInterface
}

GetClusterInput is the input used by GetCluster()

type GetClusterResult

type GetClusterResult struct {
	ClusterResponse *clusterResponse
	JSONResponse    []byte
	Problem         *apiclient.Problem
}

GetClusterResult is the result of GetCluster

func GetCluster

func GetCluster(ctx context.Context, clusterID string, in GetClusterInput) (*GetClusterResult, error)

GetCluster returns information abuot a cluster

type ListClusterResults

type ListClusterResults struct {
	ClusterListResponse *clusterListResponse
	JSONResponse        []byte
	Problem             *apiclient.Problem
}

ListClusterResults is the result of ListClusters

func ListClusters

func ListClusters(ctx context.Context, in ListClustersInput) (*ListClusterResults, error)

ListClusters returns a non-paginated list of clusters

type ListClustersInput

type ListClustersInput struct {
	// Logger is a logger
	Logger logger.Logger
	// APIClient is the inventory server API client used to make requests
	APIClient apiclient.ClientWithResponsesInterface
	// Page is the initial page (0-based index)
	Page int
	// PerPage is the number of items requested for each page
	PerPage int
}

ListClustersInput is the input given to ListClusters()

type Renderer

type Renderer interface {
	Render(format string) error
}

Jump to

Keyboard shortcuts

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