cmdutil

package
v0.24.1 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2023 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Client added in v0.24.0

func Client(cfg *config.Config) (*client.Client, error)

Create admin client

func ConfirmPrompt added in v0.24.0

func ConfirmPrompt(msg, help string, def bool) bool

func InputPrompt added in v0.24.0

func InputPrompt(msg, def string) (string, error)

func IsNameExistsErr added in v0.24.1

func IsNameExistsErr(err error) bool

func OrgExists added in v0.24.0

func OrgExists(ctx context.Context, c *client.Client, name string) (bool, error)

func OrgNames added in v0.24.1

func OrgNames(ctx context.Context, c *client.Client) ([]string, error)

func PrintInvites added in v0.24.0

func PrintInvites(invites []*adminv1.UserInvite)

func PrintMembers added in v0.24.0

func PrintMembers(members []*adminv1.Member)

func ProjectExists added in v0.24.0

func ProjectExists(ctx context.Context, c *client.Client, orgName, projectName string) (bool, error)

func ProjectNames added in v0.24.1

func ProjectNames(ctx context.Context, c *client.Client, org, githubURL string) ([]string, error)

ProjectNames returns names of all the projects in org deployed from githubURL

func SelectPrompt added in v0.24.0

func SelectPrompt(msg string, options []string, def string) string

func SelectPromptIfEmpty added in v0.24.1

func SelectPromptIfEmpty(input *string, msg string, options []string, def string)

func Spinner

func Spinner(prefix string) *spinner.Spinner

func StringPromptIfEmpty added in v0.24.1

func StringPromptIfEmpty(input *string, msg string)

func SuccessPrinter added in v0.24.0

func SuccessPrinter(str string)

func TablePrinter

func TablePrinter(v interface{})

func WarnPrinter added in v0.24.0

func WarnPrinter(str string)

Types

type PreRunCheck added in v0.24.0

type PreRunCheck func(cmd *cobra.Command, args []string) error

func CheckAuth

func CheckAuth(cfg *config.Config) PreRunCheck

func CheckChain added in v0.24.0

func CheckChain(chain ...PreRunCheck) PreRunCheck

func CheckOrganization added in v0.24.0

func CheckOrganization(cfg *config.Config) PreRunCheck

Jump to

Keyboard shortcuts

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