Documentation ¶
Index ¶
- Constants
- func GetContextFilePath() (string, error)
- func GetCurrentOrgAndContextFilePath() (string, error)
- func GetToken() (string, error)
- func NewOrganizationCmd(streams genericiooptions.IOStreams) *cobra.Command
- func NewRequest(method, path, token string, requestBody []byte) ([]byte, error)
- func SetCurrentOrgAndContext(currentOrgAndContext *CurrentOrgAndContext) error
- type CloudOrganization
- type CurrentOrgAndContext
- type ErrorResponse
- type OrgItem
- type Organization
- type OrganizationOption
- type Organizations
Constants ¶
View Source
const ( CloudContextDir = "cloud_context" CurrentOrgAndContextFile = "current.json" ContextFile = "context.json" )
View Source
const OrgAPIName = "organizations"
Variables ¶
This section is empty.
Functions ¶
func GetContextFilePath ¶
func NewOrganizationCmd ¶
func NewOrganizationCmd(streams genericiooptions.IOStreams) *cobra.Command
func SetCurrentOrgAndContext ¶
func SetCurrentOrgAndContext(currentOrgAndContext *CurrentOrgAndContext) error
SetCurrentOrgAndContext TODO:Check whether the newly set context and org exist.
Types ¶
type CloudOrganization ¶
func (*CloudOrganization) GetOrganizations ¶
func (o *CloudOrganization) GetOrganizations() (*Organizations, error)
func (*CloudOrganization) IsValidOrganization ¶
func (o *CloudOrganization) IsValidOrganization(name string) (bool, error)
type CurrentOrgAndContext ¶
type CurrentOrgAndContext struct { CurrentOrganization string `json:"currentOrganization"` CurrentContext string `json:"currentContext"` }
func GetCurrentOrgAndContext ¶
func GetCurrentOrgAndContext() (*CurrentOrgAndContext, error)
type ErrorResponse ¶
type Organization ¶
type Organization interface { GetOrganizations() (*Organizations, error) IsValidOrganization(name string) (bool, error) // contains filtered or unexported methods }
type OrganizationOption ¶
type OrganizationOption struct { Name string OutputFormat string Organization Organization genericiooptions.IOStreams }
type Organizations ¶
type Organizations struct {
Items []OrgItem `json:"items"`
}
Click to show internal directories.
Click to hide internal directories.