Documentation ¶
Index ¶
- func FindHostedApplications(factory *cmdutil.Factory, values []string, lookupID bool, format string, ...) ([]entityReference, error)
- func FindMicroservices(factory *cmdutil.Factory, values []string, lookupID bool, format string) ([]entityReference, error)
- func GetFetchedResultsAsString(refs []entityReference) (results []string, invalidLookups []string)
- func IsID(v string) bool
- func NewIDValue(raw string) *idValue
- func ParseValues(values []string) (ids []string)
- func WithAgentByNameFirstMatch(factory *cmdutil.Factory, args []string, opts ...string) flags.GetOption
- func WithApplicationByNameFirstMatch(factory *cmdutil.Factory, args []string, opts ...string) flags.GetOption
- func WithCertificateByNameFirstMatch(factory *cmdutil.Factory, args []string, opts ...string) flags.GetOption
- func WithConfigurationByNameFirstMatch(factory *cmdutil.Factory, args []string, opts ...string) flags.GetOption
- func WithConfigurationFileData(factory *cmdutil.Factory, ...) flags.GetOption
- func WithDeviceByNameFirstMatch(factory *cmdutil.Factory, args []string, opts ...string) flags.GetOption
- func WithDeviceGroupByNameFirstMatch(factory *cmdutil.Factory, args []string, opts ...string) flags.GetOption
- func WithDeviceProfileByNameFirstMatch(factory *cmdutil.Factory, args []string, opts ...string) flags.GetOption
- func WithDeviceServiceByNameFirstMatch(factory *cmdutil.Factory, flagDevice string, args []string, opts ...string) flags.GetOption
- func WithExternalCommandByNameFirstMatch(factory *cmdutil.Factory, args []string, externalCommand []string, ...) flags.GetOption
- func WithFirmwareByNameFirstMatch(factory *cmdutil.Factory, args []string, opts ...string) flags.GetOption
- func WithFirmwarePatchByNameFirstMatch(factory *cmdutil.Factory, firmwareFlag string, args []string, opts ...string) flags.GetOption
- func WithFirmwareVersionByNameFirstMatch(factory *cmdutil.Factory, flagFirmware string, args []string, opts ...string) flags.GetOption
- func WithFirmwareVersionData(factory *cmdutil.Factory, flagFirmware, flagVersion, flagURL string, ...) flags.GetOption
- func WithHostedApplicationByNameFirstMatch(factory *cmdutil.Factory, args []string, opts ...string) flags.GetOption
- func WithIDSlice(args []string, opts ...string) flags.GetOption
- func WithManagedObjectPropertyFirstMatch(factory *cmdutil.Factory, fetcher EntityFetcher, args []string, ...) flags.GetOption
- func WithMicroserviceByNameFirstMatch(factory *cmdutil.Factory, args []string, opts ...string) flags.GetOption
- func WithReferenceByName(factory *cmdutil.Factory, fetcher EntityFetcher, args []string, opts ...string) flags.GetOption
- func WithReferenceByNameFirstMatch(factory *cmdutil.Factory, fetcher EntityFetcher, args []string, opts ...string) flags.GetOption
- func WithRoleByNameFirstMatch(factory *cmdutil.Factory, args []string, opts ...string) flags.GetOption
- func WithRoleSelfByNameFirstMatch(factory *cmdutil.Factory, args []string, opts ...string) flags.GetOption
- func WithSelfReferenceByName(factory *cmdutil.Factory, fetcher EntityFetcher, args []string, opts ...string) flags.GetOption
- func WithSelfReferenceByNameFirstMatch(factory *cmdutil.Factory, fetcher EntityFetcher, args []string, opts ...string) flags.GetOption
- func WithSmartGroupByNameFirstMatch(factory *cmdutil.Factory, args []string, opts ...string) flags.GetOption
- func WithSoftwareByNameFirstMatch(factory *cmdutil.Factory, args []string, opts ...string) flags.GetOption
- func WithSoftwareVersionByNameFirstMatch(factory *cmdutil.Factory, softwareFlag string, args []string, opts ...string) flags.GetOption
- func WithSoftwareVersionData(factory *cmdutil.Factory, flagSoftware, flagVersion, flagURL string, ...) flags.GetOption
- func WithSoftwareVersionUrlByNameFirstMatch(factory *cmdutil.Factory, softwareFlag string, args []string, opts ...string) flags.GetOption
- func WithUserByNameFirstMatch(factory *cmdutil.Factory, args []string, opts ...string) flags.GetOption
- func WithUserGroupByNameFirstMatch(factory *cmdutil.Factory, args []string, opts ...string) flags.GetOption
- func WithUserSelfByNameFirstMatch(factory *cmdutil.Factory, args []string, opts ...string) flags.GetOption
- type AgentFetcher
- type ApplicationFetcher
- type ChildAdditionFetcher
- type ConfigurationFetcher
- type CumulocityFetcher
- type DefaultFetcher
- type DeviceCertificateFetcher
- type DeviceFetcher
- type DeviceGroupFetcher
- type DeviceProfileFetcher
- type DeviceServiceFetcher
- type EntityFetcher
- type EntityIterator
- type ExternalFetcher
- type FirmwareFetcher
- type FirmwareVersionFetcher
- type HostedApplicationFetcher
- type IDNameFetcher
- type ManagedObjectFetcher
- type MicroserviceFetcher
- type QueryFilter
- type RoleFetcher
- type SmartGroupFetcher
- type SoftwareFetcher
- type SoftwareVersionFetcher
- type UserFetcher
- type UserGroupFetcher
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FindHostedApplications ¶
func FindHostedApplications(factory *cmdutil.Factory, values []string, lookupID bool, format string, excludeParentTenant bool) ([]entityReference, error)
FindHostedApplications returns hosted applications given either an id or search text @values: An array of ids, or names (with wildcards) @lookupID: Lookup the data if an id is given. If a non-id text is given, the result will always be looked up.
func FindMicroservices ¶
func FindMicroservices(factory *cmdutil.Factory, values []string, lookupID bool, format string) ([]entityReference, error)
findMicroservices returns microservices given either an id or search text @values: An array of ids, or names (with wildcards) @lookupID: Lookup the data if an id is given. If a non-id text is given, the result will always be looked up.
func NewIDValue ¶
func NewIDValue(raw string) *idValue
NewIDValue returns a new id formatter Example: NewIDValue("12345|deviceName")
func ParseValues ¶
func WithAgentByNameFirstMatch ¶
func WithAgentByNameFirstMatch(factory *cmdutil.Factory, args []string, opts ...string) flags.GetOption
WithAgentByNameFirstMatch add reference by name matching for agents via cli args. Only the first match will be used
func WithApplicationByNameFirstMatch ¶
func WithApplicationByNameFirstMatch(factory *cmdutil.Factory, args []string, opts ...string) flags.GetOption
WithApplicationByNameFirstMatch add reference by name matching for applications via cli args. Only the first match will be used
func WithCertificateByNameFirstMatch ¶ added in v2.13.0
func WithCertificateByNameFirstMatch(factory *cmdutil.Factory, args []string, opts ...string) flags.GetOption
WithCertificateByNameFirstMatch add reference by name matching for trusted device certificate via cli args. Only the first match will be used
func WithConfigurationByNameFirstMatch ¶
func WithConfigurationByNameFirstMatch(factory *cmdutil.Factory, args []string, opts ...string) flags.GetOption
WithConfigurationByNameFirstMatch add reference by name matching for configuration via cli args. Only the first match will be used
func WithConfigurationFileData ¶ added in v2.20.0
func WithConfigurationFileData(factory *cmdutil.Factory, flagConfiguration, flagConfigurationType, flagURL string, args []string, opts ...string) flags.GetOption
WithConfigurationFileData adds configuration information (type, url etc.)
func WithDeviceByNameFirstMatch ¶
func WithDeviceByNameFirstMatch(factory *cmdutil.Factory, args []string, opts ...string) flags.GetOption
WithDeviceByNameFirstMatch add reference by name matching for devices via cli args. Only the first match will be used
func WithDeviceGroupByNameFirstMatch ¶
func WithDeviceGroupByNameFirstMatch(factory *cmdutil.Factory, args []string, opts ...string) flags.GetOption
WithDeviceGroupByNameFirstMatch add reference by name matching for device groups via cli args. Only the first match will be used
func WithDeviceProfileByNameFirstMatch ¶
func WithDeviceProfileByNameFirstMatch(factory *cmdutil.Factory, args []string, opts ...string) flags.GetOption
WithDeviceProfileByNameFirstMatch add reference by name matching for device profile via cli args. Only the first match will be used
func WithDeviceServiceByNameFirstMatch ¶ added in v2.16.0
func WithDeviceServiceByNameFirstMatch(factory *cmdutil.Factory, flagDevice string, args []string, opts ...string) flags.GetOption
WithSoftwareVersionByNameFirstMatch add reference by name matching for software version via cli args. Only the first match will be used
func WithExternalCommandByNameFirstMatch ¶ added in v2.30.0
func WithExternalCommandByNameFirstMatch(factory *cmdutil.Factory, args []string, externalCommand []string, idPattern string, opts ...string) flags.GetOption
WithSoftwareVersionByNameFirstMatch add reference by name matching for software version via cli args. Only the first match will be used
func WithFirmwareByNameFirstMatch ¶
func WithFirmwareByNameFirstMatch(factory *cmdutil.Factory, args []string, opts ...string) flags.GetOption
WithFirmwareByNameFirstMatch add reference by name matching for firmware via cli args. Only the first match will be used
func WithFirmwarePatchByNameFirstMatch ¶
func WithFirmwarePatchByNameFirstMatch(factory *cmdutil.Factory, firmwareFlag string, args []string, opts ...string) flags.GetOption
WithFirmwarePatchByNameFirstMatch add reference by name matching for firmware version via cli args. Only the first match will be used
func WithFirmwareVersionByNameFirstMatch ¶
func WithFirmwareVersionByNameFirstMatch(factory *cmdutil.Factory, flagFirmware string, args []string, opts ...string) flags.GetOption
WithFirmwareVersionByNameFirstMatch add reference by name matching for firmware version via cli args. Only the first match will be used
func WithFirmwareVersionData ¶
func WithFirmwareVersionData(factory *cmdutil.Factory, flagFirmware, flagVersion, flagURL string, args []string, opts ...string) flags.GetOption
WithFirmwareVersionData adds firmware information (name, version and url)
func WithHostedApplicationByNameFirstMatch ¶
func WithHostedApplicationByNameFirstMatch(factory *cmdutil.Factory, args []string, opts ...string) flags.GetOption
WithHostedApplicationByNameFirstMatch add reference by name matching for hosted (web) applications via cli args. Only the first match will be used
func WithIDSlice ¶
WithIDSlice adds an id slice from cli arguments
func WithManagedObjectPropertyFirstMatch ¶
func WithManagedObjectPropertyFirstMatch(factory *cmdutil.Factory, fetcher EntityFetcher, args []string, property string, opts ...string) flags.GetOption
WithManagedObjectPropertyFirstMatch add reference by name matching using a fetcher via cli args. Only the first match will be used
func WithMicroserviceByNameFirstMatch ¶
func WithMicroserviceByNameFirstMatch(factory *cmdutil.Factory, args []string, opts ...string) flags.GetOption
WithMicroserviceByNameFirstMatch add reference by name matching for microservices via cli args. Only the first match will be used
func WithReferenceByName ¶
func WithReferenceByName(factory *cmdutil.Factory, fetcher EntityFetcher, args []string, opts ...string) flags.GetOption
WithReferenceByName adds support for looking up values by name via cli args
func WithReferenceByNameFirstMatch ¶
func WithReferenceByNameFirstMatch(factory *cmdutil.Factory, fetcher EntityFetcher, args []string, opts ...string) flags.GetOption
WithReferenceByNameFirstMatch add reference by name matching using a fetcher via cli args. Only the first match will be used
func WithRoleByNameFirstMatch ¶
func WithRoleByNameFirstMatch(factory *cmdutil.Factory, args []string, opts ...string) flags.GetOption
WithRoleByNameFirstMatch add reference by name matching for roles via cli args. Only the first match will be used
func WithRoleSelfByNameFirstMatch ¶
func WithRoleSelfByNameFirstMatch(factory *cmdutil.Factory, args []string, opts ...string) flags.GetOption
WithRoleSelfByNameFirstMatch add reference by name matching for roles' self link via cli args. Only the first match will be used
func WithSelfReferenceByName ¶
func WithSelfReferenceByName(factory *cmdutil.Factory, fetcher EntityFetcher, args []string, opts ...string) flags.GetOption
WithSelfReferenceByName adds support for looking up values by name via cli args
func WithSelfReferenceByNameFirstMatch ¶
func WithSelfReferenceByNameFirstMatch(factory *cmdutil.Factory, fetcher EntityFetcher, args []string, opts ...string) flags.GetOption
WithSelfReferenceByNameFirstMatch add reference by name matching using a fetcher via cli args. Only the first match will be used
func WithSmartGroupByNameFirstMatch ¶
func WithSmartGroupByNameFirstMatch(factory *cmdutil.Factory, args []string, opts ...string) flags.GetOption
WithSmartGroupByNameFirstMatch add reference by name matching for smart groups via cli args. Only the first match will be used
func WithSoftwareByNameFirstMatch ¶
func WithSoftwareByNameFirstMatch(factory *cmdutil.Factory, args []string, opts ...string) flags.GetOption
WithSoftwareByNameFirstMatch add reference by name matching for software via cli args. Only the first match will be used
func WithSoftwareVersionByNameFirstMatch ¶
func WithSoftwareVersionByNameFirstMatch(factory *cmdutil.Factory, softwareFlag string, args []string, opts ...string) flags.GetOption
WithSoftwareVersionByNameFirstMatch add reference by name matching for software version via cli args. Only the first match will be used
func WithSoftwareVersionData ¶
func WithSoftwareVersionData(factory *cmdutil.Factory, flagSoftware, flagVersion, flagURL string, args []string, opts ...string) flags.GetOption
WithSoftwareVersionData adds software information (name, version and url)
func WithSoftwareVersionUrlByNameFirstMatch ¶
func WithSoftwareVersionUrlByNameFirstMatch(factory *cmdutil.Factory, softwareFlag string, args []string, opts ...string) flags.GetOption
WithSoftwareVersionUrl add software version url
func WithUserByNameFirstMatch ¶
func WithUserByNameFirstMatch(factory *cmdutil.Factory, args []string, opts ...string) flags.GetOption
WithUserByNameFirstMatch add reference by name matching for users via cli args. Only the first match will be used
Types ¶
type AgentFetcher ¶
type AgentFetcher struct {
*CumulocityFetcher
}
func NewAgentFetcher ¶
func NewAgentFetcher(factory *cmdutil.Factory) *AgentFetcher
type ApplicationFetcher ¶
type ApplicationFetcher struct {
*CumulocityFetcher
}
func NewApplicationFetcher ¶
func NewApplicationFetcher(factory *cmdutil.Factory) *ApplicationFetcher
type ChildAdditionFetcher ¶ added in v2.16.0
type ChildAdditionFetcher struct { Query QueryFilter *DefaultFetcher // contains filtered or unexported fields }
func NewChildAdditionFetcher ¶ added in v2.16.0
func NewChildAdditionFetcher(client *c8y.Client, parentID string) *ChildAdditionFetcher
type ConfigurationFetcher ¶
type ConfigurationFetcher struct {
*ManagedObjectFetcher
}
func NewConfigurationFetcher ¶
func NewConfigurationFetcher(factory *cmdutil.Factory) *ConfigurationFetcher
type CumulocityFetcher ¶ added in v2.30.0
type CumulocityFetcher struct { *DefaultFetcher // contains filtered or unexported fields }
func (*CumulocityFetcher) Client ¶ added in v2.30.0
func (f *CumulocityFetcher) Client() *c8y.Client
type DefaultFetcher ¶
type DefaultFetcher struct{}
func (*DefaultFetcher) IsID ¶
func (f *DefaultFetcher) IsID(v string) bool
type DeviceCertificateFetcher ¶ added in v2.13.0
type DeviceCertificateFetcher struct { *CumulocityFetcher *IDNameFetcher }
func NewDeviceCertificateFetcher ¶ added in v2.13.0
func NewDeviceCertificateFetcher(factory *cmdutil.Factory) *DeviceCertificateFetcher
func (*DeviceCertificateFetcher) IsID ¶ added in v2.13.0
func (f *DeviceCertificateFetcher) IsID(id string) bool
type DeviceFetcher ¶
type DeviceFetcher struct {
*CumulocityFetcher
}
func NewDeviceFetcher ¶
func NewDeviceFetcher(factory *cmdutil.Factory) *DeviceFetcher
type DeviceGroupFetcher ¶
type DeviceGroupFetcher struct {
*CumulocityFetcher
}
func NewDeviceGroupFetcher ¶
func NewDeviceGroupFetcher(factory *cmdutil.Factory) *DeviceGroupFetcher
type DeviceProfileFetcher ¶
type DeviceProfileFetcher struct {
*CumulocityFetcher
}
func NewDeviceProfileFetcher ¶
func NewDeviceProfileFetcher(factory *cmdutil.Factory) *DeviceProfileFetcher
type DeviceServiceFetcher ¶ added in v2.16.0
type DeviceServiceFetcher struct {
*ManagedObjectFetcher
}
func NewDeviceServiceFetcher ¶ added in v2.16.0
func NewDeviceServiceFetcher(factory *cmdutil.Factory, device string) *DeviceServiceFetcher
type EntityFetcher ¶
type EntityIterator ¶
type EntityIterator struct { Fetcher EntityFetcher Factory *cmdutil.Factory GetID bool UseSelfLink bool MinimumMatches int OverrideValue iterator.Iterator Format string // contains filtered or unexported fields }
func NewReferenceByNameIterator ¶
func NewReferenceByNameIterator(fetcher EntityFetcher, factory *cmdutil.Factory, valueIterator iterator.Iterator, minimumMatches int, overrideValue iterator.Iterator, format string) *EntityIterator
NewReferenceByNameIterator create a new iterator which can look up values by their id or names
func (*EntityIterator) GetNext ¶
func (i *EntityIterator) GetNext() (value []byte, input interface{}, err error)
func (*EntityIterator) IsBound ¶
func (i *EntityIterator) IsBound() bool
IsBound return true if the iterator is bound
func (*EntityIterator) MarshalJSON ¶
func (i *EntityIterator) MarshalJSON() (line []byte, err error)
MarshalJSON return the value in a json compatible value
type ExternalFetcher ¶ added in v2.30.0
type ExternalFetcher struct { IDPattern *regexp.Regexp *DefaultFetcher // contains filtered or unexported fields }
func NewExternalFetcher ¶ added in v2.30.0
func NewExternalFetcher(externalCommand []string, idPattern string) *ExternalFetcher
func (*ExternalFetcher) IsID ¶ added in v2.30.0
func (f *ExternalFetcher) IsID(v string) bool
type FirmwareFetcher ¶
type FirmwareFetcher struct {
*ManagedObjectFetcher
}
func NewFirmwareFetcher ¶
func NewFirmwareFetcher(factory *cmdutil.Factory) *FirmwareFetcher
type FirmwareVersionFetcher ¶
type FirmwareVersionFetcher struct {
*ManagedObjectFetcher
}
func NewFirmwareVersionFetcher ¶
func NewFirmwareVersionFetcher(factory *cmdutil.Factory, firmware string, includePatch bool) *FirmwareVersionFetcher
type HostedApplicationFetcher ¶
type HostedApplicationFetcher struct { *CumulocityFetcher // contains filtered or unexported fields }
func NewHostedApplicationFetcher ¶
func NewHostedApplicationFetcher(factory *cmdutil.Factory, excludeParentTenant bool) *HostedApplicationFetcher
type IDNameFetcher ¶
type IDNameFetcher struct{}
func (*IDNameFetcher) IsID ¶
func (f *IDNameFetcher) IsID(v string) bool
type ManagedObjectFetcher ¶
type ManagedObjectFetcher struct { Query QueryFilter *CumulocityFetcher }
func NewManagedObjectFetcher ¶
func NewManagedObjectFetcher(factory *cmdutil.Factory) *ManagedObjectFetcher
type MicroserviceFetcher ¶
type MicroserviceFetcher struct {
*CumulocityFetcher
}
func NewMicroserviceFetcher ¶
func NewMicroserviceFetcher(factory *cmdutil.Factory) *MicroserviceFetcher
type QueryFilter ¶
type RoleFetcher ¶
type RoleFetcher struct { *CumulocityFetcher *IDNameFetcher }
func NewRoleFetcher ¶
func NewRoleFetcher(factory *cmdutil.Factory) *RoleFetcher
type SmartGroupFetcher ¶
type SmartGroupFetcher struct {
*CumulocityFetcher
}
func NewSmartGroupFetcher ¶
func NewSmartGroupFetcher(factory *cmdutil.Factory) *SmartGroupFetcher
type SoftwareFetcher ¶
type SoftwareFetcher struct {
*ManagedObjectFetcher
}
func NewSoftwareFetcher ¶
func NewSoftwareFetcher(factory *cmdutil.Factory) *SoftwareFetcher
type SoftwareVersionFetcher ¶
type SoftwareVersionFetcher struct {
*ManagedObjectFetcher
}
func NewSoftwareVersionFetcher ¶
func NewSoftwareVersionFetcher(factory *cmdutil.Factory, software string) *SoftwareVersionFetcher
type UserFetcher ¶
type UserFetcher struct { *CumulocityFetcher *IDNameFetcher }
func NewUserFetcher ¶
func NewUserFetcher(factory *cmdutil.Factory) *UserFetcher
type UserGroupFetcher ¶
type UserGroupFetcher struct {
*CumulocityFetcher
}
func NewUserGroupFetcher ¶
func NewUserGroupFetcher(factory *cmdutil.Factory) *UserGroupFetcher
Source Files ¶
- agentFetcher.manual.go
- applicationFetcher.go
- c8yfetcher.go
- childAdditionFetcher.go
- configurationFetcher.go
- cumulocityFetcher.go
- deviceCertificateFetcher.go
- deviceFetcher.go
- deviceGroupFetcher.go
- deviceProfileFetcher.go
- deviceServiceFetcher.go
- externalFetcher.go
- firmwareFetcher.go
- firmwareVersionFetcher.go
- hostedApplicationFetcher.go
- managedObjectFetcher.go
- microserviceFetcher.go
- roleFetcher.go
- smartGroupFetcher.manual.go
- softwareFetcher.go
- softwareVersionFetcher.go
- userFetcher.go
- userGroupFetcher.go