Documentation
¶
Index ¶
- type UtilArgs
- func (a *UtilArgs) BuildCommands() []*ucli.Command
- func (a *UtilArgs) BuildFlags() []ucli.Flag
- func (a *UtilArgs) GetContext() context.Context
- func (a *UtilArgs) GetLogger() *logrus.Entry
- func (a *UtilArgs) RunDerivePublic(_ *cli.Context) error
- func (a *UtilArgs) RunDeriveSshPublic(_ *cli.Context) error
- func (a *UtilArgs) RunGenerateCryptoKey(_ *cli.Context) error
- func (a *UtilArgs) RunGeneratePrivate(_ *cli.Context) error
- func (a *UtilArgs) RunReadPrivatePeerId(_ *cli.Context) error
- func (a *UtilArgs) RunReadPublicPeerId(_ *cli.Context) error
- func (a *UtilArgs) RunTimestamp(_ *cli.Context) error
- func (a *UtilArgs) RunULID(_ *cli.Context) error
- func (a *UtilArgs) SetContext(c context.Context)
- func (a *UtilArgs) SetLogger(le *logrus.Entry)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type UtilArgs ¶
type UtilArgs struct {
// FilePath is the file path to operate on.
FilePath string
// OutPath is the file path to write to.
OutPath string
// KeySize is the key size to generate.
KeySize int
// Timestamp is the input timestamp string
Timestamp string
// contains filtered or unexported fields
}
UtilArgs contains the utility arguments and functions.
func (*UtilArgs) BuildCommands ¶
BuildCommands attaches the commands.
func (*UtilArgs) BuildFlags ¶
BuildFlags attaches the flags to a flag set.
func (*UtilArgs) GetContext ¶
GetContext returns the context.
func (*UtilArgs) RunDerivePublic ¶
RunDerivePublic writes a public-key PEM derived from a private PEM.
func (*UtilArgs) RunDeriveSshPublic ¶
RunDeriveSshPublic writes an authorized SSH public key from a peer key.
func (*UtilArgs) RunGenerateCryptoKey ¶
RunGenerateCryptoKey writes a random cryptographic key as base64.
func (*UtilArgs) RunGeneratePrivate ¶
RunGeneratePrivate writes a newly generated peer private key.
func (*UtilArgs) RunReadPrivatePeerId ¶
RunReadPrivatePeerId loads a private key and prints the peer ID.
func (*UtilArgs) RunReadPublicPeerId ¶
RunReadPublicPeerId loads a public key and prints the peer ID.
func (*UtilArgs) RunTimestamp ¶
RunTimestamp runs the timestamp util command.
func (*UtilArgs) SetContext ¶
SetContext sets the context.