cmd

package
v0.13.4 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2023 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MakeRootCmd

func MakeRootCmd() *cobra.Command

MakeRootCmd constructs the root command-line entry point

Types

type CaptureCmd

type CaptureCmd struct {
	Input     io.Reader
	Promisc   bool
	Port      uint16
	Interface string

	RequestType  string
	ResponseType string
	// contains filtered or unexported fields
}

CaptureCmd captures network traffic and dumps it as JSON message

func (*CaptureCmd) Command

func (captureCmd *CaptureCmd) Command() *cobra.Command

Command returns cobra command

func (*CaptureCmd) RunE

func (captureCmd *CaptureCmd) RunE(cmd *cobra.Command, args []string) error

RunE executes traffic capture

type CborCmd

type CborCmd struct {
	Input io.Reader

	// flags
	InputData   string
	InputFormat string
	// contains filtered or unexported fields
}

CborCmd parses data encoded in CBOR format

func (*CborCmd) Command

func (cborCmd *CborCmd) Command() *cobra.Command

Command returns Cobra command

func (*CborCmd) PreRunE

func (cborCmd *CborCmd) PreRunE(_ *cobra.Command, args []string) (err error)

PreRunE parses command line arguments

func (*CborCmd) RunE

func (cborCmd *CborCmd) RunE(_ *cobra.Command, args []string) error

RunE executes main logic of this command

type ParseCmd

type ParseCmd struct {
	Input io.Reader

	// flags
	InputData    string
	InputFormat  string
	ProtobufType string
	Raw          bool
	// contains filtered or unexported fields
}

func (*ParseCmd) Command

func (parseCmd *ParseCmd) Command() *cobra.Command

Command returns Cobra command that will parse input data

func (*ParseCmd) PreRunE

func (parseCmd *ParseCmd) PreRunE(cmd *cobra.Command, args []string) (err error)

PreRunE parses command line arguments

func (*ParseCmd) RunE

func (parseCmd *ParseCmd) RunE(cmd *cobra.Command, args []string) error

RunE executes parsing logic

Jump to

Keyboard shortcuts

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