Exemplo n.º 1
0
// NewGenerate returns a secret with default values
func NewGenerate() *Generate {
	generate := &Generate{
		App:            app.Null(),
		name:           "generate",
		noSymbols:      password.NewNoSymbols(),
		passwordLength: password.NewLength(),
		url:            generate.NewUrl(),
		userName:       generate.NewUserName(),
	}
	generate.execute = generateExecuteFn(generate)
	return generate
}
Exemplo n.º 2
0
func registerGenerateCommandFlagsWithPassgoRegistrar(passgo *app.App) *app.App {
	url := generate.NewUrl()
	url.Set("https://cip.li")
	passgo.Register(url.Name(), url)

	userName := generate.NewUserName()
	userName.Set("zap_rowsdower")
	passgo.Register(userName.Name(), userName)

	pLength := password.NewLength()
	pLength.Set("10")
	passgo.Register(pLength.Name(), pLength)

	noSymbols := password.NewNoSymbols()
	passgo.Register(noSymbols.Name(), noSymbols)

	return passgo
}
Exemplo n.º 3
0
func NewUserNameFlag() *generate.UserName {
	return generate.NewUserName()
}