cmd

package
v1.5.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 4, 2020 License: MIT Imports: 42 Imported by: 0

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

View Source
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"
)
View Source
const CumulocityDefaultPageSize int = 5

CumulocityDefaultPageSize is the default page size used by Cumulocity

View Source
const (
	FlagDataName = "data"
)
View Source
const SettingsGlobalName = "settings"

SettingsGlobalName name of the settings file (without extension)

Variables

View Source
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 Execute

func Execute()

func FilterJSON

func FilterJSON(value gjson.Result, paths []string) (data []string)

func GetFileContentType

func GetFileContentType(out *os.File) (string, error)

GetFileContentType TODO: Fix mime detection because it currently returns only application/octet-stream

func GetIDArray

func GetIDArray(values []string) (ids []string)

func GetIDs

func GetIDs(cmd *cobra.Command, args []string) (ids []string)

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

func GetManifestFile(zipFilename string) (string, error)

GetManifestFile extracts the Cumulocity microservice manifest file from a given zip file

func MustParseJSON

func MustParseJSON(value string) map[string]interface{}

MustParseJSON parses a string and returns the map structure

func ParseValues

func ParseValues(values []string) (ids []string)

func ReadConfigFiles added in v1.5.0

func ReadConfigFiles(v *viper.Viper) (path string, err error)

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

func RemoveEmptyStrings(array []string) []string

RemoveEmptyStrings returns a new array where the strings are not empty (after trimming space)

func SplitString

func SplitString(value string, sep string) []string

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 JSONFilter struct {
	Property  string
	Operation string
	Value     string
}

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)

func (JSONFilters) Apply

func (f JSONFilters) Apply(jsonValue string, property string) []byte

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL