Documentation
¶
Index ¶
- Constants
- Variables
- func Check(err error)
- func CheckWithMessage(err error, message string)
- func DefaultClient() *openapi_client.APIClient
- func Exit(code int)
- func Fail(message string)
- func GetAPIToken() string
- func GetAPIURL() string
- func GetOutputFormat() string
- func NewAPIClient(config *ClientConfig) *openapi_client.APIClient
- func ParseYamlResourceHeaders(raw []byte) (string, string, error)
- type ClientConfig
Constants ¶
View Source
const ( ConfigKeyAPIURL = "api_url" ConfigKeyAPIToken = "api_token" ConfigKeyFormat = "output_format" )
Configuration keys
View Source
const (
DefaultAPIURL = "http://localhost:8000"
)
Variables ¶
View Source
var RootCmd = &cobra.Command{ Use: "superplane", Short: "SuperPlane command line interface", Long: `SuperPlane CLI - Command line interface for the SuperPlane API`, PersistentPreRun: func(cmd *cobra.Command, args []string) { if !Verbose { log.SetOutput(io.Discard) } }, }
View Source
var Verbose bool
Functions ¶
func Check ¶
func Check(err error)
Checks if an error is present.
If it is present, it displays the error and exits with status 1.
If you want to display a custom message use CheckWithMessage.
func CheckWithMessage ¶
Checks if an error is present.
If it is present, it displays the provided message and exits with status 1.
func DefaultClient ¶
func DefaultClient() *openapi_client.APIClient
func GetAPIToken ¶
func GetAPIToken() string
func GetOutputFormat ¶
func GetOutputFormat() string
func NewAPIClient ¶
func NewAPIClient(config *ClientConfig) *openapi_client.APIClient
Types ¶
type ClientConfig ¶
func NewClientConfig ¶
func NewClientConfig() *ClientConfig
Click to show internal directories.
Click to hide internal directories.