utils

package
v1.0.2 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const FEATURE_EXPERIMENTATION = "fe"
View Source
const HOME_CLI = ".cli"
View Source
const WEB_EXPERIMENTATION = "we"

Variables

This section is empty.

Functions

func CheckSingleFlag

func CheckSingleFlag(bool1, bool2 bool) bool

func DefaultGlobalCodeWorkingDir

func DefaultGlobalCodeWorkingDir() string

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 GetFeatureExperimentationHost

func GetFeatureExperimentationHost() string

func GetHostFeatureExperimentationAuth

func GetHostFeatureExperimentationAuth() string

func GetHostWebExperimentationAuth

func GetHostWebExperimentationAuth() string

func GetWebExperimentationHost

func GetWebExperimentationHost() string

Types

type HTTPListResponseFE

type HTTPListResponseFE[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"`
}

type HTTPListResponseWE

type HTTPListResponseWE[T any] struct {
	Data       []T        `json:"_data"`
	Pagination Pagination `json:"_pagination"`
}

type Pagination

type Pagination struct {
	Total      int `json:"_total"`
	Pages      int `json:"_pages"`
	Page       int `json:"_page"`
	MaxPerPage int `json:"_max_per_page"`
}

Jump to

Keyboard shortcuts

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