{"modulePath":"github.com/letsencrypt/cfssl","version":"v0.0.0-20151001190313-d88cd6e1f39f","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package cli\n\nPackage cli provides the template for adding new cfssl commands\n\n## Functions\n\n```go\nfunc PopFirstArgument(args []string) (string, []string, error)\n```\nPopFirstArgument returns the first element and the rest of a string slice and return error if failed to do so. It is a helper function to parse non-flag arguments previously used in cfssl commands.\n\n```go\nfunc PrintCert(key, csrBytes, cert []byte)\n```\nPrintCert outputs a cert, key and csr to stdout\n\n```go\nfunc PrintOCSPResponse(resp []byte)\n```\nPrintOCSPResponse outputs an OCSP response to stdout ocspResponse is base64 encoded\n\n```go\nfunc ReadStdin(filename string) ([]byte, error)\n```\nReadStdin reads from stdin if the file is \"-\"\n\n```go\nfunc RootFromConfig(c *Config) universal.Root\n```\nRootFromConfig returns a universal signer Root structure that can be used to produce a signer.\n\n```go\nfunc Start(cmds map[string]*Command) error\n```\nStart is the entrance point of cfssl command line tools.\n\n## Types\n\n```go\ntype Command struct {\n\t// The Usage Text\n\tUsageText string\n\t// Flags to look up in the global table\n\tFlags []string\n\t// Main runs the command, args are the arguments after flags\n\tMain func(args []string, c Config) error\n}\n```\nCommand holds the implementation details of a cfssl command.\n\n```go\ntype Config struct {\n\tHostname          string\n\tCertFile          string\n\tCSRFile           string\n\tCAFile            string\n\tCAKeyFile         string\n\tKeyFile           string\n\tIntermediatesFile string\n\tCABundleFile      string\n\tIntBundleFile     string\n\tAddress           string\n\tPort              int\n\tPassword          string\n\tConfigFile        string\n\tCFG               *config.Config\n\tProfile           string\n\tIsCA              bool\n\tIntDir            string\n\tFlavor            string\n\tMetadata          string\n\tDomain            string\n\tIP                string\n\tRemote            string\n\tLabel             string\n\tAuthKey           string\n\tModule            string\n\tToken             string\n\tPIN               string\n\tPKCS11Label       string\n\tResponderFile     string\n\tResponderKeyFile  string\n\tStatus            string\n\tReason            int\n\tRevokedAt         string\n\tInterval          int64\n\tList              bool\n\tFamily            string\n\tTimeout           time.Duration\n\tScanner           string\n\tResponses         string\n\tPath              string\n\tUsage             string\n}\n```\nConfig is a type to hold flag values used by cfssl commands.\n\n","path":"github.com/letsencrypt/cfssl/cli","name":"cli","synopsis":"Package cli provides the template for adding new cfssl commands","isRedistributable":true}
