cli

package
v0.0.0-...-5c775dd Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCliConfig

func NewCliConfig(glb *Globals, st *State) *cliconfig.Config

func Run

func Run()

Types

type Globals

type Globals struct {
	PatternFlags PatternFlags `embed:""`

	Streaming bool `help:"Don't stop after the first match."`

	Followers     []*url.URL `sep:"none" name:"add-follower" help:"Add the given host to the list of followers."`
	FollowersOnly bool       `help:"Use only followers and spawn no threads on the director."`
}

type PatternFlags

type PatternFlags struct {
	Pattern string `required:"" help:"Desired matching pattern."`

	IgnoreCase bool `help:"Use case-insensitive pattern matching."`

	Method struct {
		Prefix  bool `xor:"method" required:"" help:"match the beginning"`
		Globing bool `xor:"method" help:"use glob pattern matching"`
	} `embed:"" prefix:"use-"`
}

type RootCommand

type RootCommand struct {
	Globals `embed:""`

	Ssh SSHCommand `cmd:"" help:"generate ssh keys"`
	Wg  WGCommand  `cmd:"" help:"generate wireguard keys"`
}

func (*RootCommand) AfterApply

func (c *RootCommand) AfterApply(globals *RootCommand, st *State) error

type SSHCommand

type SSHCommand struct {
	Match struct {
		Fingerprint bool `help:"Match against fingerprint."`
		PublicKey   bool `help:"Match against public key."`
	} `embed:"" prefix:"match-"`
}

func (*SSHCommand) Run

func (c *SSHCommand) Run(glb *RootCommand, st *State) error

type State

type State struct {
	Ctx     context.Context
	Matcher matcher.Matcher
}

type WGCommand

type WGCommand struct{}

func (*WGCommand) Run

func (c *WGCommand) Run(glb *RootCommand, st *State) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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