Rough wiring for basics of connecting to onboarding flow

This commit is contained in:
Alan Christopher Thomas 2019-09-10 16:29:03 -06:00 committed by max furman
parent 961be1fbc7
commit 8f08b47a9c

View file

@ -35,49 +35,33 @@ func init() {
// appHelpTemplate contains the modified template for the main app // appHelpTemplate contains the modified template for the main app
var appHelpTemplate = `## NAME var appHelpTemplate = `## NAME
**{{.HelpName}}** -- {{.Usage}} **{{.HelpName}}** -- {{.Usage}}
## USAGE ## USAGE
{{if .UsageText}}{{.UsageText}}{{else}}**{{.HelpName}}**{{if .Commands}} <command>{{end}} {{if .ArgsUsage}}{{.ArgsUsage}}{{else}}_[arguments]_{{end}}{{end}}{{if .Description}} {{if .UsageText}}{{.UsageText}}{{else}}**{{.HelpName}}**{{if .Commands}} <command>{{end}} {{if .ArgsUsage}}{{.ArgsUsage}}{{else}}_[arguments]_{{end}}{{end}}{{if .Description}}
## DESCRIPTION ## DESCRIPTION
{{.Description}}{{end}}{{if .VisibleCommands}} {{.Description}}{{end}}{{if .VisibleCommands}}
## COMMANDS ## COMMANDS
{{range .VisibleCategories}}{{if .Name}}{{.Name}}:{{end}} {{range .VisibleCategories}}{{if .Name}}{{.Name}}:{{end}}
||| |||
|---|---|{{range .VisibleCommands}} |---|---|{{range .VisibleCommands}}
| **{{join .Names ", "}}** | {{.Usage}} |{{end}} | **{{join .Names ", "}}** | {{.Usage}} |{{end}}
{{end}}{{if .VisibleFlags}}{{end}} {{end}}{{if .VisibleFlags}}{{end}}
## OPTIONS ## OPTIONS
{{range $index, $option := .VisibleFlags}}{{if $index}} {{range $index, $option := .VisibleFlags}}{{if $index}}
{{end}}{{$option}} {{end}}{{$option}}
{{end}}{{end}}{{if .Copyright}}{{if len .Authors}} {{end}}{{end}}{{if .Copyright}}{{if len .Authors}}
## AUTHOR{{with $length := len .Authors}}{{if ne 1 $length}}S{{end}}{{end}}: ## AUTHOR{{with $length := len .Authors}}{{if ne 1 $length}}S{{end}}{{end}}:
{{range $index, $author := .Authors}}{{if $index}} {{range $index, $author := .Authors}}{{if $index}}
{{end}}{{$author}}{{end}}{{end}}{{if .Version}}{{if not .HideVersion}} {{end}}{{$author}}{{end}}{{end}}{{if .Version}}{{if not .HideVersion}}
## ONLINE ## ONLINE
This documentation is available online at https://smallstep.com/docs/certificates This documentation is available online at https://smallstep.com/docs/certificates
## VERSION ## VERSION
{{.Version}}{{end}}{{end}} {{.Version}}{{end}}{{end}}
## COPYRIGHT ## COPYRIGHT
{{.Copyright}} {{.Copyright}}
## FEEDBACK ` + ## FEEDBACK ` +
html.UnescapeString("&#"+strconv.Itoa(128525)+";") + " " + html.UnescapeString("&#"+strconv.Itoa(128525)+";") + " " +
html.UnescapeString("&#"+strconv.Itoa(127867)+";") + html.UnescapeString("&#"+strconv.Itoa(127867)+";") +
` `
The **step-ca** utility is not instrumented for usage statistics. It does not phone home. The **step-ca** utility is not instrumented for usage statistics. It does not phone home.
But your feedback is extremely valuable. Any information you can provide regarding how youre using **step-ca** helps. But your feedback is extremely valuable. Any information you can provide regarding how youre using **step-ca** helps.
Please send us a sentence or two, good or bad: **feedback@smallstep.com** or join https://gitter.im/smallstep/community. Please send us a sentence or two, good or bad: **feedback@smallstep.com** or join https://gitter.im/smallstep/community.
@ -105,30 +89,21 @@ func main() {
app.UsageText = `**step-ca** <config> [**--password-file**=<file>] [**--help**] [**--version**]` app.UsageText = `**step-ca** <config> [**--password-file**=<file>] [**--help**] [**--version**]`
app.Description = `**step-ca** runs the Step Online Certificate Authority app.Description = `**step-ca** runs the Step Online Certificate Authority
(Step CA) using the given configuration. (Step CA) using the given configuration.
See the README.md for more detailed configuration documentation. See the README.md for more detailed configuration documentation.
## POSITIONAL ARGUMENTS ## POSITIONAL ARGUMENTS
<config> <config>
: File that configures the operation of the Step CA; this file is generated : File that configures the operation of the Step CA; this file is generated
when you initialize the Step CA using 'step ca init' when you initialize the Step CA using 'step ca init'
## EXIT CODES ## EXIT CODES
This command will run indefinitely on success and return \>0 if any error occurs. This command will run indefinitely on success and return \>0 if any error occurs.
## EXAMPLES ## EXAMPLES
These examples assume that you have already initialized your PKI by running These examples assume that you have already initialized your PKI by running
'step ca init'. If you have not completed this step please see the 'Getting Started' 'step ca init'. If you have not completed this step please see the 'Getting Started'
section of the README. section of the README.
Run the Step CA and prompt for password: Run the Step CA and prompt for password:
''' '''
$ step-ca $STEPPATH/config/ca.json $ step-ca $STEPPATH/config/ca.json
''' '''
Run the Step CA and read the password from a file - this is useful for Run the Step CA and read the password from a file - this is useful for
automating deployment: automating deployment:
''' '''