Documentation
¶
Index ¶
- Constants
- func IsLocalCluster(kubeContext string) (bool, error)
- type Analytics
- type Auth
- type Cluster
- type ClusterProvider
- type EnvSec
- type EnvSecConfig
- type ErrorLogger
- type InitSurveyProvider
- type NamespaceProvider
- type NoOpLogger
- type Providers
- type RepoConfig
- type Repository
- type SurveyAnswers
- type User
Constants ¶
View Source
const ( WebServiceType serviceTypeOption = "Web Service" CronjobServiceType serviceTypeOption = "Cron Job" JetpackManagedCluster string = "Jetpack managed cluster" CreateJetpackCluster string = "Create a new cluster with Jetpack" ImageRepositoryFlagHelpMsg = "Image repository to push the built image to. " + "Your kubernetes cluster must have the permissions to pull images from this repository." )
Variables ¶
This section is empty.
Functions ¶
func IsLocalCluster ¶
Types ¶
type Analytics ¶
type Analytics interface { Track(ctx context.Context, event string, options map[string]any) Close() error }
func DefaultAnalyticsProvider ¶
func DefaultAnalyticsProvider() Analytics
type Auth ¶
type Cluster ¶
type ClusterProvider ¶
type ClusterProvider interface { // Get returns the preferred Cluster to be used for the current command. Get(ctx context.Context) (Cluster, error) // GetAll returns all Clusters available to the user. May be empty. GetAll(ctx context.Context) ([]Cluster, error) GetSelectedClusterName() *string SetSelectedClusterName(name string) }
func KubeConfigClusterProvider ¶
func KubeConfigClusterProvider() ClusterProvider
type EnvSec ¶
type EnvSec interface { // string here refers to "selected provider" Get(context.Context, string) (EnvSecConfig, error) NewEnvId(ctx context.Context, projectId string, env string) (*envsec.EnvID, error) }
func DefaultEnvSecProvider ¶
func DefaultEnvSecProvider() EnvSec
type EnvSecConfig ¶
type ErrorLogger ¶
type ErrorLogger interface { CaptureException(exception error) // DisplayException displays an error to the user. This is useful for custom error that padcli // would otherwise not know how to display in a user-friendly way. Returns true if the error // is displayed. If true, the caller can continue without doing further error handling. DisplayException(err error) bool }
type InitSurveyProvider ¶
type InitSurveyProvider interface { Run( ctx context.Context, authProvider Auth, appName string, ) (*SurveyAnswers, error) }
func DefaultInitSurveyProvider ¶
func DefaultInitSurveyProvider(cp ClusterProvider) InitSurveyProvider
type NamespaceProvider ¶
type NamespaceProvider interface {
Get(ctx context.Context, ns string, kubeContext string, e api.Environment) (string, error)
}
func KubeConfigNamespaceProvider ¶
func KubeConfigNamespaceProvider() NamespaceProvider
type NoOpLogger ¶
type NoOpLogger struct{}
func (*NoOpLogger) CaptureException ¶
func (l *NoOpLogger) CaptureException(err error)
func (*NoOpLogger) DisplayException ¶
func (l *NoOpLogger) DisplayException(err error) bool
type Providers ¶
type Providers interface { AnalyticsProvider() Analytics AuthProvider() Auth ClusterProvider() ClusterProvider EnvSecProvider() EnvSec ErrorLogger() ErrorLogger InitSurveyProvider() InitSurveyProvider NamespaceProvider() NamespaceProvider RepositoryProvider() Repository }
Keep abc
type RepoConfig ¶
type Repository ¶
type Repository interface { // string here is the image repository address (excluding the image tag). // It is left as "" if using the default provided image repository Get(context.Context, Cluster, string) (RepoConfig, error) }
func EmptyRepository ¶
func EmptyRepository() Repository
type SurveyAnswers ¶
Click to show internal directories.
Click to hide internal directories.