utils

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExecuteCommand

func ExecuteCommand(cmd *cobra.Command, args ...string) (output string, err error)

func FormatItem

func FormatItem[T any](columns []string, item T, outputFormat string, w io.Writer)

func FormatItemTable

func FormatItemTable[T any](columns []string, item T, w *tabwriter.Writer)

func GetHost added in v0.3.8

func GetHost() string

func GetHostAuth added in v0.3.8

func GetHostAuth() string

Types

type HTTPListResponse

type HTTPListResponse[T any] struct {
	Items             []T `json:"items"`
	CurrentItemsCount int `json:"current_items_count"`
	CurrentPage       int `json:"current_page"`
	TotalCount        int `json:"total_count"`
	ItemsPerPage      int `json:"items_per_page"`
	LastPage          int `json:"last_page"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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