org

package
v0.46.0 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2025 License: Apache-2.0 Imports: 33 Imported by: 0

Documentation

Index

Constants

View Source
const (
	USER_SEARCH = 1
	EBS_SEARCH  = 2
)
View Source
const ServiceLogDaysSince = 30
View Source
const (
	StatusActive = "Active"
)

Variables

This section is empty.

Functions

func AddOutputFlag

func AddOutputFlag(flags *pflag.FlagSet)

func ContextCmd added in v0.44.0

func ContextCmd(fetcher ContextFetcher) *cobra.Command

func IsJsonOutput

func IsJsonOutput() bool

func NewCmdOrg

func NewCmdOrg() *cobra.Command

func PrintJson

func PrintJson(data interface{})

func SearchAllSubscriptionsByOrg added in v0.18.0

func SearchAllSubscriptionsByOrg(orgID string, status string, managedOnly bool) ([]*accountsv1.Subscription, error)

func SearchSubscriptions added in v0.18.0

func SearchSubscriptions(orgId string, status string) ([]*accountsv1.Subscription, error)

Types

type AWSAccountItems

type AWSAccountItems struct {
	Accounts []types.Child `json:"items"`
}

type AccountItem

type AccountItem struct {
	Org Organization `json:"organization"`
}

type AccountItems

type AccountItems struct {
	AccountItems []AccountItem `json:"items"`
}

type ClusterInfo added in v0.18.0

type ClusterInfo struct {
	Name                  string
	Version               string
	ID                    string
	CloudProvider         string
	Plan                  string
	NodeCount             float64
	ServiceLogs           []*v1.LogEntry
	PdAlerts              map[string][]pd.Incident
	JiraIssues            []jira.Issue
	LimitedSupportReasons []*cmv1.LimitedSupportReason
}

type ContextFetcher added in v0.44.0

type ContextFetcher interface {
	FetchContext(orgID string, output io.Writer) ([]ClusterInfo, error)
}

type Customer

type Customer struct {
	ID             string `json:"id"`
	OrganizationID string `json:"organization-id"`
	SKU            string `json:"sku"`
}

type CustomerItems

type CustomerItems struct {
	Customers []Customer `json:"items"`
}

type DefaultContextFetcher added in v0.44.0

type DefaultContextFetcher struct {
	CreateOCMClient     func() (*sdk.Connection, error)
	SearchSubscriptions func(orgID string, status string, managedOnly bool) ([]*accountsv1.Subscription, error)
	GetCluster          func(*sdk.Connection, string) (*cmv1.Cluster, error)
	GetLimitedSupport   func(*sdk.Connection, string) ([]*cmv1.LimitedSupportReason, error)
	GetServiceLogs      func(string, time.Time, bool, bool) ([]*v1.LogEntry, error)
	GetJiraIssues       func(clusterID, externalID, filter string) ([]jira.Issue, error)
	NewPDClient         func(baseDomain string) (PDClient, error)
}

func NewDefaultContextFetcher added in v0.44.0

func NewDefaultContextFetcher() *DefaultContextFetcher

func (*DefaultContextFetcher) FetchContext added in v0.44.0

func (f *DefaultContextFetcher) FetchContext(orgID string, output io.Writer) ([]ClusterInfo, error)

type Label

type Label struct {
	ID    string `json:"id"`
	Key   string `json:"key"`
	Value string `json:"value"`
}

type LabelItems

type LabelItems struct {
	Labels []Label `json:"items"`
}

type OrgItems

type OrgItems struct {
	Orgs []Organization `json:"items"`
}

type Organization

type Organization struct {
	ID           string `json:"id"`
	ExternalID   string `json:"external_id"`
	Name         string `json:"name"`
	EBSAccoundID string `json:"ebs_account_id"`
	Created      string `json:"created_at"`
	Updated      string `json:"updated_at"`
}

type PDClient added in v0.44.0

type PDClient interface {
	GetPDServiceIDs() ([]string, error)
	GetFiringAlertsForCluster([]string) (map[string][]pd.Incident, error)
}

type UserItems

type UserItems struct {
	Users []*userModel `json:"items"`
}

Jump to

Keyboard shortcuts

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