lib

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2023 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PaginationQuit  = -1
	PaginationOther = -2

	ShowOtherMinPages = 4
)

Variables

This section is empty.

Functions

func DownloadEnvironmentKubeConfig added in v0.8.2

func DownloadEnvironmentKubeConfig(kubeConfigPath, environmentID string) error

func FormatCommandData

func FormatCommandData(cmd *cobra.Command, data interface{}) error

func FormatCommandError

func FormatCommandError(cmd *cobra.Command, err error) error

func FormatRequestResult

func FormatRequestResult(cmd *cobra.Command, data interface{}, resp *http.Response, err error) error

func GetAPI

func GetAPI() *sdk.APIClient

func GetAPIFromProfile added in v0.10.0

func GetAPIFromProfile(profile config.Profile) *sdk.APIClient

func GetComponent added in v0.7.0

func GetComponent(componentID string) (*bunnysdk.ComponentItem, *http.Response, error)

func GetComponentResources added in v0.7.0

func GetComponentResources(componentID string) ([]bunnysdk.ComponentResourceItem, *http.Response, error)

func GetComponents added in v0.7.0

func GetComponents(environment, operationStatus string) (
	*bunnysdk.PaginatedComponentCollection,
	*http.Response,
	error,
)

func GetContext

func GetContext() (context.Context, context.CancelFunc)

func GetContextFromProfile

func GetContextFromProfile(profile config.Profile) (context.Context, context.CancelFunc)

func GetEnvironment added in v0.7.0

func GetEnvironment(environmentID string) (*bunnysdk.EnvironmentItem, *http.Response, error)

func GetEnvironments added in v0.7.0

func GetEnvironments(projectID string) (*bunnysdk.PaginatedEnvironmentCollection, *http.Response, error)

func GetOrganization added in v0.7.0

func GetOrganization(organizationID string) (*bunnysdk.OrganizationItem, *http.Response, error)

func GetOrganizations added in v0.7.0

func GetProfile

func GetProfile() config.Profile

func GetProject added in v0.7.0

func GetProject(projectID string) (*bunnysdk.ProjectItem, *http.Response, error)

func GetProjects added in v0.7.0

func GetProjects(organization string) (*bunnysdk.PaginatedProjectCollection, *http.Response, error)

func ProcessPagination added in v0.9.0

func ProcessPagination(cmd *cobra.Command, m ModelWithPagination) (int32, error)

func ShowCollection added in v0.9.0

func ShowCollection(cmd *cobra.Command, page int32, generator CollectionGenerator) error

Types

type CollectionGenerator added in v0.9.0

type CollectionGenerator func(page int32) (ModelWithPagination, *http.Response, error)

type ModelWithPagination added in v0.9.0

type ModelWithPagination interface {
	GetPage() int32

	GetItemsPerPage() int32

	GetTotalItems() int32
}

Jump to

Keyboard shortcuts

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