subscription

package
v0.1.8 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddLabel

func AddLabel(subscriptionID string, key string, value string, isInternal bool, conn *sdk.Connection) (*v1.Label, error)

func DeleteLabel

func DeleteLabel(subscriptionID string, key string, conn *sdk.Connection) error

func GetSubscription

func GetSubscription(subscriptionID string, conn *sdk.Connection) (*v1.Subscription, error)

func GetSubscriptions

func GetSubscriptions(key string, searchStr string, limit int, fetchLabels bool, fetchCapabilities bool, searchOnly bool, conn *sdk.Connection) ([]*v1.Subscription, error)

func GetSubscriptionsByOrg

func GetSubscriptionsByOrg(organizationId string, conn *sdk.Connection) ([]*v1.Subscription, error)

func ValidateSubscription

func ValidateSubscription(subscriptionID string, conn *sdk.Connection) error

Types

type Subscription

type Subscription struct {
	types.Meta
	CloudProviderID   string                                 `json:"cloud_provider_id"`
	ClusterID         string                                 `json:"cluster_id"`
	ConsoleURL        string                                 `json:"console_url"`
	CreatedAt         time.Time                              `json:"created_at"`
	ExternalClusterID string                                 `json:"external_cluster_id"`
	HREF              string                                 `json:"href"`
	ID                string                                 `json:"id"`
	Managed           bool                                   `json:"managed"`
	OrganizationId    string                                 `json:"organization_id"`
	PlanID            string                                 `json:"plan_id"`
	Status            string                                 `json:"status"`
	SupportLevel      string                                 `json:"support_level"`
	UpdatedAt         time.Time                              `json:"updated_at"`
	Labels            label.LabelsList                       `json:"labels,omitempty"`
	Capabilities      capability.CapabilityList              `json:"capabilities,omitempty"`
	ReservedResources reserved_resource.ReservedResourceList `json:"reserved_resources,omitempty"`
	Roles             []rolebinding.SubscriptionsRoleBinding `json:"roles,omitempty"`
}

func PresentSubscription

func PresentSubscription(subscription *v1.Subscription, reservedResources []*v1.ReservedResource, roles []*v1.RoleBinding) Subscription

func PresentSubscriptions

func PresentSubscriptions(subscriptions []*v1.Subscription) []Subscription

Jump to

Keyboard shortcuts

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