cli

package
v0.9.1 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2026 License: GPL-3.0 Imports: 19 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	ExitOK                = 0
	ExitUsage             = 2
	ExitDaemonUnavailable = 3
	ExitInvalidState      = 4
	ExitPermission        = 5
	ExitConflict          = 6
	ExitUpstream          = 7
	ExitNetwork           = 8
	ExitData              = 9
	ExitInternal          = 10
)

Variables

This section is empty.

Functions

func Execute

func Execute(ctx context.Context, args []string, stdout, stderr io.Writer, dependencies Dependencies) int

Types

type Dependencies

type Dependencies struct {
	StatusClient       StatusClient
	RuntimeClient      RuntimeClient
	SubscriptionClient SubscriptionClient
	PanelClient        PanelClient
	SystemProxyClient  SystemProxyClient
	TunClient          TunClient
	ServiceController  ServiceController
	SelfUpdater        SelfUpdater
	OpenBrowser        func(url string) error
	RunDaemon          func(context.Context) error
	RunTUI             func(context.Context) error
	Interactive        bool
	NewOperationID     func() string
	SetupError         error
}

type SelfUpdater

type SelfUpdater interface {
	Update(ctx context.Context, binaryPath, currentVersion, channel string) (update.Result, error)
}

SelfUpdater updates the running mihari binary.

type ServiceController

type ServiceController interface {
	Install() error
	Uninstall() error
	Reinstall() error
	Start() error
	Stop() error
	Restart() error
	Status() (service.StatusKind, error)
}

ServiceController is the OS service surface used by CLI commands.

type StatusClient

type StatusClient interface {
	Status(context.Context) (protocol.Status, error)
}

type SystemProxyClient

SystemProxyClient is the typed control surface used by sysproxy CLI commands.

type TunClient

TunClient is the typed control surface used by tun CLI commands.

Jump to

Keyboard shortcuts

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