internal

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package internal provides CLI command handling for tmhi-cli.

Index

Constants

View Source
const (
	ARCADYAN       string        = "ARCADYAN"
	NOK5G21        string        = "NOK5G21"
	DefaultTimeout time.Duration = 5 * time.Second
)

Gateway model constants.

View Source
const (
	ConfigDryRun   string = "dry-run"
	ConfigConfig   string = "config"
	ConfigDebug    string = "debug"
	ConfigLogin    string = "login."
	ConfigUsername string = ConfigLogin + "username"
	ConfigPassword string = ConfigLogin + "password"
	ConfigGateway  string = "gateway."
	ConfigModel    string = ConfigGateway + "model"
	ConfigIP       string = ConfigGateway + "ip"
	ConfigTimeout  string = "timeout"
	ConfigRetries  string = "retries"
)

Configuration flag names.

Variables

View Source
var ErrUnknownGateway = errors.New("unknown gateway")

ErrUnknownGateway is returned when an unsupported gateway model is specified.

Functions

func Cmd added in v0.2.0

func Cmd(version string)

Cmd is the main entry point for the CLI application.

func Info added in v0.5.0

func Info(ctx context.Context, _ *cli.Command) error

Info handles the info CLI command.

func LogSetup

func LogSetup(debugFlag bool)

LogSetup configures logrus log level based on debug flag.

func Login added in v0.2.0

func Login(ctx context.Context, _ *cli.Command) error

Login handles the login CLI command.

func Reboot added in v0.2.0

func Reboot(ctx context.Context, cmd *cli.Command) error

Reboot handles the reboot CLI command.

func Req added in v0.5.0

func Req(ctx context.Context, cmd *cli.Command) error

Req handles the req CLI command for custom HTTP requests.

func Signal added in v0.7.0

func Signal(ctx context.Context, _ *cli.Command) error

Signal handles the signal CLI command.

func Status added in v0.6.0

func Status(ctx context.Context, _ *cli.Command) error

Status handles the status CLI command.

Types

This section is empty.

Jump to

Keyboard shortcuts

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