survey

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2023 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ISODateLayout = "2006-01-02"
)

Variables

This section is empty.

Functions

func AskDirectoryName

func AskDirectoryName(root string) (string, error)

AskDirectoryName asks and returns the directory name of the new spec folder

func AskWorkingDirectory

func AskWorkingDirectory(specFS afero.Fs, rootDirPath string) (string, error)

AskWorkingDirectory asks and returns the directory where the new spec folder should be created

Types

type BackupCreateSurvey

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

BackupCreateSurvey defines survey for creating backup

func NewBackupCreateSurvey

func NewBackupCreateSurvey(logger log.Logger) *BackupCreateSurvey

NewBackupCreateSurvey initializes surveys for creating backup

func (*BackupCreateSurvey) AskBackupDescription

func (*BackupCreateSurvey) AskBackupDescription() (string, error)

AskBackupDescription asks the user the need of backup creation

func (*BackupCreateSurvey) AskResourceNames

func (*BackupCreateSurvey) AskResourceNames() (string, error)

AskResourceNames asks the user to add resource name for creating backup

type ExtensionSurvey

type ExtensionSurvey struct{}

ExtensionSurvey defines survey for extension

func NewExtensionSurvey

func NewExtensionSurvey() *ExtensionSurvey

NewExtensionSurvey initializes extension survey

func (*ExtensionSurvey) AskConfirmClean

func (*ExtensionSurvey) AskConfirmClean() (bool, error)

AskConfirmClean asks the user to confirm clean

func (*ExtensionSurvey) AskConfirmUninstall

func (*ExtensionSurvey) AskConfirmUninstall(commandName string) (bool, error)

AskConfirmUninstall asks the user to confirm uninstallation

type InititalizeSurvey

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

InititalizeSurvey defines surveys related to init client config

func NewInitializeSurvey

func NewInitializeSurvey(logger log.Logger) *InititalizeSurvey

NewInitializeSurvey initializes init survey

func (*InititalizeSurvey) AskInitClientConfig

func (i *InititalizeSurvey) AskInitClientConfig(dirPath string) (*config.ClientConfig, error)

AskInitClientConfig askes the user to init client config

func (*InititalizeSurvey) AskToConfirm

func (*InititalizeSurvey) AskToConfirm(message, help string, defaultValue bool) (bool, error)

AskToConfirm askes the user to confirm on a message

type JobAddHookSurvey

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

JobAddHookSurvey defines survey for job add hook

func NewJobAddHookSurvey

func NewJobAddHookSurvey() *JobAddHookSurvey

NewJobAddHookSurvey initializes job add hook survey

func (*JobAddHookSurvey) AskToAddHook

func (j *JobAddHookSurvey) AskToAddHook(pluginRepo *models.PluginRepository, jobSpec *model.JobSpec) (*model.JobSpec, error)

AskToAddHook asks questions to add hook to a job

type JobCreateSurvey

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

JobCreateSurvey defines survey for job creation operation

func NewJobCreateSurvey

func NewJobCreateSurvey() *JobCreateSurvey

NewJobCreateSurvey initializes job create survey

func (*JobCreateSurvey) AskToCreateJob

func (j *JobCreateSurvey) AskToCreateJob(pluginRepo *models.PluginRepository, jobSpecReader local.SpecReader[*model.JobSpec], jobDir, defaultJobName string) (model.JobSpec, error)

AskToCreateJob asks questions to create job

type JobSurvey

type JobSurvey struct {
}

JobSurvey defines survey for job specification in general

func NewJobSurvey

func NewJobSurvey() *JobSurvey

NewJobSurvey initializes job survey

func (*JobSurvey) AskToSelectJobName

func (*JobSurvey) AskToSelectJobName(jobSpecReader local.SpecReader[*model.JobSpec], jobDirPath string) (string, error)

AskToSelectJobName asks to select job name

type NamespaceSurvey

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

NamespaceSurvey defines surveys related to namespace

func NewNamespaceSurvey

func NewNamespaceSurvey(logger log.Logger) *NamespaceSurvey

NewNamespaceSurvey initializes namespace survey

func (*NamespaceSurvey) AskToSelectNamespace

func (n *NamespaceSurvey) AskToSelectNamespace(clientConfig *config.ClientConfig) (*config.Namespace, error)

AskToSelectNamespace askesk the user through CLI about namespace to be selected

type ResourceSpecCreateSurvey

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

ResourceSpecCreateSurvey defines surveys for resource spec creation

func NewResourceSpecCreateSurvey

func NewResourceSpecCreateSurvey(resourceSpecReader local.SpecReader[*model.ResourceSpec]) *ResourceSpecCreateSurvey

NewResourceSpecCreateSurvey initializes survey for resource spec create

func (ResourceSpecCreateSurvey) AskResourceSpecName

func (r ResourceSpecCreateSurvey) AskResourceSpecName(rootDirPath string) (string, error)

AskResourceSpecName asks the user to input the required resource spec name

func (ResourceSpecCreateSurvey) AskResourceSpecType

func (ResourceSpecCreateSurvey) AskResourceSpecType() (string, error)

type SecretSetSurvey

type SecretSetSurvey struct{}

SecretSetSurvey defines survey for setting secret

func NewSecretSetSurvey

func NewSecretSetSurvey() *SecretSetSurvey

NewSecretSetSurvey initializes survey to set secret

func (*SecretSetSurvey) AskToConfirmUpdate

func (*SecretSetSurvey) AskToConfirmUpdate() (bool, error)

AskToConfirmUpdate asks the user to confirm updating secret

Jump to

Keyboard shortcuts

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