cmdutil

package
v0.25.0 Latest Latest
Warning

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

Go to latest
Published: May 12, 2023 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TSFormatLayout = "2006-01-02 15:04:05"
)

Variables

This section is empty.

Functions

func Client

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

Create admin client

func ConfirmPrompt

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

func DefaultProjectName

func DefaultProjectName() string

func FetchUserID added in v0.25.0

func FetchUserID(ctx context.Context, cfg *config.Config) (string, error)

func InputPrompt

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

func IsNameExistsErr

func IsNameExistsErr(err error) bool

func OrgExists

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

func OrgNames

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

func PrintInvites

func PrintInvites(invites []*adminv1.UserInvite)

func PrintMembers

func PrintMembers(members []*adminv1.Member)

func ProjectExists

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

func ProjectNamesByGithubURL

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

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

func ProjectNamesByOrg

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

func SelectPrompt

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

func SelectPromptIfEmpty

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

func Spinner

func Spinner(prefix string) *spinner.Spinner

func StringPromptIfEmpty

func StringPromptIfEmpty(input *string, msg string)

func SuccessPrinter

func SuccessPrinter(str string)

func TablePrinter

func TablePrinter(v interface{})

func WarnPrinter

func WarnPrinter(str string)

Types

type PreRunCheck

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

func CheckAuth

func CheckAuth(cfg *config.Config) PreRunCheck

func CheckChain

func CheckChain(chain ...PreRunCheck) PreRunCheck

func CheckOrganization

func CheckOrganization(cfg *config.Config) PreRunCheck

Jump to

Keyboard shortcuts

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