Documentation ¶
Overview ¶
Code generated from specification version 1.0.0: DO NOT EDIT
Code generated from specification version 1.0.0: DO NOT EDIT
Code generated from specification version 1.0.0: DO NOT EDIT
Code generated from specification version 1.0.0: DO NOT EDIT
Code generated from specification version 1.0.0: DO NOT EDIT
Code generated from specification version 1.0.0: DO NOT EDIT
Code generated from specification version 1.0.0: DO NOT EDIT
Code generated from specification version 1.0.0: DO NOT EDIT
Code generated from specification version 1.0.0: DO NOT EDIT
Code generated from specification version 1.0.0: DO NOT EDIT
Code generated from specification version 1.0.0: DO NOT EDIT
Code generated from specification version 1.0.0: DO NOT EDIT
Code generated from specification version 1.0.0: DO NOT EDIT
Code generated from specification version 1.0.0: DO NOT EDIT
Code generated from specification version 1.0.0: DO NOT EDIT
Code generated from specification version 1.0.0: DO NOT EDIT
Code generated from specification version 1.0.0: DO NOT EDIT
Code generated from specification version 1.0.0: DO NOT EDIT
Code generated from specification version 1.0.0: DO NOT EDIT
Code generated from specification version 1.0.0: DO NOT EDIT
Code generated from specification version 1.0.0: DO NOT EDIT
Code generated from specification version 1.0.0: DO NOT EDIT
Code generated from specification version 1.0.0: DO NOT EDIT
Code generated from specification version 1.0.0: DO NOT EDIT
Code generated from specification version 1.0.0: DO NOT EDIT
Code generated from specification version 1.0.0: DO NOT EDIT
Code generated from specification version 1.0.0: DO NOT EDIT
Code generated from specification version 1.0.0: DO NOT EDIT
Code generated from specification version 1.0.0: DO NOT EDIT
Code generated from specification version 1.0.0: DO NOT EDIT
Code generated from specification version 1.0.0: DO NOT EDIT
Code generated from specification version 1.0.0: DO NOT EDIT
Code generated from specification version 1.0.0: DO NOT EDIT
Code generated from specification version 1.0.0: DO NOT EDIT
Code generated from specification version 1.0.0: DO NOT EDIT
Code generated from specification version 1.0.0: DO NOT EDIT
Code generated from specification version 1.0.0: DO NOT EDIT
Code generated from specification version 1.0.0: DO NOT EDIT
Code generated from specification version 1.0.0: DO NOT EDIT
Code generated from specification version 1.0.0: DO NOT EDIT
Code generated from specification version 1.0.0: DO NOT EDIT
Code generated from specification version 1.0.0: DO NOT EDIT
Code generated from specification version 1.0.0: DO NOT EDIT
Code generated from specification version 1.0.0: DO NOT EDIT
Code generated from specification version 1.0.0: DO NOT EDIT
Code generated from specification version 1.0.0: DO NOT EDIT
Code generated from specification version 1.0.0: DO NOT EDIT
Code generated from specification version 1.0.0: DO NOT EDIT
Code generated from specification version 1.0.0: DO NOT EDIT
Code generated from specification version 1.0.0: DO NOT EDIT
Code generated from specification version 1.0.0: DO NOT EDIT
Code generated from specification version 1.0.0: DO NOT EDIT
Code generated from specification version 1.0.0: DO NOT EDIT
Code generated from specification version 1.0.0: DO NOT EDIT
Code generated from specification version 1.0.0: DO NOT EDIT
Code generated from specification version 1.0.0: DO NOT EDIT
Code generated from specification version 1.0.0: DO NOT EDIT
Code generated from specification version 1.0.0: DO NOT EDIT
Code generated from specification version 1.0.0: DO NOT EDIT
Code generated from specification version 1.0.0: DO NOT EDIT
Code generated from specification version 1.0.0: DO NOT EDIT
Code generated from specification version 1.0.0: DO NOT EDIT
Code generated from specification version 1.0.0: DO NOT EDIT
Code generated from specification version 1.0.0: DO NOT EDIT
Code generated from specification version 1.0.0: DO NOT EDIT
Code generated from specification version 1.0.0: DO NOT EDIT
Code generated from specification version 1.0.0: DO NOT EDIT
Code generated from specification version 1.0.0: DO NOT EDIT
Code generated from specification version 1.0.0: DO NOT EDIT
Code generated from specification version 1.0.0: DO NOT EDIT
Code generated from specification version 1.0.0: DO NOT EDIT
Code generated from specification version 1.0.0: DO NOT EDIT
Code generated from specification version 1.0.0: DO NOT EDIT
Code generated from specification version 1.0.0: DO NOT EDIT
Code generated from specification version 1.0.0: DO NOT EDIT
Code generated from specification version 1.0.0: DO NOT EDIT
Code generated from specification version 1.0.0: DO NOT EDIT
Code generated from specification version 1.0.0: DO NOT EDIT
Code generated from specification version 1.0.0: DO NOT EDIT
Code generated from specification version 1.0.0: DO NOT EDIT
Code generated from specification version 1.0.0: DO NOT EDIT
Code generated from specification version 1.0.0: DO NOT EDIT
Code generated from specification version 1.0.0: DO NOT EDIT
Code generated from specification version 1.0.0: DO NOT EDIT
Code generated from specification version 1.0.0: DO NOT EDIT
Code generated from specification version 1.0.0: DO NOT EDIT
Code generated from specification version 1.0.0: DO NOT EDIT
Code generated from specification version 1.0.0: DO NOT EDIT
Code generated from specification version 1.0.0: DO NOT EDIT
Code generated from specification version 1.0.0: DO NOT EDIT
Code generated from specification version 1.0.0: DO NOT EDIT
Code generated from specification version 1.0.0: DO NOT EDIT
Code generated from specification version 1.0.0: DO NOT EDIT
Code generated from specification version 1.0.0: DO NOT EDIT
Code generated from specification version 1.0.0: DO NOT EDIT
Code generated from specification version 1.0.0: DO NOT EDIT
Code generated from specification version 1.0.0: DO NOT EDIT
Code generated from specification version 1.0.0: DO NOT EDIT
Code generated from specification version 1.0.0: DO NOT EDIT
Code generated from specification version 1.0.0: DO NOT EDIT
Code generated from specification version 1.0.0: DO NOT EDIT
Code generated from specification version 1.0.0: DO NOT EDIT
Code generated from specification version 1.0.0: DO NOT EDIT
Code generated from specification version 1.0.0: DO NOT EDIT
Code generated from specification version 1.0.0: DO NOT EDIT
Code generated from specification version 1.0.0: DO NOT EDIT
Code generated from specification version 1.0.0: DO NOT EDIT
Code generated from specification version 1.0.0: DO NOT EDIT
Code generated from specification version 1.0.0: DO NOT EDIT
Code generated from specification version 1.0.0: DO NOT EDIT
Code generated from specification version 1.0.0: DO NOT EDIT
Code generated from specification version 1.0.0: DO NOT EDIT
Code generated from specification version 1.0.0: DO NOT EDIT
Code generated from specification version 1.0.0: DO NOT EDIT
Code generated from specification version 1.0.0: DO NOT EDIT
Code generated from specification version 1.0.0: DO NOT EDIT
Code generated from specification version 1.0.0: DO NOT EDIT
Code generated from specification version 1.0.0: DO NOT EDIT
Code generated from specification version 1.0.0: DO NOT EDIT
Code generated from specification version 1.0.0: DO NOT EDIT
Code generated from specification version 1.0.0: DO NOT EDIT
Code generated from specification version 1.0.0: DO NOT EDIT
Code generated from specification version 1.0.0: DO NOT EDIT
Code generated from specification version 1.0.0: DO NOT EDIT
Code generated from specification version 1.0.0: DO NOT EDIT
Code generated from specification version 1.0.0: DO NOT EDIT
Code generated from specification version 1.0.0: DO NOT EDIT
Code generated from specification version 1.0.0: DO NOT EDIT
Code generated from specification version 1.0.0: DO NOT EDIT
Code generated from specification version 1.0.0: DO NOT EDIT
Code generated from specification version 1.0.0: DO NOT EDIT
Code generated from specification version 1.0.0: DO NOT EDIT
Code generated from specification version 1.0.0: DO NOT EDIT
Code generated from specification version 1.0.0: DO NOT EDIT
Code generated from specification version 1.0.0: DO NOT EDIT
Code generated from specification version 1.0.0: DO NOT EDIT
Code generated from specification version 1.0.0: DO NOT EDIT
Code generated from specification version 1.0.0: DO NOT EDIT
Code generated from specification version 1.0.0: DO NOT EDIT
Code generated from specification version 1.0.0: DO NOT EDIT
Code generated from specification version 1.0.0: DO NOT EDIT
Code generated from specification version 1.0.0: DO NOT EDIT
Code generated from specification version 1.0.0: DO NOT EDIT
Code generated from specification version 1.0.0: DO NOT EDIT
Code generated from specification version 1.0.0: DO NOT EDIT
Code generated from specification version 1.0.0: DO NOT EDIT
Code generated from specification version 1.0.0: DO NOT EDIT
Code generated from specification version 1.0.0: DO NOT EDIT
Code generated from specification version 1.0.0: DO NOT EDIT
Code generated from specification version 1.0.0: DO NOT EDIT
Code generated from specification version 1.0.0: DO NOT EDIT
Code generated from specification version 1.0.0: DO NOT EDIT
Code generated from specification version 1.0.0: DO NOT EDIT
Code generated from specification version 1.0.0: DO NOT EDIT
Code generated from specification version 1.0.0: DO NOT EDIT
Code generated from specification version 1.0.0: DO NOT EDIT
Index ¶
- Constants
- Variables
- func Execute()
- func FilterJSON(value gjson.Result, paths []string) (data []string)
- func GetFileContentType(out *os.File) (string, error)
- func GetIDArray(values []string) (ids []string)
- func GetIDs(cmd *cobra.Command, args []string) (ids []string)
- func GetManifestFile(zipFilename string) (string, error)
- func MustParseJSON(value string) map[string]interface{}
- func ParseValues(values []string) (ids []string)
- func ReadConfigFiles(v *viper.Viper) (path string, err error)
- func RemoveEmptyStrings(array []string) []string
- func SplitString(value string, sep string) []string
- type CommonCommandOptions
- type CumulocitySession
- type CumulocitySessions
- type JSONFilter
- type JSONFilters
Constants ¶
const ( // SettingsIncludeAllPageSize property name used to control the default page size when using includeAll parameter SettingsIncludeAllPageSize string = "settings.includeAll.pageSize" // SettingsIncludeAllDelayMS property name used to control the delay between fetching the next page SettingsIncludeAllDelayMS string = "settings.includeAll.delayMS" // SettingsDefaultPageSize property name used to control the default page size SettingsDefaultPageSize string = "settings.default.pageSize" // SettingsConfigPath configuration path SettingsConfigPath string = "settings.path" )
const CumulocityDefaultPageSize int = 5
CumulocityDefaultPageSize is the default page size used by Cumulocity
const (
FlagDataName = "data"
)
const SettingsGlobalName = "settings"
SettingsGlobalName name of the settings file (without extension)
Variables ¶
var Logger *logger.Logger
Logger is used to record the log messages which should be visible to the user when using the verbose flag
Functions ¶
func GetFileContentType ¶
GetFileContentType TODO: Fix mime detection because it currently returns only application/octet-stream
func GetIDArray ¶
func GetIDs ¶
GetIDs returns a list of IDs --id 1234,1234 (comma seperated list (without spaces!)) --id "22437097744 1235" [22437097744, 1235] --id 22437097744 1235,1234 (requires positional arguments as well) --id 22437097744 1235,1234 asdfasdf asdfasdf will be ignored as it does not match the pattern
func GetManifestFile ¶
GetManifestFile extracts the Cumulocity microservice manifest file from a given zip file
func MustParseJSON ¶
MustParseJSON parses a string and returns the map structure
func ParseValues ¶
func ReadConfigFiles ¶ added in v1.5.0
ReadConfigFiles reads multiple configuration files to load the c8y session and other settings
The session files are 1. load settings (from C8Y_SESSION_HOME path) 2. load session file (by path) 3. load session file (by name)
func RemoveEmptyStrings ¶
RemoveEmptyStrings returns a new array where the strings are not empty (after trimming space)
func SplitString ¶
Types ¶
type CommonCommandOptions ¶ added in v1.4.0
type CommonCommandOptions struct { OutputFile string Filters *JSONFilters ResultProperty string IncludeAll bool WithTotalPages bool PageSize int CurrentPage int64 TotalPages int64 }
CommonCommandOptions control the handling of the response which are available for all commands which interact with the server
func (CommonCommandOptions) AddQueryParameters ¶ added in v1.5.0
func (options CommonCommandOptions) AddQueryParameters(query *url.Values)
AddQueryParameters adds the common query parameters to the given query values
type CumulocitySession ¶
type CumulocitySession struct { // ID string `json:"id"` Host string `json:"host"` Tenant string `json:"tenant"` Username string `json:"username"` Password string `json:"password"` Description string `json:"description"` UseTenantPrefix bool `json:"useTenantPrefix"` MicroserviceAliases map[string]string `json:"microserviceAliases"` Index int `json:"-"` Path string `json:"-"` Name string `json:"-"` }
CumulocitySession contains all settings required to communicate with a Cumulocity service
func NewCumulocitySessionFromFile ¶
func NewCumulocitySessionFromFile(filePath string) (*CumulocitySession, error)
func (CumulocitySession) GetHost ¶
func (s CumulocitySession) GetHost() string
func (CumulocitySession) GetPassword ¶
func (s CumulocitySession) GetPassword() string
func (*CumulocitySession) SetHost ¶
func (s *CumulocitySession) SetHost(host string)
func (*CumulocitySession) SetPassword ¶
func (s *CumulocitySession) SetPassword(password string)
type CumulocitySessions ¶
type CumulocitySessions struct {
Sessions []CumulocitySession `json:"sessions"`
}
type JSONFilter ¶
type JSONFilters ¶
type JSONFilters struct { Filters []JSONFilter Selectors []string Pluck string }
func (*JSONFilters) Add ¶
func (f *JSONFilters) Add(property, operation, value string)
func (*JSONFilters) AddSelectors ¶
func (f *JSONFilters) AddSelectors(props ...string)
Source Files ¶
- addDeviceToGroupCmd.auto.go
- addGroupToGroupCmd.auto.go
- addRoleToGroupCmd.auto.go
- addRoleToUserCmd.auto.go
- addUserToGroupCmd.auto.go
- agentFetcher.manual.go
- agentsRootCmd.go
- alarmsRootCmd.go
- applicationFetcher.go
- applicationsRootCmd.go
- approveNewDeviceRequestCmd.auto.go
- arguments.go
- auditRecordsRootCmd.go
- binariesRootCmd.go
- completions.go
- constants.go
- copyApplicationCmd.auto.go
- createAgentCmd.auto.go
- createDeviceCmd.auto.go
- createDeviceGroupCmd.auto.go
- currentApplicationRootCmd.go
- currentTenantCmd.auto.go
- currentUserRootCmd.go
- databrokerRootCmd.go
- decryptPasswordCmd.manual.go
- deleteAgentCmd.auto.go
- deleteAlarmCollectionCmd.auto.go
- deleteApplicationCmd.auto.go
- deleteAssetFromGroupCmd.auto.go
- deleteBinaryCmd.auto.go
- deleteDeviceCmd.auto.go
- deleteDeviceFromGroupCmd.auto.go
- deleteDeviceGroupCmd.auto.go
- deleteEventBinaryCmd.auto.go
- deleteEventCmd.auto.go
- deleteEventCollectionCmd.auto.go
- deleteExternalIDCmd.auto.go
- deleteGroupCmd.auto.go
- deleteManagedObjectChildAssetReferenceCmd.auto.go
- deleteManagedObjectChildDeviceReferenceCmd.auto.go
- deleteManagedObjectCmd.auto.go
- deleteMeasurementCmd.auto.go
- deleteMeasurementCollectionCmd.auto.go
- deleteMicroserviceCmd.auto.go
- deleteNewDeviceRequestCmd.auto.go
- deleteOperationCollectionCmd.auto.go
- deleteRetentionRuleCmd.auto.go
- deleteRoleFromGroupCmd.auto.go
- deleteRoleFromUserCmd.auto.go
- deleteTenantCmd.auto.go
- deleteTenantOptionCmd.auto.go
- deleteUserCmd.auto.go
- deleteUserFromGroupCmd.auto.go
- deviceCredentialsRootCmd.go
- deviceFetcher.go
- deviceGroupFetcher.go
- devicecontrol.go
- devicesRootCmd.go
- disableApplicationFromTenantCmd.auto.go
- disableMicroserviceCmd.auto.go
- downloadCmd.auto.go
- enableApplicationOnTenantCmd.auto.go
- enableMicroserviceCmd.auto.go
- eventsRootCmd.go
- fetcher.go
- filter.go
- genericRestCmd.go
- getAgentCmd.auto.go
- getAgentCollectionCmd.manual.go
- getAlarmCmd.auto.go
- getAlarmCollectionCmd.auto.go
- getAllTenantUsageStatisticsSummaryCollectionCmd.auto.go
- getApplicationBinaryCollectionCmd.auto.go
- getApplicationCmd.auto.go
- getApplicationCollectionCmd.auto.go
- getApplicationReferenceCollectionCmd.auto.go
- getAuditRecordCmd.auto.go
- getAuditRecordCollectionCmd.auto.go
- getBinaryCollectionCmd.auto.go
- getCurrentApplicationCmd.auto.go
- getCurrentApplicationUserCollectionCmd.auto.go
- getCurrentUserInventoryRoleCmd.auto.go
- getCurrentUserInventoryRoleCollectionCmd.auto.go
- getDataBrokerCmd.auto.go
- getDataBrokerConnectorCollectionCmd.auto.go
- getDeviceCmd.auto.go
- getDeviceCollectionCmd.manual.go
- getDeviceGroupCmd.auto.go
- getDeviceGroupCollectionCmd.manual.go
- getEventBinaryCmd.auto.go
- getEventCmd.auto.go
- getEventCollectionCmd.auto.go
- getExternalIDCmd.auto.go
- getExternalIDCollectionCmd.auto.go
- getGroupByNameCmd.auto.go
- getGroupCmd.auto.go
- getGroupCollectionCmd.auto.go
- getManagedObjectChildAssetCollectionCmd.auto.go
- getManagedObjectChildAssetReferenceCmd.auto.go
- getManagedObjectChildDeviceCollectionCmd.auto.go
- getManagedObjectChildDeviceReferenceCmd.auto.go
- getManagedObjectCmd.auto.go
- getManagedObjectCollectionCmd.auto.go
- getMeasurementCmd.auto.go
- getMeasurementCollectionCmd.auto.go
- getMeasurementSeriesCmd.auto.go
- getMicroserviceBootstrapUserCmd.auto.go
- getMicroserviceCmd.auto.go
- getMicroserviceCollectionCmd.auto.go
- getNewDeviceRequestCmd.auto.go
- getNewDeviceRequestCollectionCmd.auto.go
- getOperationCmd.auto.go
- getOperationCollectionCmd.auto.go
- getRetentionRuleCmd.auto.go
- getRetentionRuleCollectionCmd.auto.go
- getRoleCollectionCmd.auto.go
- getRoleReferenceCollectionFromGroupCmd.auto.go
- getRoleReferenceCollectionFromUserCmd.auto.go
- getSupportedMeasurementsCmd.auto.go
- getSupportedOperationsCmd.auto.go
- getSupportedSeriesCmd.auto.go
- getSystemOptionCmd.auto.go
- getSystemOptionCollectionCmd.auto.go
- getTenantCmd.auto.go
- getTenantCollectionCmd.auto.go
- getTenantOptionCmd.auto.go
- getTenantOptionCollectionCmd.auto.go
- getTenantOptionsForCategoryCmd.auto.go
- getTenantUsageStatisticsCollectionCmd.auto.go
- getTenantUsageStatisticsSummaryCollectionCmd.auto.go
- getTenantVersionCmd.auto.go
- getUserByNameCmd.auto.go
- getUserCmd.auto.go
- getUserCollectionCmd.auto.go
- getUserCurrentCmd.auto.go
- getUserMembershipCollectionCmd.auto.go
- getUsersInGroupCmd.auto.go
- helpers.go
- hostedApplicationFetcher.go
- identityRootCmd.go
- idsRootCmd.go
- inventoryBinary.go
- inventoryBinaryCreate.go
- inventoryBinaryDelete.go
- inventoryBinaryDownload.go
- inventoryFlags.go
- inventoryReferencesRootCmd.go
- inventoryRootCmd.go
- listSessionCmd.manual.go
- measurement.go
- measurementsRootCmd.go
- microserviceFetcher.go
- microservicesRootCmd.go
- newAlarmCmd.auto.go
- newApplicationBinaryCmd.auto.go
- newApplicationCmd.auto.go
- newAuditCmd.auto.go
- newBinaryCmd.auto.go
- newEncryptPasswordCmd.manual.go
- newEventBinaryCmd.auto.go
- newEventCmd.auto.go
- newExternalIDCmd.auto.go
- newGroupCmd.auto.go
- newHostedApplicationCmd.go
- newManagedObjectChildAssetCmd.auto.go
- newManagedObjectChildDeviceCmd.auto.go
- newManagedObjectCmd.auto.go
- newMeasurementCmd.auto.go
- newMicroserviceBinaryCmd.auto.go
- newMicroserviceCmd.go
- newOperationCmd.auto.go
- newRetentionRuleCmd.auto.go
- newSessionCmd.manual.go
- newTenantCmd.auto.go
- newTenantOptionCmd.auto.go
- newUserCmd.auto.go
- normalization.go
- operationsRootCmd.go
- pipe.go
- powershell_completions.go
- queryManagedObjectCollectionCmd.manual.go
- realtime.go
- realtimeSubscribeAllCmd.go
- realtimeSubscription.go
- registerNewDeviceCmd.auto.go
- requestDeviceCredentialsCmd.auto.go
- requests.go
- resetUserPasswordCmd.auto.go
- retentionRulesRootCmd.go
- roleFetcher.go
- root.go
- sessionsRootCmd.manual.go
- setDeviceRequiredAvailabilityCmd.auto.go
- strings.go
- subscribeAlarmCmd.go
- subscribeEventCmd.go
- subscribeManagedObjectCmd.go
- subscribeMeasurementCmd.go
- subscribeOperationCmd.go
- subscriber.go
- systemOptionsRootCmd.go
- tenantOptionsRootCmd.go
- tenantStatisticsRootCmd.go
- tenantsRootCmd.go
- timestampFlags.go
- timestampHelper.go
- updateAgentCmd.auto.go
- updateAlarmCmd.auto.go
- updateAlarmCollectionCmd.auto.go
- updateApplicationCmd.auto.go
- updateBinaryCmd.auto.go
- updateCurrentApplicationCmd.auto.go
- updateDataBrokerCmd.auto.go
- updateDeviceCmd.auto.go
- updateDeviceGroupCmd.auto.go
- updateEventBinaryCmd.auto.go
- updateEventCmd.auto.go
- updateGroupCmd.auto.go
- updateManagedObjectCmd.auto.go
- updateMicroserviceCmd.auto.go
- updateOperationCmd.auto.go
- updateRetentionRuleCmd.auto.go
- updateTenantCmd.auto.go
- updateTenantOptionBulkCmd.auto.go
- updateTenantOptionCmd.auto.go
- updateTenantOptionEditableCmd.auto.go
- updateUserCmd.auto.go
- updateUserCurrentCmd.auto.go
- userFetcher.go
- userGroupFetcher.go
- userGroupsRootCmd.go
- userReferencesRootCmd.go
- userRolesRootCmd.go
- usersRootCmd.go
- utilities.go
- version.go