Documentation ¶
Index ¶
- Constants
- func AskDirectoryName(root string) (string, error)
- func AskWorkingDirectory(specFS afero.Fs, rootDirPath string) (string, error)
- type BackupCreateSurvey
- type ExtensionSurvey
- type InititalizeSurvey
- type JobAddHookSurvey
- type JobCreateSurvey
- type JobDeleteSurvey
- type JobSurvey
- type NamespaceSurvey
- type ResourceSpecCreateSurvey
- type SecretSetSurvey
Constants ¶
const (
ISODateLayout = "2006-01-02"
)
Variables ¶
This section is empty.
Functions ¶
func AskDirectoryName ¶
AskDirectoryName asks and returns the directory name of the new spec folder
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(logger log.Logger) *JobCreateSurvey
NewJobCreateSurvey initializes job create survey
func (*JobCreateSurvey) AskToCreateJob ¶
func (j *JobCreateSurvey) AskToCreateJob( pluginRepo *models.PluginRepository, jobSpecReader local.SpecReader[*model.JobSpec], jobDir string, presets model.PresetsMap, ) (model.JobSpec, error)
AskToCreateJob asks questions to create job
type JobDeleteSurvey ¶ added in v0.10.2
type JobDeleteSurvey struct{}
JobDeleteSurvey defines survey for job deletion operation
func NewJobDeleteSurvey ¶ added in v0.10.2
func NewJobDeleteSurvey() *JobDeleteSurvey
func (*JobDeleteSurvey) AskToConfirm ¶ added in v0.10.2
func (*JobDeleteSurvey) AskToConfirm(jobName string) (bool, error)
AskToConfirm asks question to confirm whether to delete the specified job or not
func (*JobDeleteSurvey) AskToConfirmCleanHistory ¶ added in v0.10.2
func (*JobDeleteSurvey) AskToConfirmCleanHistory(jobName string) (bool, error)
AskToConfirmCleanHistory asks question to confirm whether a clean history delete to the specified job is to be done or not
func (*JobDeleteSurvey) AskToConfirmForce ¶ added in v0.10.2
func (*JobDeleteSurvey) AskToConfirmForce(jobName string) (bool, error)
AskToConfirmForce asks question to confirm whether a force delete to the specified job is to be done or not
type JobSurvey ¶
type JobSurvey struct{}
JobSurvey defines survey for job specification in general
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