Documentation ¶
Index ¶
- Constants
- Variables
- func DownloadEnvironmentKubeConfig(kubeConfigPath, environmentID string) error
- func FormatCommandData(cmd *cobra.Command, data interface{}) error
- func FormatCommandError(cmd *cobra.Command, err error) error
- func FormatRequestResult(cmd *cobra.Command, data interface{}, resp *http.Response, err error) error
- func GetAPI() *sdk.APIClient
- func GetAPIFromProfile(profile config.Profile) *sdk.APIClient
- func GetContext() (context.Context, context.CancelFunc)
- func GetContextFromProfile(profile config.Profile) (context.Context, context.CancelFunc)
- func GetProfile() config.Profile
- func OnlyStylish(cmd *cobra.Command, args []string) error
- func ProcessPagination(cmd *cobra.Command, m ModelWithPagination) (int32, error)
- func ShowCollection(cmd *cobra.Command, options Options, generator CollectionGenerator) error
- type CollectionGenerator
- type ModelWithPagination
- type Options
Constants ¶
View Source
const ( PaginationQuit = -1 PaginationOther = -2 ShowOtherMinPages = 4 )
Variables ¶
View Source
var ErrGeneric = errors.New("oops! Something went wrong")
View Source
var ErrNotStylish = errors.New("only stylish format is supported")
Functions ¶
func DownloadEnvironmentKubeConfig ¶ added in v0.8.2
func FormatCommandData ¶
func FormatRequestResult ¶
func GetAPIFromProfile ¶ added in v0.10.0
func GetContext ¶
func GetContext() (context.Context, context.CancelFunc)
func GetContextFromProfile ¶
func GetProfile ¶
func ProcessPagination ¶ added in v0.9.0
func ProcessPagination(cmd *cobra.Command, m ModelWithPagination) (int32, error)
func ShowCollection ¶ added in v0.9.0
func ShowCollection(cmd *cobra.Command, options Options, generator CollectionGenerator) error
Types ¶
type CollectionGenerator ¶ added in v0.9.0
type CollectionGenerator func() (ModelWithPagination, error)
type ModelWithPagination ¶ added in v0.9.0
Click to show internal directories.
Click to hide internal directories.