Documentation ¶
Index ¶
- Variables
- func GetFlagStringValues(cmd *cobra.Command, name string) ([]string, error)
- func MatchString(pattern, name string) bool
- func WithOptions(cmd *cobra.Command, opts ...Option) *cobra.Command
- type Option
- func MarkLocalFlag(exclude ...string) Option
- func WithAgent(flagName string, clientFunc func() (*c8y.Client, error)) Option
- func WithApplication(flagName string, clientFunc func() (*c8y.Client, error)) Option
- func WithApplicationContext(flagName string, clientFunc func() (*c8y.Client, error)) Option
- func WithApplicationWithVersions(flagName string, clientFunc func() (*c8y.Client, error)) Option
- func WithConfiguration(flagName string, clientFunc func() (*c8y.Client, error)) Option
- func WithCustomValidateSet(flagName string, customFunc func() []string) Option
- func WithDevice(flagName string, clientFunc func() (*c8y.Client, error)) Option
- func WithDeviceCertificate(flagName string, clientFunc func() (*c8y.Client, error)) Option
- func WithDeviceGroup(flagName string, clientFunc func() (*c8y.Client, error)) Option
- func WithDeviceMeasurementSeries(flagName string, flagNameDevice string, clientFunc func() (*c8y.Client, error)) Option
- func WithDeviceMeasurementValueFragmentSeries(flagName string, flagNameDevice string, flagNameValueFragmentType string, ...) Option
- func WithDeviceMeasurementValueFragmentType(flagName string, flagNameDevice string, clientFunc func() (*c8y.Client, error)) Option
- func WithDeviceProfile(flagName string, clientFunc func() (*c8y.Client, error)) Option
- func WithDeviceRegistrationRequest(flagName string, clientFunc func() (*c8y.Client, error)) Option
- func WithDeviceService(flagService string, flagDevice string, clientFunc func() (*c8y.Client, error)) Option
- func WithExternalCompletion(flagName string, externalCommand []string) Option
- func WithFirmware(flagName string, clientFunc func() (*c8y.Client, error)) Option
- func WithFirmwarePatch(flagVersion string, flagNameFirmware string, ...) Option
- func WithFirmwareVersion(flagVersion string, flagNameFirmware string, ...) Option
- func WithHostedApplication(flagName string, clientFunc func() (*c8y.Client, error)) Option
- func WithLazyRequired(flagName string, values ...string) Option
- func WithMicroservice(flagName string, clientFunc func() (*c8y.Client, error)) Option
- func WithMicroserviceInstance(flagName string, flagApplicationID string, ...) Option
- func WithMicroserviceLoggers(flagName string, flagNameMicroserviceName string, ...) Option
- func WithNotification2SubscriptionId(flagName string, clientFunc func() (*c8y.Client, error)) Option
- func WithNotification2SubscriptionName(flagName string, clientFunc func() (*c8y.Client, error)) Option
- func WithRemoteAccessConfiguration(flagConfiguration string, flagDevice string, ...) Option
- func WithRemoteAccessPassthroughConfiguration(flagConfiguration string, flagDevice string, ...) Option
- func WithSessionFile(flagName string, extensions []string, pathFunc func() string) Option
- func WithSmartGroup(flagName string, clientFunc func() (*c8y.Client, error)) Option
- func WithSoftware(flagName string, clientFunc func() (*c8y.Client, error)) Option
- func WithSoftwareVersion(flagVersion string, flagNameSoftware string, ...) Option
- func WithSystemOptionCategory(flagName string, clientFunc func() (*c8y.Client, error)) Option
- func WithSystemOptionKey(flagName string, flagNameCategory string, ...) Option
- func WithTenantID(flagName string, clientFunc func() (*c8y.Client, error)) Option
- func WithTenantOptionCategory(flagName string, clientFunc func() (*c8y.Client, error)) Option
- func WithTenantOptionKey(flagName string, flagNameCategory string, ...) Option
- func WithUIPlugin(flagName string, clientFunc func() (*c8y.Client, error)) Option
- func WithUIPluginVersion(flagVersion string, flagExtension string, ...) Option
- func WithUIPluginWithVersions(flagName string, clientFunc func() (*c8y.Client, error)) Option
- func WithUser(flagName string, clientFunc func() (*c8y.Client, error)) Option
- func WithUserGroup(flagName string, clientFunc func() (*c8y.Client, error)) Option
- func WithUserRole(flagName string, clientFunc func() (*c8y.Client, error)) Option
- func WithValidateSet(flagName string, values ...string) Option
Constants ¶
This section is empty.
Variables ¶
var BooleanFalse bool = false
var BooleanTrue bool = true
var ErrNotFound = errors.New("not found")
Functions ¶
func GetFlagStringValues ¶
GetFlagStringValues get string slice from either a string slice or string flag
func MatchString ¶
Types ¶
type Option ¶
Option adds flags to a given command
func MarkLocalFlag ¶
MarkLocalFlag marks a flag as local flag so it get prioritized in the completions
func WithApplication ¶
WithApplication application completion
func WithApplicationContext ¶
WithApplicationContext application context completion
func WithApplicationWithVersions ¶ added in v2.40.0
WithApplicationWithVersions applications with versions completion
func WithConfiguration ¶
WithConfiguration configuration (managedObject) completion
func WithCustomValidateSet ¶
func WithDevice ¶
WithDevice device completion
func WithDeviceCertificate ¶ added in v2.13.0
WithDeviceCertificate trusted device certificate completion
func WithDeviceGroup ¶
WithDeviceGroup device group completion
func WithDeviceMeasurementSeries ¶
func WithDeviceMeasurementSeries(flagName string, flagNameDevice string, clientFunc func() (*c8y.Client, error)) Option
WithDeviceMeasurementSeries supported measurement series completion (requires device)
func WithDeviceMeasurementValueFragmentSeries ¶
func WithDeviceMeasurementValueFragmentSeries(flagName string, flagNameDevice string, flagNameValueFragmentType string, clientFunc func() (*c8y.Client, error)) Option
WithDeviceMeasurementValueFragmentSeries supported measurement value fragment types completion (requires device)
func WithDeviceMeasurementValueFragmentType ¶
func WithDeviceMeasurementValueFragmentType(flagName string, flagNameDevice string, clientFunc func() (*c8y.Client, error)) Option
WithDeviceMeasurementValueFragmentType supported measurement value fragment types completion (requires device)
func WithDeviceProfile ¶
WithDeviceProfile device profile (managedObject) completion
func WithDeviceRegistrationRequest ¶
WithDeviceRegistrationRequest device registration request completion
func WithDeviceService ¶ added in v2.16.0
func WithDeviceService(flagService string, flagDevice string, clientFunc func() (*c8y.Client, error)) Option
WithDeviceService device service completion (requires device)
func WithExternalCompletion ¶ added in v2.30.0
WithExternalCompletion completion by executing an external command or another c8y command
func WithFirmware ¶
WithFirmware firmware (managedObject) completion
func WithFirmwarePatch ¶
func WithFirmwarePatch(flagVersion string, flagNameFirmware string, clientFunc func() (*c8y.Client, error)) Option
WithFirmwarePatch firmware patch version completion (requires category)
func WithFirmwareVersion ¶
func WithFirmwareVersion(flagVersion string, flagNameFirmware string, clientFunc func() (*c8y.Client, error)) Option
WithFirmwareVersion firmware version completion (requires category)
func WithHostedApplication ¶
WithHostedApplication hosted application completion
func WithLazyRequired ¶
WithLazyRequired marks a flag as required but does not enforce it.
func WithMicroservice ¶
WithMicroservice microservice completion
func WithMicroserviceInstance ¶
func WithMicroserviceInstance(flagName string, flagApplicationID string, clientFunc func() (*c8y.Client, error)) Option
WithMicroserviceInstance microservice instances completion
func WithMicroserviceLoggers ¶ added in v2.15.0
func WithMicroserviceLoggers(flagName string, flagNameMicroserviceName string, clientFunc func() (*c8y.Client, error)) Option
WithMicroservice completion
func WithNotification2SubscriptionId ¶ added in v2.16.0
func WithNotification2SubscriptionName ¶ added in v2.16.0
func WithNotification2SubscriptionName(flagName string, clientFunc func() (*c8y.Client, error)) Option
WithNotification2SubscriptionName subscription name completion
func WithRemoteAccessConfiguration ¶ added in v2.41.0
func WithRemoteAccessConfiguration(flagConfiguration string, flagDevice string, clientFunc func() (*c8y.Client, error)) Option
WithRemoteAccessConfiguration remote access configuration completion (requires device)
func WithRemoteAccessPassthroughConfiguration ¶ added in v2.41.0
func WithRemoteAccessPassthroughConfiguration(flagConfiguration string, flagDevice string, clientFunc func() (*c8y.Client, error)) Option
WithRemoteAccessPassthroughConfiguration complete passthrough remote access completions (requires device)
func WithSessionFile ¶
WithSessionFile session file completion
func WithSmartGroup ¶
WithSmartGroup smart group completion
func WithSoftware ¶
WithSoftware software (managedObject) completion
func WithSoftwareVersion ¶
func WithSoftwareVersion(flagVersion string, flagNameSoftware string, clientFunc func() (*c8y.Client, error)) Option
WithSoftwareVersion software version completion (requires category)
func WithSystemOptionCategory ¶
WithSystemOptionCategory system option category completion
func WithSystemOptionKey ¶
func WithSystemOptionKey(flagName string, flagNameCategory string, clientFunc func() (*c8y.Client, error)) Option
WithSystemOptionKey system option key completion (requires category)
func WithTenantID ¶
WithTenantID tenant id completion
func WithTenantOptionCategory ¶
WithTenantOptionCategory tenant option category completion
func WithTenantOptionKey ¶
func WithTenantOptionKey(flagName string, flagNameCategory string, clientFunc func() (*c8y.Client, error)) Option
WithTenantOptionKey tenant option key completion (requires category)
func WithUIPlugin ¶ added in v2.40.0
WithUIPlugin UI extension completion
func WithUIPluginVersion ¶ added in v2.40.0
func WithUIPluginVersion(flagVersion string, flagExtension string, clientFunc func() (*c8y.Client, error)) Option
Complete UI extension versions
func WithUIPluginWithVersions ¶ added in v2.40.0
WithUIPluginWithVersions UI plugin with version completion Values are returned in the format of name@version
func WithUserGroup ¶
WithUserGroup usergroup completion
func WithUserRole ¶
WithUserRole user role completion
func WithValidateSet ¶
WithValidateSet adds a completion function with the given values
Source Files ¶
- application.go
- certificate.go
- completion.go
- configuration.go
- device.go
- deviceProfile.go
- deviceService.go
- devicegroup.go
- deviceregistration.go
- external.go
- firmware.go
- firmwareVersion.go
- firmwareVersionPatch.go
- flags.go
- measurements.go
- notification2.go
- remoteAccessConfiguration.go
- role.go
- session.go
- smartgroup.go
- software.go
- softwareVersion.go
- systemoption.go
- tenant.go
- tenantoption.go
- uiPlugin.go
- user.go
- usergroup.go