Documentation
¶
Index ¶
- Constants
- func AddOutputFlag(flags *pflag.FlagSet)
- func ContextCmd(fetcher ContextFetcher) *cobra.Command
- func IsJsonOutput() bool
- func NewCmdOrg() *cobra.Command
- func PrintJson(data interface{})
- func SearchAllSubscriptionsByOrg(orgID string, status string, managedOnly bool) ([]*accountsv1.Subscription, error)
- func SearchSubscriptions(orgId string, status string) ([]*accountsv1.Subscription, error)
- type AWSAccountItems
- type AccountItem
- type AccountItems
- type ClusterInfo
- type ContextFetcher
- type Customer
- type CustomerItems
- type DefaultContextFetcher
- type Label
- type LabelItems
- type OrgItems
- type Organization
- type PDClient
- type UserItems
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 ContextCmd ¶ added in v0.44.0
func ContextCmd(fetcher ContextFetcher) *cobra.Command
func IsJsonOutput ¶
func IsJsonOutput() bool
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 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 ContextFetcher ¶ added in v0.44.0
type ContextFetcher interface {
FetchContext(orgID string, output io.Writer) ([]ClusterInfo, error)
}
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 LabelItems ¶
type LabelItems struct {
Labels []Label `json:"items"`
}
type OrgItems ¶
type OrgItems struct {
Orgs []Organization `json:"items"`
}
type Organization ¶
Click to show internal directories.
Click to hide internal directories.