cli

package
v0.1.8 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2023 License: ISC Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (

	// ErrorEnterState is returned when entering state fails
	ErrorEnterState = 11
	// ErrorEnterSpec is returned when entering spec fails
	ErrorEnterSpec = 12
	// ErrorEnterConfig is returned when entering config fails
	ErrorEnterConfig = 13
	// ErrorEnterClaim is returned when entering claim fails
	ErrorEnterClaim = 14

	// ErrorMakeDir is returned when cannot make a directory
	ErrorMakeDir = 21
	// ErrorWriteState is returned when cannot write state file
	ErrorWriteState = 22
	// ErrorWriteSpec is returned when cannot write spec file
	ErrorWriteSpec = 23
	// ErrorReadState is returned when cannot read state
	ErrorReadState = 24
	// ErrorReadSpec is returned when cannot read spec file
	ErrorReadSpec = 25

	// ErrorInvalidFlag is returned when an invalid flag is provided
	ErrorInvalidFlag = 31
	// ErrorInvalidName is returned when no name is provided
	ErrorInvalidName = 32
	// ErrorInvalidCA is returned when an invalid ca name is set
	ErrorInvalidCA = 33
	// ErrorInvalidCSR is returned when an invalid csr name is set
	ErrorInvalidCSR = 34
	// ErrorInvalidCert is returned when an invalid cert is set
	ErrorInvalidCert = 35

	// ErrorCert is returned when generating root ca fails
	ErrorCert = 41
	// ErrorCSR is returned when generating csr fails
	ErrorCSR = 42
	// ErrorSign is returned when signing a csr fails
	ErrorSign = 43
	// ErrorVerify is returned when verifying a cert fails
	ErrorVerify = 44
)

Variables

This section is empty.

Functions

This section is empty.

Types

type App

type App struct {
	// contains filtered or unexported fields
}

App represents a cli app

func NewApp

func NewApp(name, version string) *App

NewApp creates a new cli app

func (*App) Run

func (a *App) Run(args []string) int

Run executes the cli app

type InitCommand

type InitCommand struct {
	// contains filtered or unexported fields
}

InitCommand represents the command for initialization

func NewInitCommand

func NewInitCommand() *InitCommand

NewInitCommand creates a new command

func (*InitCommand) Help

func (c *InitCommand) Help() string

Help returns the long help text for command

func (*InitCommand) Run

func (c *InitCommand) Run(args []string) int

Run executes the command

func (*InitCommand) Synopsis

func (c *InitCommand) Synopsis() string

Synopsis returns the short help text for command

type ReqCommand

type ReqCommand struct {
	// contains filtered or unexported fields
}

ReqCommand represents the command for generating a new csr

func NewReqCommand

func NewReqCommand(c pki.Cert) *ReqCommand

NewReqCommand creates a new command

func (*ReqCommand) Help

func (c *ReqCommand) Help() string

Help returns the long help text for command

func (*ReqCommand) Run

func (c *ReqCommand) Run(args []string) int

Run executes the command

func (*ReqCommand) Synopsis

func (c *ReqCommand) Synopsis() string

Synopsis returns the short help text for command

type SignCommand

type SignCommand struct {
	// contains filtered or unexported fields
}

SignCommand represents the sign command for signing a csr

func NewSignCommand

func NewSignCommand() *SignCommand

NewSignCommand creates a new command

func (*SignCommand) Help

func (c *SignCommand) Help() string

Help returns the long help text for command

func (*SignCommand) Run

func (c *SignCommand) Run(args []string) (exit int)

Run executes the command

func (*SignCommand) Synopsis

func (c *SignCommand) Synopsis() string

Synopsis returns the short help text for command

type VerifyCommand

type VerifyCommand struct {
	// contains filtered or unexported fields
}

VerifyCommand represents the verify command

func NewVerifyCommand

func NewVerifyCommand() *VerifyCommand

NewVerifyCommand creates a new command

func (*VerifyCommand) Help

func (c *VerifyCommand) Help() string

Help returns the long help text for command

func (*VerifyCommand) Run

func (c *VerifyCommand) Run(args []string) (exit int)

Run executes the command

func (*VerifyCommand) Synopsis

func (c *VerifyCommand) Synopsis() string

Synopsis returns the short help text for command

Jump to

Keyboard shortcuts

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