cli

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2026 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultAPIURL     = "http://localhost:8000"
	ConfigKeyAPIURL   = "api_url"
	ConfigKeyAPIToken = "api_token"
	ConfigKeyFormat   = "output_format"
)

Variables

View Source
var OutputFormat string
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 CheckWithMessage

func CheckWithMessage(err error, message string)

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 Exit

func Exit(code int)

func GetAPIToken

func GetAPIToken() string

func GetAPIURL

func GetAPIURL() string

func GetOutputFormat

func GetOutputFormat() string

func NewAPIClient

func NewAPIClient(config *ClientConfig) *openapi_client.APIClient

Types

type ClientConfig

type ClientConfig struct {
	BaseURL    string
	APIToken   string
	HTTPClient *http.Client
}

func NewClientConfig

func NewClientConfig() *ClientConfig

Directories

Path Synopsis
commands

Jump to

Keyboard shortcuts

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