Documentation ¶
Index ¶
- Variables
- func ActionImpl(findCertificateWithPrefixImpl FindCertificateWithPrefixType) func(*cli.Context) error
- func FindCertificateWithPrefix(ctx context.Context, env *action.Environment, prefix string) (*x509.Certificate, error)
- func HexStr(bs []byte) string
- func PrintCertInfo(w io.Writer, cert *x509.Certificate, ft FormatType)
- type FindCertificateWithPrefixType
- type FormatType
- type IfChangedWriteFile
Constants ¶
This section is empty.
Variables ¶
View Source
var Command = &cli.Command{ Name: "show", Usage: "Show CA status, an existing certificate and/or its key.", UsageText: `kmgm show ca --- Show the CA certificate. kmgm show [serialprefix] --- Show certificate which has a serial number starting from given prefix.`, Flags: []cli.Flag{ &cli.StringFlag{ Name: "output", Aliases: []string{"o"}, Usage: "Output format. (full, pem)", Value: "full", }, &cli.StringFlag{ Name: "file", Aliases: []string{"f"}, Usage: "Write output to specified file.", Value: "-", }, }, Action: ActionImpl(FindCertificateWithPrefix), }
Functions ¶
func ActionImpl ¶ added in v0.2.1
func ActionImpl(findCertificateWithPrefixImpl FindCertificateWithPrefixType) func(*cli.Context) error
func FindCertificateWithPrefix ¶
func FindCertificateWithPrefix(ctx context.Context, env *action.Environment, prefix string) (*x509.Certificate, error)
func PrintCertInfo ¶
func PrintCertInfo(w io.Writer, cert *x509.Certificate, ft FormatType)
Types ¶
type FindCertificateWithPrefixType ¶ added in v0.2.1
type FindCertificateWithPrefixType func(ctx context.Context, env *action.Environment, prefix string) (*x509.Certificate, error)
type FormatType ¶
type FormatType int
const ( FormatFull FormatType = iota FormatPEM )
func FormatTypeFromString ¶
func FormatTypeFromString(s string) (FormatType, error)
func (FormatType) ShouldOutputInfo ¶
func (t FormatType) ShouldOutputInfo() bool
func (FormatType) ShouldOutputPEM ¶
func (t FormatType) ShouldOutputPEM() bool
func (FormatType) String ¶
func (t FormatType) String() string
type IfChangedWriteFile ¶
type IfChangedWriteFile struct {
// contains filtered or unexported fields
}
func NewIfChangedWriteFile ¶
func NewIfChangedWriteFile(path string) (*IfChangedWriteFile, error)
func (*IfChangedWriteFile) Close ¶
func (wf *IfChangedWriteFile) Close() error
Click to show internal directories.
Click to hide internal directories.