Documentation ¶
Index ¶
- func Authorize(conf *Configuration) string
- func DumpJsonRequest(req *http.Request)
- func DumpJsonResponse(resp *http.Response)
- func Get(httpClient *http.Client, url string)
- func Hello(s string) string
- func InitOAuth(conf *Configuration) *http.Client
- func IotmgrDevices(httpClient *http.Client, filter string, option string, namespaces string, ...)
- func IotmgrGroups(httpClient *http.Client, conf *Configuration)
- func IotmgrRules(httpClient *http.Client, conf *Configuration)
- func IotmgrTasks(httpClient *http.Client, conf *Configuration)
- func RolloutsTargets(httpClient *http.Client, conf *Configuration)
- func ShowServiceStatusHealth(region string, sort string, verbose bool)
- func StoreToken(tokenObject *OAuthToken)
- func Things(httpClient *http.Client, fields string, filter string, namespaces string)
- func ThingsCount(httpClient *http.Client, filter string, namespaces string)
- func ThingsSolutions(httpClient *http.Client, solutionId string)
- type Configuration
- type OAuthToken
- type Response
- type StatusComponent
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Authorize ¶
func Authorize(conf *Configuration) string
func DumpJsonRequest ¶ added in v0.0.2
func DumpJsonResponse ¶ added in v0.0.2
func InitOAuth ¶ added in v0.0.2
func InitOAuth(conf *Configuration) *http.Client
func IotmgrDevices ¶ added in v0.0.2
func IotmgrGroups ¶ added in v0.0.2
func IotmgrGroups(httpClient *http.Client, conf *Configuration)
func IotmgrRules ¶ added in v0.0.2
func IotmgrRules(httpClient *http.Client, conf *Configuration)
func IotmgrTasks ¶ added in v0.0.2
func IotmgrTasks(httpClient *http.Client, conf *Configuration)
func RolloutsTargets ¶ added in v0.0.2
func RolloutsTargets(httpClient *http.Client, conf *Configuration)
func ShowServiceStatusHealth ¶ added in v0.0.2
func StoreToken ¶ added in v0.0.2
func StoreToken(tokenObject *OAuthToken)
func ThingsCount ¶ added in v0.0.2
func ThingsSolutions ¶ added in v0.0.2
Types ¶
type Configuration ¶
type Configuration struct { // OAuth ClientId string `yaml:"clientId"` ClientSecret string `yaml:"clientSecret"` Scope string `yaml:"scope"` }
func ReadConfig ¶
func ReadConfig() *Configuration
type OAuthToken ¶
type OAuthToken struct { AccessToken string `json:"access_token"` ExpiresIn int `json:"expires_in"` Scope string `json:"scope"` TokenType string `json:"token_type"` }
OAuth Token Response
{ "access_token":"ey...", "expires_in":3599, "scope":"service:iot-hub-prod:t0262c358aab544399b78b4811bfd862b_hub/full-access service:iot-manager:0262c358-aab5-4439-9b78-b4811bfd862b_iot-manager/full-access service:iot-rollouts:0262c358-aab5-4439-9b78-b4811bfd862b_rollouts/full-access service:iot-things-eu-1:0262c358-aab5-4439-9b78-b4811bfd862b_things/full-access", "token_type":"bearer" }
func LoadToken ¶ added in v0.0.2
func LoadToken() OAuthToken
type Response ¶ added in v0.0.2
type Response struct { Name string `json:"name"` StatusComponents []StatusComponent `json:"data"` }
STATUS.BOSCH-IOT-SUITE.COM JSON
type StatusComponent ¶ added in v0.0.2
type StatusComponent struct { Id int `json:"id"` Name string `json:"name"` StatusName string `json:"status_name"` Description string `json:"description"` Link string `json:"link"` Status int `json:"status"` Order int `json:"order"` UpdatedAt string `json:"updated_at"` }
{ "id": 1, "name": "Bosch IoT Things (EU-1)", "description": "Managed inventory of digital twins for IoT device assets", "link": "https://www.bosch-iot-suite.com/things/", "status": 1, "order": 16, "group_id": 1, "enabled": true, "meta": null, "created_at": "2018-06-15 13:09:48", "updated_at": "2020-04-20 08:30:02", "deleted_at": null, "status_name": "Operational", "tags": { "": "" } },
Click to show internal directories.
Click to hide internal directories.