admincli

package
v1.0.0-rc1 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	DefaultAPIURL   = "http://localhost:8000"
	ConfigKeyURL    = "url"
	ConfigKeyToken  = "token"
	ConfigKeyOutput = "output"
)

Variables

View Source
var (
	Verbose      bool
	OutputFormat string
)
View Source
var RootCmd = &cobra.Command{
	Use:   "admin",
	Short: "Manage a SuperPlane installation",
	PersistentPreRunE: func(_ *cobra.Command, _ []string) error {
		if !Verbose {
			log.SetOutput(io.Discard)
		}
		if GetAPIToken() == "" {
			return fmt.Errorf(
				"installation admin token is required; set INSTALLATION_ADMIN_TOKEN or use --token",
			)
		}
		return nil
	},
}

Functions

func DefaultClient

func DefaultClient() *openapi_client.APIClient

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