context

package
v0.7.2-beta.0 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2023 License: AGPL-3.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewContextCmd

func NewContextCmd(streams genericiooptions.IOStreams) *cobra.Command

Types

type CloudContext

type CloudContext struct {
	ContextName  string
	Token        string
	OrgName      string
	APIURL       string
	APIPath      string
	OutputFormat string

	genericiooptions.IOStreams
}

func (*CloudContext) GetContext

func (c *CloudContext) GetContext() (*CloudContextResponse, error)

func (*CloudContext) GetContexts

func (c *CloudContext) GetContexts() ([]CloudContextResponse, error)

type CloudContextResponse

type CloudContextResponse struct {
	ID          uuid.UUID `json:"id"`
	Name        string    `json:"name"`
	OrgName     string    `json:"orgName"`
	Description string    `json:"description,omitempty"`
	DisplayName string    `json:"displayName,omitempty"`
	State       string    `json:"state"`
	CreatedAt   time.Time `json:"createdAt"`
	UpdatedAt   time.Time `json:"updatedAt"`
}

type CloudContextsResponse

type CloudContextsResponse struct {
	APIVersion string `json:"apiVersion"`
	Kind       string `json:"kind"`
	Metadata   struct {
		Count int `json:"count"`
		Limit int `json:"limit"`
	} `json:"metadata"`
	Items []ClusterItem `json:"items"`
}

type ClusterData

type ClusterData struct {
	ClusterBlueprint string `json:"cluster_blueprint"`
	Projects         []struct {
		ProjectID string `json:"projectID"`
		ClusterID string `json:"clusterID"`
	} `json:"projects"`
	ClusterStatus ClusterStatus `json:"cluster_status"`
}

type ClusterItem

type ClusterItem struct {
	Metadata Metadata    `json:"metadata"`
	Spec     ClusterSpec `json:"spec"`
}

type ClusterSpec

type ClusterSpec struct {
	ClusterType      string      `json:"clusterType"`
	Metro            struct{}    `json:"metro"`
	OverrideSelector string      `json:"overrideSelector"`
	Params           Params      `json:"params"`
	ProxyConfig      struct{}    `json:"proxyConfig"`
	ClusterData      ClusterData `json:"clusterData"`
}

type ClusterStatus

type ClusterStatus struct {
	Conditions []struct {
		Type        string `json:"type"`
		LastUpdated struct {
			Seconds int `json:"seconds"`
			Nanos   int `json:"nanos"`
		} `json:"lastUpdated"`
		Reason string `json:"reason"`
	} `json:"conditions"`
	Token              string `json:"token"`
	PublishedBlueprint string `json:"publishedBlueprint"`
}

type Context

type Context interface {
	// contains filtered or unexported methods
}

type ContextOptions

type ContextOptions struct {
	ContextName  string
	Context      Context
	OutputFormat string

	genericiooptions.IOStreams
}

type Metadata

type Metadata struct {
	Name         string `json:"name"`
	Description  string `json:"description"`
	Project      string `json:"project"`
	Organization string `json:"organization"`
	Partner      string `json:"partner"`
	ID           string `json:"id"`
	CreatedAt    struct {
		Seconds int `json:"seconds"`
		Nanos   int `json:"nanos"`
	} `json:"createdAt"`
	ModifiedAt struct {
		Seconds int `json:"seconds"`
		Nanos   int `json:"nanos"`
	} `json:"modifiedAt"`
}

type MockContext

type MockContext struct {
	genericiooptions.IOStreams
}

type Params

type Params struct {
	KubernetesProvider   string `json:"kubernetesProvider"`
	ProvisionEnvironment string `json:"provisionEnvironment"`
	ProvisionType        string `json:"provisionType"`
	State                string `json:"state"`
}

type Status

type Status struct {
	ConditionStatus int `json:"conditionStatus"`
}

Jump to

Keyboard shortcuts

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