utils

package
v1.3.1-beta.1 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Version  = "dev"
	Sha      = "HEAD"
	Datetime = "dev"
)

Functions

func GetMaxTableRowWidth added in v1.0.0

func GetMaxTableRowWidth(rows []bubblesTable.Row) int

func GetOwnerAndRepoFromURL added in v1.0.0

func GetOwnerAndRepoFromURL(input string) (owner, repo string, err error)

GetOwnerAndRepoFromURL: extracts the owner and repository name

func HandleRepositoryValues added in v1.0.0

func HandleRepositoryValues(repos []string, filePath string) (map[string]struct{}, error)

func OutputJSON added in v1.0.0

func OutputJSON(entity interface{}) (string, error)

func OutputTable added in v1.0.0

func OutputTable(rows []bubblesTable.Row, columns []bubblesTable.Column) string

func OutputYAML added in v1.0.0

func OutputYAML(entity interface{}) (string, error)

func SetupRootCommand

func SetupRootCommand(rootCmd *cobra.Command)

SetupRootCommand is a convenience utility for applying templates and nice user experience pieces to the root cobra command

Types

type PosthogCliClient added in v1.0.0

type PosthogCliClient struct {
	// contains filtered or unexported fields
}

PosthogCliClient is a wrapper around the posthog-go client and is used as a API entrypoint for sending OpenSauced telemetry data for CLI commands

func NewPosthogCliClient added in v1.0.0

func NewPosthogCliClient(activated bool) *PosthogCliClient

NewPosthogCliClient returns a PosthogCliClient which can be used to capture telemetry events for CLI users

func (*PosthogCliClient) CaptureCodeownersGenerate added in v1.3.0

func (p *PosthogCliClient) CaptureCodeownersGenerate()

func (*PosthogCliClient) CaptureCodeownersGenerateAuth added in v1.3.0

func (p *PosthogCliClient) CaptureCodeownersGenerateAuth(username string)

func (*PosthogCliClient) CaptureCodeownersGenerateContributorInsight added in v1.3.0

func (p *PosthogCliClient) CaptureCodeownersGenerateContributorInsight()

func (*PosthogCliClient) CaptureFailedCodeownersGenerate added in v1.3.0

func (p *PosthogCliClient) CaptureFailedCodeownersGenerate()

func (*PosthogCliClient) CaptureFailedCodeownersGenerateAuth added in v1.3.0

func (p *PosthogCliClient) CaptureFailedCodeownersGenerateAuth()

func (*PosthogCliClient) CaptureFailedCodeownersGenerateContributorInsight added in v1.3.0

func (p *PosthogCliClient) CaptureFailedCodeownersGenerateContributorInsight()

func (*PosthogCliClient) CaptureFailedInsights added in v1.3.0

func (p *PosthogCliClient) CaptureFailedInsights()

func (*PosthogCliClient) CaptureFailedLogin added in v1.0.0

func (p *PosthogCliClient) CaptureFailedLogin()

CaptureFailedLogin gathers telemetry on failed logins via the CLI

func (*PosthogCliClient) CaptureInsights added in v1.3.0

func (p *PosthogCliClient) CaptureInsights()

func (*PosthogCliClient) CaptureLogin added in v1.0.0

func (p *PosthogCliClient) CaptureLogin(username string)

CaptureLogin gathers telemetry on users who log into OpenSauced via the CLI

func (*PosthogCliClient) Done added in v1.0.0

func (p *PosthogCliClient) Done()

Done should always be called in order to flush the Posthog buffers before the CLI exits to ensure all events are accurately captured.

Jump to

Keyboard shortcuts

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