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

cliutil

package
v0.57.18 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2026 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

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

func (a *UtilArgs) BuildCommands() []*ucli.Command

BuildCommands attaches the commands.

func (*UtilArgs) BuildFlags

func (a *UtilArgs) BuildFlags() []ucli.Flag

BuildFlags attaches the flags to a flag set.

func (*UtilArgs) GetContext

func (a *UtilArgs) GetContext() context.Context

GetContext returns the context.

func (*UtilArgs) GetLogger

func (a *UtilArgs) GetLogger() *logrus.Entry

GetLogger returns the log entry

func (*UtilArgs) RunDerivePublic

func (a *UtilArgs) RunDerivePublic(_ *cli.Context) error

RunDerivePublic derives the public key from a private pem.

func (*UtilArgs) RunDeriveSshPublic

func (a *UtilArgs) RunDeriveSshPublic(_ *cli.Context) error

RunDerivePublic derives the ssh public key from a private or public pem.

func (*UtilArgs) RunGenerateCryptoKey

func (a *UtilArgs) RunGenerateCryptoKey(_ *cli.Context) error

RunGenerateCryptoKey runs the generate-crypto-key util command.

func (*UtilArgs) RunGeneratePrivate

func (a *UtilArgs) RunGeneratePrivate(_ *cli.Context) error

RunGeneratePrivate runs the generate-private util command.

func (*UtilArgs) RunReadPrivatePeerId

func (a *UtilArgs) RunReadPrivatePeerId(_ *cli.Context) error

RunReadPrivatePeerId loads a private key and prints the peer ID.

func (*UtilArgs) RunReadPublicPeerId

func (a *UtilArgs) RunReadPublicPeerId(_ *cli.Context) error

RunReadPublicPeerId loads a public key and prints the peer ID.

func (*UtilArgs) RunTimestamp

func (a *UtilArgs) RunTimestamp(_ *cli.Context) error

RunTimestamp runs the timestamp util command.

func (*UtilArgs) RunULID

func (a *UtilArgs) RunULID(_ *cli.Context) error

RunULID runs the ulid util command.

func (*UtilArgs) SetContext

func (a *UtilArgs) SetContext(c context.Context)

SetContext sets the context.

func (*UtilArgs) SetLogger

func (a *UtilArgs) SetLogger(le *logrus.Entry)

SetLogger sets the root log entry.

Jump to

Keyboard shortcuts

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