commands

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2026 License: MIT Imports: 27 Imported by: 0

Documentation

Overview

Package commands provides all CLI subcommands for the bramble tool.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Execute

func Execute() error

Execute runs the root command. Call this from main.

func ParseAddress

func ParseAddress(s string) (uint32, error)

ParseAddress parses a mesh address from a hex or decimal string. Accepts: "DEADBEEF", "0xDEADBEEF", "3735928559".

Types

type BroadcastResult

type BroadcastResult struct {
	Text            string                      `json:"text"`
	Status          string                      `json:"status"`
	Channel         int                         `json:"channel,omitempty"`
	BroadcastID     string                      `json:"broadcast_id,omitempty"`
	Deliveries      []bramble.BroadcastDelivery `json:"deliveries,omitempty"`
	DeliveryWindowS int                         `json:"delivery_window_s,omitempty"`
	DeliveryCount   int                         `json:"delivery_count,omitempty"`
}

BroadcastResult is the JSON output for the broadcast command.

type ChannelAddResult

type ChannelAddResult struct {
	Index int    `json:"index"`
	Name  string `json:"name"`
}

ChannelAddResult is the JSON output for the channels add command.

type ChannelStatusResult

type ChannelStatusResult struct {
	Index  int    `json:"index"`
	Status string `json:"status"`
}

ChannelStatusResult is the JSON output for channels remove/set-default commands.

type LocationAddrResult

type LocationAddrResult struct {
	Addr   string `json:"addr"`
	Status string `json:"status"`
}

LocationAddrResult is the JSON output for location remove-contact/share-once commands.

type LocationContactResult

type LocationContactResult struct {
	Addr   string `json:"addr"`
	Tier   string `json:"tier"`
	Status string `json:"status"`
}

LocationContactResult is the JSON output for the location set-contact command.

type LocationSetConfigResult

type LocationSetConfigResult struct {
	Status   string                 `json:"status"`
	Location bramble.LocationConfig `json:"location"`
}

LocationSetConfigResult is the JSON output for the location set-config command.

type PingResult

type PingResult struct {
	Address         string `json:"address"`
	ProtocolVersion string `json:"protocol_version"`
	Status          string `json:"status"`
}

PingResult is the JSON output for the ping command.

type ProbeCommandResult

type ProbeCommandResult struct {
	ProbeID   int                   `json:"probe_id"`
	AckWindow int                   `json:"ack_window"`
	Responses []bramble.ProbeResult `json:"responses,omitempty"`
}

ProbeCommandResult is the JSON output for the probe command.

type SendCommandResult

type SendCommandResult struct {
	Dest   string `json:"dest"`
	Text   string `json:"text"`
	Status string `json:"status"`
}

SendCommandResult is the JSON output for the send command.

type SetNameResult

type SetNameResult struct {
	Name   string `json:"name"`
	Status string `json:"status"`
}

SetNameResult is the JSON output for the config set-name command.

type StatusResult

type StatusResult struct {
	Status string `json:"status"`
}

StatusResult is a generic status-only JSON output.

Jump to

Keyboard shortcuts

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