Help us shape the future of Go! Take the 2026 Go Developer Survey

cli

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2022 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CRLFetchCmd

type CRLFetchCmd struct {
	Cert   string `kong:"arg" required:"" help:"certificate file name"`
	Output string `required:"" help:"output folder name"`
	All    bool   `help:"fetch entire chain"`
	Print  bool
}

CRLFetchCmd specifies flags for CRLFetch action

func (*CRLFetchCmd) Run

func (a *CRLFetchCmd) Run(ctx *Cli) error

Run the command

type CertInfoCmd

type CertInfoCmd struct {
	In         string `kong:"arg" required:"" help:"certificate file name"`
	Out        string `help:"optional, output file to save parsed certificates"`
	NotAfter   string `help:"optional, filter certificates by NotAfter time"`
	NoExpired  *bool  `help:"optional, filter non-expired certificates"`
	Extensions bool   `help:"optional, print extensions values"`
}

CertInfoCmd specifies flags for CertInfo action

func (*CertInfoCmd) Run

func (a *CertInfoCmd) Run(ctx *Cli) error

Run the command

type CertValidateCmd

type CertValidateCmd struct {
	Cert string `kong:"arg" required:"" help:"certificate file name"`
	CA   string `help:"optional, CA bundle file"`
	Root string `help:"optional, Trusted Roots file"`
	Out  string `help:"optional, output file to save certificate chain"`
}

CertValidateCmd specifies flags for Validate action

func (*CertValidateCmd) Run

func (a *CertValidateCmd) Run(ctx *Cli) error

Run the command

type CertsCmd

type CertsCmd struct {
	Info     CertInfoCmd     `cmd:"" help:"print certificate info"`
	Validate CertValidateCmd `cmd:"" help:"validates certificate"`
}

CertsCmd provides certificates commands

type Cli

type Cli struct {
	Version ctl.VersionFlag `name:"version" help:"Print version information and quit" hidden:""`
	// contains filtered or unexported fields
}

Cli provides CLI context to run commands

func (*Cli) AfterApply

func (c *Cli) AfterApply(app *kong.Kong, vars kong.Vars) error

AfterApply hook loads config

func (*Cli) Context

func (c *Cli) Context() context.Context

Context for requests

func (*Cli) ErrWriter

func (c *Cli) ErrWriter() io.Writer

ErrWriter returns a writer for control output

func (*Cli) ReadFile

func (c *Cli) ReadFile(filename string) ([]byte, error)

ReadFile reads from stdin if the file is "-"

func (*Cli) Reader

func (c *Cli) Reader() io.Reader

Reader is the source to read from, typically set to os.Stdin

func (*Cli) WithErrWriter

func (c *Cli) WithErrWriter(out io.Writer) *Cli

WithErrWriter allows to specify a custom error writer

func (*Cli) WithReader

func (c *Cli) WithReader(reader io.Reader) *Cli

WithReader allows to specify a custom reader

func (*Cli) WithWriter

func (c *Cli) WithWriter(out io.Writer) *Cli

WithWriter allows to specify a custom writer

func (*Cli) WriteJSON

func (c *Cli) WriteJSON(value interface{}) error

WriteJSON prints response to out

func (*Cli) Writer

func (c *Cli) Writer() io.Writer

Writer returns a writer for control output

type CrlCmd

type CrlCmd struct {
	Info  CrlInfoCmd  `cmd:"" help:"print CRL info"`
	Fetch CRLFetchCmd `cmd:"" help:"fetch CRL"`
}

CrlCmd provides commands for CRL

type CrlInfoCmd

type CrlInfoCmd struct {
	Crl string `kong:"arg" required:"" help:"CSR file name"`
}

CrlInfoCmd specifies flags for Info command

func (*CrlInfoCmd) Run

func (a *CrlInfoCmd) Run(ctx *Cli) error

Run the command

type CsrInfoCmd

type CsrInfoCmd struct {
	Csr string `kong:"arg" required:"" help:"CSR file name"`
}

CsrInfoCmd specifies flags for Info command

func (*CsrInfoCmd) Run

func (a *CsrInfoCmd) Run(ctx *Cli) error

Run the command

type OcspInfoCmd

type OcspInfoCmd struct {
	Ocsp string `kong:"arg" required:"" help:"OCSP file name"`
}

OcspInfoCmd specifies flags for Info command

func (*OcspInfoCmd) Run

func (a *OcspInfoCmd) Run(ctx *Cli) error

Run the command

Jump to

Keyboard shortcuts

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