Documentation
¶
Overview ¶
Package commonopt contains common options for commands
A lot of the commands share the same options; these make it easier to keep the names consistent across commands.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Collection ¶
type Collection struct {
CollectionID string `long:"collection-id" env:"SPAN_COLLECTION_ID" description:"Span collection ID" required:"yes"`
}
Collection is a command line parameter prebaked option set for a (required) collection ID with an optional device ID
type CollectionAndDevice ¶
type CollectionAndDevice struct {
CollectionID string `long:"collection-id" env:"SPAN_COLLECTION_ID" description:"Span collection ID" required:"yes"`
DeviceID string `long:"device-id" env:"SPAN_DEVICE_ID" description:"device id" required:"yes"`
}
CollectionAndDevice is a command line parameter prebaked option set for a (required) collection ID and a (required) device ID
type CollectionAndDeviceOrGateway ¶ added in v0.2.7
type CollectionAndDeviceOrGateway struct {
CollectionID string `long:"collection-id" env:"SPAN_COLLECTION_ID" description:"Span collection ID" required:"yes"`
DeviceID string `long:"device-id" env:"SPAN_DEVICE_ID" description:"device id" required:"no"`
GatewayID string `long:"gateway-id" env:"SPAN_GATEWAY_ID" description:"gateway id" required:"no"`
}
CollectionAndOptionalDevice is a command line parameter prebaked option set for a (required) collection ID with an optional device ID
func (*CollectionAndDeviceOrGateway) Valid ¶ added in v0.2.7
func (c *CollectionAndDeviceOrGateway) Valid() bool
type CollectionAndGateway ¶ added in v0.2.7
type CollectionAndGateway struct {
CollectionID string `long:"collection-id" env:"SPAN_COLLECTION_ID" description:"Span collection ID" required:"yes"`
GatewayID string `long:"gateway-id" env:"SPAN_GATEWAY_ID" description:"gateway id" required:"yes"`
}
CollectionAndGateway is a command line parameter prebaked option set for a (required) collection ID and a (required) gateway ID
type CollectionAndOptionalDevice ¶
type CollectionAndOptionalDevice struct {
CollectionID string `long:"collection-id" env:"SPAN_COLLECTION_ID" description:"Span collection ID" required:"yes"`
DeviceID string `long:"device-id" env:"SPAN_DEVICE_ID" description:"device id" required:"no"`
}
CollectionAndOptionalDevice is a command line parameter prebaked option set for a (required) collection ID with an optional device ID
type ListFormat ¶
type ListFormat struct {
//lint:ignore SA5008 Multiple choices makes the linter unhappy
Format string `` /* 128-byte string literal not displayed */
NoColor bool `long:"no-color" env:"SPAN_NO_COLOR" description:"turn off coloring"`
PageSize int `long:"page-size" description:"if set, chop output into pages of page-size length"`
MaxPayloadWdith int `long:"payload-width" description:"maximum width of payload" default:"50"`
NumericDate bool `long:"numeric-date" description:"display dates as ms-since-epoch"`
}
ListFormat holds common options for list formatting
type NoPrompt ¶
type NoPrompt struct {
YesIAmSure bool `long:"yes-i-am-sure" description:"disable prompt for 'are you sure'"`
}
NoPrompt is a common "do not prompt me if I'm about to shoot myself in the foot"-option
type QueryOptions ¶
type QueryOptions struct {
Limit int32 `long:"limit" description:"max number of entries to fetch" default:"30"`
Start string `long:"start" description:"start of time range in milliseconds since epoch"`
End string `long:"end" description:"end of time range in milliseconds since epoch"`
Decode bool `long:"decode" description:"decode payload"`
}
QueryOptions holds common options for queries