status

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Cmd = &cobra.Command{
	Use:     "status",
	Short:   "API status commands",
	Long:    "Check API status. Running 'adapto status' directly returns the API health status.",
	Example: "adapto status --json",
	RunE: func(cmd *cobra.Command, args []string) error {
		c, _, err := cmdutil.NewClientWithAuth()
		if err != nil {
			return err
		}

		resp, err := c.GetStatusManageStatusGetWithResponse(cmdutil.Ctx())
		if err != nil {
			return err
		}
		if err := cmdutil.CheckErr(resp.HTTPResponse, resp.Body); err != nil {
			return err
		}

		var data map[string]interface{}
		_ = json.Unmarshal(resp.Body, &data)
		output.Print(data, func(d interface{}) {
			m := d.(map[string]interface{})
			for k, v := range m {
				fmt.Printf("%s: %v\n", k, v)
			}
		})
		return nil
	},
}

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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