cloud

package
v1.3.4 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2022 License: Apache-2.0 Imports: 1 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package cloud implements Cloud Configuration Resource. https://github.com/openconnectivityfoundation/cloud-services/blob/master/swagger2.0/oic.r.coapcloudconf.swagger.json

Index

Constants

View Source
const (
	// ConfigurationResourceType is the resource type of the Cloud Configuration Resource.
	ConfigurationResourceType = "oic.r.coapcloudconf"
	// ConfigurationResourceURI is the URI of the Cloud Configuration Resource.
	ConfigurationResourceURI = "/CoapCloudConfResURI"
)
View Source
const (
	StatusResourceType = "x.cloud.device.status"
	StatusResourceURI  = "/oic/cloud/s"
)

Variables

View Source
var (
	StatusInterfaces    = []string{interfaces.OC_IF_BASELINE}
	StatusResourceTypes = []string{StatusResourceType}
)

Functions

This section is empty.

Types

type Configuration

type Configuration struct {
	ResourceTypes         []string           `json:"rt"`
	Interfaces            []string           `json:"if"`
	Name                  string             `json:"n"`
	AuthorizationProvider string             `json:"apn"`
	CloudID               string             `json:"sid"`
	URL                   string             `json:"cis"`
	LastErrorCode         int                `json:"clec"`
	ProvisioningStatus    ProvisioningStatus `json:"cps"`
}

Configuration contains the supported fields of the Cloud Configuration Resource.

type ConfigurationUpdateRequest

type ConfigurationUpdateRequest struct {
	AuthorizationProvider string `json:"apn"`
	URL                   string `json:"cis"`
	AuthorizationCode     string `json:"at"`
	CloudID               string `json:"sid"`
}

ConfigurationUpdateRequest is used to update the Cloud Configuration Resource.

type ProvisioningStatus

type ProvisioningStatus string

ProvisioningStatus indicates the Cloud Provisioning status of the Device.

const (
	ProvisioningStatus_UNINITIALIZED     ProvisioningStatus = "uninitialized"
	ProvisioningStatus_READY_TO_REGISTER ProvisioningStatus = "readytoregister"
	ProvisioningStatus_REGISTERING       ProvisioningStatus = "registering"
	ProvisioningStatus_REGISTERED        ProvisioningStatus = "registered"
	ProvisioningStatus_FAILED            ProvisioningStatus = "failed"
)

type Status

type Status struct {
	ResourceTypes []string `json:"rt"`
	Interfaces    []string `json:"if"`
	Online        bool     `json:"online"`
}

Status is resource published by OCF Cloud. - signup: resource published - signin: content changed -> online true - signout/close connection: content changed -> online false

Jump to

Keyboard shortcuts

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