Documentation ¶
Index ¶
- func FindHostedApplications(client *c8y.Client, values []string, lookupID bool, format string) ([]entityReference, error)
- func FindMicroservices(client *c8y.Client, 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(client *c8y.Client, args []string, opts ...string) flags.GetOption
- func WithApplicationByNameFirstMatch(client *c8y.Client, args []string, opts ...string) flags.GetOption
- func WithCertificateByNameFirstMatch(client *c8y.Client, args []string, opts ...string) flags.GetOption
- func WithConfigurationByNameFirstMatch(client *c8y.Client, args []string, opts ...string) flags.GetOption
- func WithDeviceByNameFirstMatch(client *c8y.Client, args []string, opts ...string) flags.GetOption
- func WithDeviceGroupByNameFirstMatch(client *c8y.Client, args []string, opts ...string) flags.GetOption
- func WithDeviceProfileByNameFirstMatch(client *c8y.Client, args []string, opts ...string) flags.GetOption
- func WithDeviceServiceByNameFirstMatch(client *c8y.Client, args []string, opts ...string) flags.GetOption
- func WithDisabledDryRunContext(c *c8y.Client) context.Context
- func WithFirmwareByNameFirstMatch(client *c8y.Client, args []string, opts ...string) flags.GetOption
- func WithFirmwarePatchByNameFirstMatch(client *c8y.Client, args []string, opts ...string) flags.GetOption
- func WithFirmwareVersionByNameFirstMatch(client *c8y.Client, args []string, opts ...string) flags.GetOption
- func WithFirmwareVersionData(client *c8y.Client, flagFirmware, flagVersion, flagURL string, args []string, ...) flags.GetOption
- func WithHostedApplicationByNameFirstMatch(client *c8y.Client, args []string, opts ...string) flags.GetOption
- func WithIDSlice(args []string, opts ...string) flags.GetOption
- func WithManagedObjectPropertyFirstMatch(client *c8y.Client, fetcher EntityFetcher, args []string, property string, ...) flags.GetOption
- func WithMicroserviceByNameFirstMatch(client *c8y.Client, args []string, opts ...string) flags.GetOption
- func WithReferenceByName(client *c8y.Client, fetcher EntityFetcher, args []string, opts ...string) flags.GetOption
- func WithReferenceByNameFirstMatch(client *c8y.Client, fetcher EntityFetcher, args []string, opts ...string) flags.GetOption
- func WithRoleByNameFirstMatch(client *c8y.Client, args []string, opts ...string) flags.GetOption
- func WithRoleSelfByNameFirstMatch(client *c8y.Client, args []string, opts ...string) flags.GetOption
- func WithSelfReferenceByName(client *c8y.Client, fetcher EntityFetcher, args []string, opts ...string) flags.GetOption
- func WithSelfReferenceByNameFirstMatch(client *c8y.Client, fetcher EntityFetcher, args []string, opts ...string) flags.GetOption
- func WithSmartGroupByNameFirstMatch(client *c8y.Client, args []string, opts ...string) flags.GetOption
- func WithSoftwareByNameFirstMatch(client *c8y.Client, args []string, opts ...string) flags.GetOption
- func WithSoftwareVersionByNameFirstMatch(client *c8y.Client, args []string, opts ...string) flags.GetOption
- func WithSoftwareVersionData(client *c8y.Client, flagSoftware, flagVersion, flagURL string, args []string, ...) flags.GetOption
- func WithSoftwareVersionUrlByNameFirstMatch(client *c8y.Client, args []string, opts ...string) flags.GetOption
- func WithUserByNameFirstMatch(client *c8y.Client, args []string, opts ...string) flags.GetOption
- func WithUserGroupByNameFirstMatch(client *c8y.Client, args []string, opts ...string) flags.GetOption
- func WithUserSelfByNameFirstMatch(client *c8y.Client, args []string, opts ...string) flags.GetOption
- type AgentFetcher
- type ApplicationFetcher
- type ChildAdditionFetcher
- type ConfigurationFetcher
- type DefaultFetcher
- type DeviceCertificateFetcher
- type DeviceFetcher
- type DeviceGroupFetcher
- type DeviceProfileFetcher
- type DeviceServiceFetcher
- type EntityFetcher
- type EntityIterator
- 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(client *c8y.Client, values []string, lookupID bool, format string) ([]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(client *c8y.Client, 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 ¶
WithAgentByNameFirstMatch add reference by name matching for agents via cli args. Only the first match will be used
func WithApplicationByNameFirstMatch ¶
func WithApplicationByNameFirstMatch(client *c8y.Client, 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(client *c8y.Client, 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(client *c8y.Client, 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 WithDeviceByNameFirstMatch ¶
WithDeviceByNameFirstMatch add reference by name matching for devices via cli args. Only the first match will be used
func WithDeviceGroupByNameFirstMatch ¶
func WithDeviceGroupByNameFirstMatch(client *c8y.Client, 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(client *c8y.Client, 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(client *c8y.Client, 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 WithFirmwareByNameFirstMatch ¶
func WithFirmwareByNameFirstMatch(client *c8y.Client, 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(client *c8y.Client, 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(client *c8y.Client, 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(client *c8y.Client, flagFirmware, flagVersion, flagURL string, args []string, opts ...string) flags.GetOption
WithFirmwareVersionData adds firmware information (name, version and url)
func WithHostedApplicationByNameFirstMatch ¶
func WithHostedApplicationByNameFirstMatch(client *c8y.Client, 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(client *c8y.Client, 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(client *c8y.Client, 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(client *c8y.Client, fetcher EntityFetcher, args []string, opts ...string) flags.GetOption
WithReferenceByName adds support for looking up values by name via cli args
func WithReferenceByNameFirstMatch ¶
func WithReferenceByNameFirstMatch(client *c8y.Client, 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 ¶
WithRoleByNameFirstMatch add reference by name matching for roles via cli args. Only the first match will be used
func WithRoleSelfByNameFirstMatch ¶
func WithRoleSelfByNameFirstMatch(client *c8y.Client, 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(client *c8y.Client, fetcher EntityFetcher, args []string, opts ...string) flags.GetOption
WithSelfReferenceByName adds support for looking up values by name via cli args
func WithSelfReferenceByNameFirstMatch ¶
func WithSelfReferenceByNameFirstMatch(client *c8y.Client, 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(client *c8y.Client, 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(client *c8y.Client, 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(client *c8y.Client, 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(client *c8y.Client, flagSoftware, flagVersion, flagURL string, args []string, opts ...string) flags.GetOption
WithSoftwareVersionData adds software information (name, version and url)
func WithSoftwareVersionUrlByNameFirstMatch ¶
func WithSoftwareVersionUrlByNameFirstMatch(client *c8y.Client, args []string, opts ...string) flags.GetOption
WithSoftwareVersionUrl add software version url
func WithUserByNameFirstMatch ¶
WithUserByNameFirstMatch add reference by name matching for users via cli args. Only the first match will be used
Types ¶
type AgentFetcher ¶
type AgentFetcher struct { *DefaultFetcher // contains filtered or unexported fields }
func NewAgentFetcher ¶
func NewAgentFetcher(client *c8y.Client) *AgentFetcher
type ApplicationFetcher ¶
type ApplicationFetcher struct { *DefaultFetcher // contains filtered or unexported fields }
func NewApplicationFetcher ¶
func NewApplicationFetcher(client *c8y.Client) *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(client *c8y.Client) *ConfigurationFetcher
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 { *IDNameFetcher // contains filtered or unexported fields }
func NewDeviceCertificateFetcher ¶ added in v2.13.0
func NewDeviceCertificateFetcher(client *c8y.Client) *DeviceCertificateFetcher
func (*DeviceCertificateFetcher) IsID ¶ added in v2.13.0
func (f *DeviceCertificateFetcher) IsID(id string) bool
type DeviceFetcher ¶
type DeviceFetcher struct { *DefaultFetcher // contains filtered or unexported fields }
func NewDeviceFetcher ¶
func NewDeviceFetcher(client *c8y.Client) *DeviceFetcher
type DeviceGroupFetcher ¶
type DeviceGroupFetcher struct { *DefaultFetcher // contains filtered or unexported fields }
func NewDeviceGroupFetcher ¶
func NewDeviceGroupFetcher(client *c8y.Client) *DeviceGroupFetcher
type DeviceProfileFetcher ¶
type DeviceProfileFetcher struct { *DefaultFetcher // contains filtered or unexported fields }
func NewDeviceProfileFetcher ¶
func NewDeviceProfileFetcher(client *c8y.Client) *DeviceProfileFetcher
type DeviceServiceFetcher ¶ added in v2.16.0
type DeviceServiceFetcher struct {
*ManagedObjectFetcher
}
func NewDeviceServiceFetcher ¶ added in v2.16.0
func NewDeviceServiceFetcher(client *c8y.Client, device string) *DeviceServiceFetcher
type EntityFetcher ¶
type EntityIterator ¶
type EntityIterator struct { Fetcher EntityFetcher Client *c8y.Client GetID bool UseSelfLink bool MinimumMatches int OverrideValue iterator.Iterator Format string // contains filtered or unexported fields }
func NewReferenceByNameIterator ¶
func NewReferenceByNameIterator(fetcher EntityFetcher, c8yClient *c8y.Client, 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 FirmwareFetcher ¶
type FirmwareFetcher struct {
*ManagedObjectFetcher
}
func NewFirmwareFetcher ¶
func NewFirmwareFetcher(client *c8y.Client) *FirmwareFetcher
type FirmwareVersionFetcher ¶
type FirmwareVersionFetcher struct {
*ManagedObjectFetcher
}
func NewFirmwareVersionFetcher ¶
func NewFirmwareVersionFetcher(client *c8y.Client, firmware string, includePatch bool) *FirmwareVersionFetcher
type HostedApplicationFetcher ¶
type HostedApplicationFetcher struct { *DefaultFetcher // contains filtered or unexported fields }
func NewHostedApplicationFetcher ¶
func NewHostedApplicationFetcher(client *c8y.Client) *HostedApplicationFetcher
type IDNameFetcher ¶
type IDNameFetcher struct{}
func (*IDNameFetcher) IsID ¶
func (f *IDNameFetcher) IsID(v string) bool
type ManagedObjectFetcher ¶
type ManagedObjectFetcher struct { Query QueryFilter *DefaultFetcher // contains filtered or unexported fields }
func NewManagedObjectFetcher ¶
func NewManagedObjectFetcher(client *c8y.Client) *ManagedObjectFetcher
type MicroserviceFetcher ¶
type MicroserviceFetcher struct { *DefaultFetcher // contains filtered or unexported fields }
func NewMicroserviceFetcher ¶
func NewMicroserviceFetcher(client *c8y.Client) *MicroserviceFetcher
type QueryFilter ¶
type RoleFetcher ¶
type RoleFetcher struct { *IDNameFetcher // contains filtered or unexported fields }
func NewRoleFetcher ¶
func NewRoleFetcher(client *c8y.Client) *RoleFetcher
type SmartGroupFetcher ¶
type SmartGroupFetcher struct { *DefaultFetcher // contains filtered or unexported fields }
func NewSmartGroupFetcher ¶
func NewSmartGroupFetcher(client *c8y.Client) *SmartGroupFetcher
type SoftwareFetcher ¶
type SoftwareFetcher struct {
*ManagedObjectFetcher
}
func NewSoftwareFetcher ¶
func NewSoftwareFetcher(client *c8y.Client) *SoftwareFetcher
type SoftwareVersionFetcher ¶
type SoftwareVersionFetcher struct {
*ManagedObjectFetcher
}
func NewSoftwareVersionFetcher ¶
func NewSoftwareVersionFetcher(client *c8y.Client, software string) *SoftwareVersionFetcher
type UserFetcher ¶
type UserFetcher struct { *IDNameFetcher // contains filtered or unexported fields }
func NewUserFetcher ¶
func NewUserFetcher(client *c8y.Client) *UserFetcher
type UserGroupFetcher ¶
type UserGroupFetcher struct { *DefaultFetcher // contains filtered or unexported fields }
func NewUserGroupFetcher ¶
func NewUserGroupFetcher(client *c8y.Client) *UserGroupFetcher
Source Files ¶
- agentFetcher.manual.go
- applicationFetcher.go
- c8yfetcher.go
- childAdditionFetcher.go
- configurationFetcher.go
- deviceCertificateFetcher.go
- deviceFetcher.go
- deviceGroupFetcher.go
- deviceProfileFetcher.go
- deviceServiceFetcher.go
- firmwareFetcher.go
- firmwareVersionFetcher.go
- hostedApplicationFetcher.go
- managedObjectFetcher.go
- microserviceFetcher.go
- roleFetcher.go
- smartGroupFetcher.manual.go
- softwareFetcher.go
- softwareVersionFetcher.go
- userFetcher.go
- userGroupFetcher.go