Documentation ¶
Index ¶
Constants ¶
View Source
const (
StageStr = "STAGE"
)
Variables ¶
View Source
var ( LIST = "list" PATCH = "patch" CREATE = "create" DELETE = "delete" ALIAS_LIST = []string{"ls", "show", "out", "output"} ALIAS_PATCH = []string{"patch", "update", "up", "pct", "upgrade", "upd"} ALIAS_CREATE = []string{"cre", "add", "sub", "subscribe"} ALIAS_DELETE = []string{"del", "rm", "remove", "clean", "clear", "cle"} Stages = createStages() FullScope = "openid email profile address user.profile user.read user.write " + "group.read group.write group.relation.read group.relation.write" + "corporation.read corporation.write corporation.user.read corporation.user.write corporation.group.read corporation.group.write " + "oauth2_client.read oauth2_client.write license.read license.write acl.read acl.write resource_owner.read " + "resource_owner.read " + "channel_protocol.read channel_protocol.write.internal channel.read channel.write " + "messaging.subscribe messaging.publish " + "datastore.read datastore.write datastore.upload datastore.download " + "file_storage.read file_storage.write file_storage.upload file_storage.download " + "device.read device.write device_model.read device_model.write device.group_policy.read devices.group_policies.write " + "geo.area.read geo.area.write geo.area-kind.read geo.area-kind.write geo.area.content.write geo.circle.read geo.circle.write geo.map.read geo.map.write geo.point.read geo.point.write geo.polygon.read geo.polygon.write geo.route.read geo.route.write " + "active_license.read active_license.write product.read " + "videostream.read videostream.view " URL_JSON = cnv.MustIndentJson(URLs{ "prod": { DeviceManagement: "device-management.optimcloudapis.com", DeviceAssetManagement: "device-asset-lifecycle.optimcloudapis.com", Monitoring: "monitoring.optimcloudapis.com", Messaging: "messaging.optimcloudapis.com", Location: "location.optimcloudapis.com", Accounts: "accounts.optimcloudapis.com", Storage: "storage.optimcloudapis.com", Iam: "iam.optimcloudapis.com", Auth: "auth.optim.cloud", VideoStreams: "video-streaming.optim.cloud", }, "pre": { DeviceManagement: "device-management.preapis.cios.dev", Monitoring: "monitoring.preapis.cios.dev", Messaging: "messaging.preapis.cios.dev", Location: "location.preapis.cios.dev", Accounts: "accounts.preapis.cios.dev", Storage: "storage.preapis.cios.dev", Iam: "iam.preapis.cios.dev", Auth: "auth.pre.cios.dev", VideoStreams: "video-streaming.preapis.cios.dev", }, }) )
View Source
var (
Dir, _ = homedir.Dir()
TopDir = Dir + "/.cios-cli"
DatastoreDir = TopDir + "/datastore"
UrlPath = utils.Is(os.Getenv("CIOS_CLI_URL_PATH") == "").T(TopDir + "/URL.json").F(os.Getenv("CIOS_CLI_URL_PATH")).Value.(string)
ConfigPath = utils.Is(os.Getenv("CIOS_CLI_CONFIG_PATH") == "").T(TopDir + "/config.json").F(os.Getenv("CIOS_CLI_CONFIG_PATH")).Value.(string)
AccountPath = TopDir + "/accounts.json"
TimestampFormatFilePath = TopDir + "/.timestamp_format"
LifecycleDir = TopDir + "/lifecycle"
)
Functions ¶
func WriteAccounts ¶
func WriteConfig ¶
Types ¶
type Account ¶
func GetAccounts ¶
type Config ¶
type Job ¶
type Job map[string]MessagingJobs
type MessagingJob ¶
type MessagingJob struct { Channel string `yaml:"channel"` Loop int `yaml:"loop"` Plugin string `yaml:"plugin"` Value []MessagingJobValue `yaml:"value,flow"` }
type MessagingJobValue ¶
type MessagingJobs ¶
type MessagingJobs []MessagingJob
type URL ¶
type URL struct { DeviceManagement string `json:"device"` DeviceAssetManagement string `json:"device_asset"` Monitoring string `json:"monitoring"` Messaging string `json:"messaging"` Location string `json:"location"` Accounts string `json:"account"` Storage string `json:"storage"` Iam string `json:"iam"` Auth string `json:"auth"` VideoStreams string `json:"video_streaming"` }
Click to show internal directories.
Click to hide internal directories.