ssc

package
v1.13.6 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Command = &cli.Command{
	Name:        "ssc",
	Aliases:     nil,
	Usage:       "fnc ssc --cn=common_name .",
	Description: "create self signed ca",
	ArgsUsage:   "",
	Category:    "",
	Flags: []cli.Flag{
		&cli.StringFlag{
			Required: false,
			Name:     "cn",
			Value:    "",
			Usage:    "common name",
		},
		&cli.BoolFlag{
			Required: false,
			Name:     "full",
			Value:    false,
			Usage:    "create all tls files",
		},
	},
	Action: func(ctx *cli.Context) (err error) {
		cn := ctx.String("cn")
		if cn == "" {
			cn = "FNS"
		}
		full := ctx.Bool("full")
		outputDir := strings.TrimSpace(ctx.Args().First())
		if outputDir == "" {
			err = errors.Warning("fnc: create ssc failed").WithCause(errors.Warning("output is undefined"))
			return
		}
		err = generate(cn, full, outputDir)
		if err != nil {
			err = errors.Warning("fnc: create ssc failed").WithCause(err)
			return
		}
		return
	},
}

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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