Documentation ¶
Overview ¶
Package iot provides methods and message types of the iot v1 API.
Index ¶
- Constants
- type API
- func (s *API) CreateDevice(req *CreateDeviceRequest, opts ...scw.RequestOption) (*CreateDeviceResponse, error)
- func (s *API) CreateHub(req *CreateHubRequest, opts ...scw.RequestOption) (*Hub, error)
- func (s *API) CreateNetwork(req *CreateNetworkRequest, opts ...scw.RequestOption) (*CreateNetworkResponse, error)
- func (s *API) CreateRoute(req *CreateRouteRequest, opts ...scw.RequestOption) (*Route, error)
- func (s *API) DeleteDevice(req *DeleteDeviceRequest, opts ...scw.RequestOption) error
- func (s *API) DeleteHub(req *DeleteHubRequest, opts ...scw.RequestOption) error
- func (s *API) DeleteNetwork(req *DeleteNetworkRequest, opts ...scw.RequestOption) error
- func (s *API) DeleteRoute(req *DeleteRouteRequest, opts ...scw.RequestOption) error
- func (s *API) DeleteTwinDocument(req *DeleteTwinDocumentRequest, opts ...scw.RequestOption) error
- func (s *API) DeleteTwinDocuments(req *DeleteTwinDocumentsRequest, opts ...scw.RequestOption) error
- func (s *API) DisableDevice(req *DisableDeviceRequest, opts ...scw.RequestOption) (*Device, error)
- func (s *API) DisableHub(req *DisableHubRequest, opts ...scw.RequestOption) (*Hub, error)
- func (s *API) EnableDevice(req *EnableDeviceRequest, opts ...scw.RequestOption) (*Device, error)
- func (s *API) EnableHub(req *EnableHubRequest, opts ...scw.RequestOption) (*Hub, error)
- func (s *API) GetDevice(req *GetDeviceRequest, opts ...scw.RequestOption) (*Device, error)
- func (s *API) GetDeviceCertificate(req *GetDeviceCertificateRequest, opts ...scw.RequestOption) (*GetDeviceCertificateResponse, error)
- func (s *API) GetDeviceMetrics(req *GetDeviceMetricsRequest, opts ...scw.RequestOption) (*GetDeviceMetricsResponse, error)
- func (s *API) GetHub(req *GetHubRequest, opts ...scw.RequestOption) (*Hub, error)
- func (s *API) GetHubCA(req *GetHubCARequest, opts ...scw.RequestOption) (*GetHubCAResponse, error)
- func (s *API) GetHubMetrics(req *GetHubMetricsRequest, opts ...scw.RequestOption) (*GetHubMetricsResponse, error)
- func (s *API) GetNetwork(req *GetNetworkRequest, opts ...scw.RequestOption) (*Network, error)
- func (s *API) GetRoute(req *GetRouteRequest, opts ...scw.RequestOption) (*Route, error)
- func (s *API) GetServiceInfo(req *GetServiceInfoRequest, opts ...scw.RequestOption) (*scw.ServiceInfo, error)
- func (s *API) GetTwinDocument(req *GetTwinDocumentRequest, opts ...scw.RequestOption) (*TwinDocument, error)
- func (s *API) ListDevices(req *ListDevicesRequest, opts ...scw.RequestOption) (*ListDevicesResponse, error)
- func (s *API) ListHubs(req *ListHubsRequest, opts ...scw.RequestOption) (*ListHubsResponse, error)
- func (s *API) ListNetworks(req *ListNetworksRequest, opts ...scw.RequestOption) (*ListNetworksResponse, error)
- func (s *API) ListRoutes(req *ListRoutesRequest, opts ...scw.RequestOption) (*ListRoutesResponse, error)
- func (s *API) ListTwinDocuments(req *ListTwinDocumentsRequest, opts ...scw.RequestOption) (*ListTwinDocumentsResponse, error)
- func (s *API) PatchTwinDocument(req *PatchTwinDocumentRequest, opts ...scw.RequestOption) (*TwinDocument, error)
- func (s *API) PutTwinDocument(req *PutTwinDocumentRequest, opts ...scw.RequestOption) (*TwinDocument, error)
- func (s *API) RenewDeviceCertificate(req *RenewDeviceCertificateRequest, opts ...scw.RequestOption) (*RenewDeviceCertificateResponse, error)
- func (s *API) SetDeviceCertificate(req *SetDeviceCertificateRequest, opts ...scw.RequestOption) (*SetDeviceCertificateResponse, error)
- func (s *API) SetHubCA(req *SetHubCARequest, opts ...scw.RequestOption) (*Hub, error)
- func (s *API) UpdateDevice(req *UpdateDeviceRequest, opts ...scw.RequestOption) (*Device, error)
- func (s *API) UpdateHub(req *UpdateHubRequest, opts ...scw.RequestOption) (*Hub, error)
- func (s *API) UpdateRoute(req *UpdateRouteRequest, opts ...scw.RequestOption) (*Route, error)
- func (s *API) WaitForHub(req *WaitForHubRequest, opts ...scw.RequestOption) (*Hub, error)
- type Certificate
- type CreateDeviceRequest
- type CreateDeviceResponse
- type CreateHubRequest
- type CreateNetworkRequest
- type CreateNetworkResponse
- type CreateRouteRequest
- type CreateRouteRequestDatabaseConfig
- type CreateRouteRequestRestConfig
- type CreateRouteRequestS3Config
- type DeleteDeviceRequest
- type DeleteHubRequest
- type DeleteNetworkRequest
- type DeleteRouteRequest
- type DeleteTwinDocumentRequest
- type DeleteTwinDocumentsRequest
- type Device
- type DeviceMessageFilters
- type DeviceMessageFiltersRule
- type DeviceMessageFiltersRulePolicy
- type DeviceStatus
- type DisableDeviceRequest
- type DisableHubRequest
- type EnableDeviceRequest
- type EnableHubRequest
- type GetDeviceCertificateRequest
- type GetDeviceCertificateResponse
- type GetDeviceMetricsRequest
- type GetDeviceMetricsResponse
- type GetDeviceRequest
- type GetHubCARequest
- type GetHubCAResponse
- type GetHubMetricsRequest
- type GetHubMetricsResponse
- type GetHubRequest
- type GetNetworkRequest
- type GetRouteRequest
- type GetServiceInfoRequest
- type GetTwinDocumentRequest
- type Hub
- type HubProductPlan
- type HubStatus
- type HubTwinsGraphiteConfig
- type ListDevicesRequest
- type ListDevicesRequestOrderBy
- type ListDevicesResponse
- type ListHubsRequest
- type ListHubsRequestOrderBy
- type ListHubsResponse
- type ListNetworksRequest
- type ListNetworksRequestOrderBy
- type ListNetworksResponse
- type ListRoutesRequest
- type ListRoutesRequestOrderBy
- type ListRoutesResponse
- type ListTwinDocumentsRequest
- type ListTwinDocumentsResponse
- type ListTwinDocumentsResponseDocumentSummary
- type Network
- type NetworkNetworkType
- type NullValue
- type PatchTwinDocumentRequest
- type PutTwinDocumentRequest
- type RenewDeviceCertificateRequest
- type RenewDeviceCertificateResponse
- type Route
- type RouteDatabaseConfig
- type RouteDatabaseConfigEngine
- type RouteRestConfig
- type RouteRestConfigHTTPVerb
- type RouteRouteType
- type RouteS3Config
- type RouteS3ConfigS3Strategy
- type RouteSummary
- type SetDeviceCertificateRequest
- type SetDeviceCertificateResponse
- type SetHubCARequest
- type TwinDocument
- type UpdateDeviceRequest
- type UpdateHubRequest
- type UpdateRouteRequest
- type UpdateRouteRequestDatabaseConfig
- type UpdateRouteRequestRestConfig
- type UpdateRouteRequestS3Config
- type WaitForHubRequest
Constants ¶
const ( // DeviceMessageFiltersRulePolicyUnknown is [insert doc]. DeviceMessageFiltersRulePolicyUnknown = DeviceMessageFiltersRulePolicy("unknown") // DeviceMessageFiltersRulePolicyAccept is [insert doc]. DeviceMessageFiltersRulePolicyAccept = DeviceMessageFiltersRulePolicy("accept") // DeviceMessageFiltersRulePolicyReject is [insert doc]. DeviceMessageFiltersRulePolicyReject = DeviceMessageFiltersRulePolicy("reject") )
const ( // DeviceStatusUnknown is [insert doc]. DeviceStatusUnknown = DeviceStatus("unknown") // DeviceStatusError is [insert doc]. DeviceStatusError = DeviceStatus("error") // DeviceStatusEnabled is [insert doc]. DeviceStatusEnabled = DeviceStatus("enabled") // DeviceStatusDisabled is [insert doc]. DeviceStatusDisabled = DeviceStatus("disabled") )
const ( // HubProductPlanPlanUnknown is [insert doc]. HubProductPlanPlanUnknown = HubProductPlan("plan_unknown") HubProductPlanPlanShared = HubProductPlan("plan_shared") // HubProductPlanPlanDedicated is [insert doc]. HubProductPlanPlanDedicated = HubProductPlan("plan_dedicated") // HubProductPlanPlanHa is [insert doc]. HubProductPlanPlanHa = HubProductPlan("plan_ha") )
const ( // HubStatusUnknown is [insert doc]. HubStatusUnknown = HubStatus("unknown") // HubStatusError is [insert doc]. HubStatusError = HubStatus("error") // HubStatusEnabling is [insert doc]. HubStatusEnabling = HubStatus("enabling") // HubStatusReady is [insert doc]. HubStatusReady = HubStatus("ready") // HubStatusDisabling is [insert doc]. HubStatusDisabling = HubStatus("disabling") // HubStatusDisabled is [insert doc]. HubStatusDisabled = HubStatus("disabled") )
const ( // ListDevicesRequestOrderByNameAsc is [insert doc]. ListDevicesRequestOrderByNameAsc = ListDevicesRequestOrderBy("name_asc") // ListDevicesRequestOrderByNameDesc is [insert doc]. ListDevicesRequestOrderByNameDesc = ListDevicesRequestOrderBy("name_desc") // ListDevicesRequestOrderByStatusAsc is [insert doc]. ListDevicesRequestOrderByStatusAsc = ListDevicesRequestOrderBy("status_asc") // ListDevicesRequestOrderByStatusDesc is [insert doc]. ListDevicesRequestOrderByStatusDesc = ListDevicesRequestOrderBy("status_desc") // ListDevicesRequestOrderByHubIDAsc is [insert doc]. ListDevicesRequestOrderByHubIDAsc = ListDevicesRequestOrderBy("hub_id_asc") // ListDevicesRequestOrderByHubIDDesc is [insert doc]. ListDevicesRequestOrderByHubIDDesc = ListDevicesRequestOrderBy("hub_id_desc") // ListDevicesRequestOrderByCreatedAtAsc is [insert doc]. ListDevicesRequestOrderByCreatedAtAsc = ListDevicesRequestOrderBy("created_at_asc") // ListDevicesRequestOrderByCreatedAtDesc is [insert doc]. ListDevicesRequestOrderByCreatedAtDesc = ListDevicesRequestOrderBy("created_at_desc") // ListDevicesRequestOrderByUpdatedAtAsc is [insert doc]. ListDevicesRequestOrderByUpdatedAtAsc = ListDevicesRequestOrderBy("updated_at_asc") // ListDevicesRequestOrderByUpdatedAtDesc is [insert doc]. ListDevicesRequestOrderByUpdatedAtDesc = ListDevicesRequestOrderBy("updated_at_desc") // ListDevicesRequestOrderByAllowInsecureAsc is [insert doc]. ListDevicesRequestOrderByAllowInsecureAsc = ListDevicesRequestOrderBy("allow_insecure_asc") // ListDevicesRequestOrderByAllowInsecureDesc is [insert doc]. ListDevicesRequestOrderByAllowInsecureDesc = ListDevicesRequestOrderBy("allow_insecure_desc") )
const ( // ListHubsRequestOrderByNameAsc is [insert doc]. ListHubsRequestOrderByNameAsc = ListHubsRequestOrderBy("name_asc") // ListHubsRequestOrderByNameDesc is [insert doc]. ListHubsRequestOrderByNameDesc = ListHubsRequestOrderBy("name_desc") // ListHubsRequestOrderByStatusAsc is [insert doc]. ListHubsRequestOrderByStatusAsc = ListHubsRequestOrderBy("status_asc") // ListHubsRequestOrderByStatusDesc is [insert doc]. ListHubsRequestOrderByStatusDesc = ListHubsRequestOrderBy("status_desc") // ListHubsRequestOrderByProductPlanAsc is [insert doc]. ListHubsRequestOrderByProductPlanAsc = ListHubsRequestOrderBy("product_plan_asc") // ListHubsRequestOrderByProductPlanDesc is [insert doc]. ListHubsRequestOrderByProductPlanDesc = ListHubsRequestOrderBy("product_plan_desc") // ListHubsRequestOrderByCreatedAtAsc is [insert doc]. ListHubsRequestOrderByCreatedAtAsc = ListHubsRequestOrderBy("created_at_asc") // ListHubsRequestOrderByCreatedAtDesc is [insert doc]. ListHubsRequestOrderByCreatedAtDesc = ListHubsRequestOrderBy("created_at_desc") // ListHubsRequestOrderByUpdatedAtAsc is [insert doc]. ListHubsRequestOrderByUpdatedAtAsc = ListHubsRequestOrderBy("updated_at_asc") // ListHubsRequestOrderByUpdatedAtDesc is [insert doc]. ListHubsRequestOrderByUpdatedAtDesc = ListHubsRequestOrderBy("updated_at_desc") )
const ( // ListNetworksRequestOrderByNameAsc is [insert doc]. ListNetworksRequestOrderByNameAsc = ListNetworksRequestOrderBy("name_asc") // ListNetworksRequestOrderByNameDesc is [insert doc]. ListNetworksRequestOrderByNameDesc = ListNetworksRequestOrderBy("name_desc") // ListNetworksRequestOrderByTypeAsc is [insert doc]. ListNetworksRequestOrderByTypeAsc = ListNetworksRequestOrderBy("type_asc") // ListNetworksRequestOrderByTypeDesc is [insert doc]. ListNetworksRequestOrderByTypeDesc = ListNetworksRequestOrderBy("type_desc") // ListNetworksRequestOrderByCreatedAtAsc is [insert doc]. ListNetworksRequestOrderByCreatedAtAsc = ListNetworksRequestOrderBy("created_at_asc") // ListNetworksRequestOrderByCreatedAtDesc is [insert doc]. ListNetworksRequestOrderByCreatedAtDesc = ListNetworksRequestOrderBy("created_at_desc") )
const ( // ListRoutesRequestOrderByNameAsc is [insert doc]. ListRoutesRequestOrderByNameAsc = ListRoutesRequestOrderBy("name_asc") // ListRoutesRequestOrderByNameDesc is [insert doc]. ListRoutesRequestOrderByNameDesc = ListRoutesRequestOrderBy("name_desc") // ListRoutesRequestOrderByHubIDAsc is [insert doc]. ListRoutesRequestOrderByHubIDAsc = ListRoutesRequestOrderBy("hub_id_asc") // ListRoutesRequestOrderByHubIDDesc is [insert doc]. ListRoutesRequestOrderByHubIDDesc = ListRoutesRequestOrderBy("hub_id_desc") // ListRoutesRequestOrderByTypeAsc is [insert doc]. ListRoutesRequestOrderByTypeAsc = ListRoutesRequestOrderBy("type_asc") // ListRoutesRequestOrderByTypeDesc is [insert doc]. ListRoutesRequestOrderByTypeDesc = ListRoutesRequestOrderBy("type_desc") // ListRoutesRequestOrderByCreatedAtAsc is [insert doc]. ListRoutesRequestOrderByCreatedAtAsc = ListRoutesRequestOrderBy("created_at_asc") // ListRoutesRequestOrderByCreatedAtDesc is [insert doc]. ListRoutesRequestOrderByCreatedAtDesc = ListRoutesRequestOrderBy("created_at_desc") )
const ( // NetworkNetworkTypeUnknown is [insert doc]. NetworkNetworkTypeUnknown = NetworkNetworkType("unknown") // NetworkNetworkTypeSigfox is [insert doc]. NetworkNetworkTypeSigfox = NetworkNetworkType("sigfox") // NetworkNetworkTypeRest is [insert doc]. NetworkNetworkTypeRest = NetworkNetworkType("rest") )
const ( // RouteDatabaseConfigEngineUnknown is [insert doc]. RouteDatabaseConfigEngineUnknown = RouteDatabaseConfigEngine("unknown") // RouteDatabaseConfigEnginePostgresql is [insert doc]. RouteDatabaseConfigEnginePostgresql = RouteDatabaseConfigEngine("postgresql") // RouteDatabaseConfigEngineMysql is [insert doc]. RouteDatabaseConfigEngineMysql = RouteDatabaseConfigEngine("mysql") )
const ( // RouteRestConfigHTTPVerbUnknown is [insert doc]. RouteRestConfigHTTPVerbUnknown = RouteRestConfigHTTPVerb("unknown") // RouteRestConfigHTTPVerbGet is [insert doc]. RouteRestConfigHTTPVerbGet = RouteRestConfigHTTPVerb("get") // RouteRestConfigHTTPVerbPost is [insert doc]. RouteRestConfigHTTPVerbPost = RouteRestConfigHTTPVerb("post") // RouteRestConfigHTTPVerbPut is [insert doc]. RouteRestConfigHTTPVerbPut = RouteRestConfigHTTPVerb("put") // RouteRestConfigHTTPVerbPatch is [insert doc]. RouteRestConfigHTTPVerbPatch = RouteRestConfigHTTPVerb("patch") // RouteRestConfigHTTPVerbDelete is [insert doc]. RouteRestConfigHTTPVerbDelete = RouteRestConfigHTTPVerb("delete") )
const ( // RouteRouteTypeUnknown is [insert doc]. RouteRouteTypeUnknown = RouteRouteType("unknown") // RouteRouteTypeS3 is [insert doc]. RouteRouteTypeS3 = RouteRouteType("s3") // RouteRouteTypeDatabase is [insert doc]. RouteRouteTypeDatabase = RouteRouteType("database") // RouteRouteTypeRest is [insert doc]. RouteRouteTypeRest = RouteRouteType("rest") )
const ( // RouteS3ConfigS3StrategyUnknown is [insert doc]. RouteS3ConfigS3StrategyUnknown = RouteS3ConfigS3Strategy("unknown") // RouteS3ConfigS3StrategyPerTopic is [insert doc]. RouteS3ConfigS3StrategyPerTopic = RouteS3ConfigS3Strategy("per_topic") // RouteS3ConfigS3StrategyPerMessage is [insert doc]. RouteS3ConfigS3StrategyPerMessage = RouteS3ConfigS3Strategy("per_message") )
const ( // NullValueNULLVALUE is [insert doc]. NullValueNULLVALUE = NullValue("NULL_VALUE") )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type API ¶
type API struct {
// contains filtered or unexported fields
}
API: this API allows you to manage IoT hubs and devices
func (*API) CreateDevice ¶
func (s *API) CreateDevice(req *CreateDeviceRequest, opts ...scw.RequestOption) (*CreateDeviceResponse, error)
CreateDevice: add a device
func (*API) CreateHub ¶
func (s *API) CreateHub(req *CreateHubRequest, opts ...scw.RequestOption) (*Hub, error)
CreateHub: create a hub
func (*API) CreateNetwork ¶
func (s *API) CreateNetwork(req *CreateNetworkRequest, opts ...scw.RequestOption) (*CreateNetworkResponse, error)
CreateNetwork: create a new Network
func (*API) CreateRoute ¶
func (s *API) CreateRoute(req *CreateRouteRequest, opts ...scw.RequestOption) (*Route, error)
CreateRoute: create a route
Multiple route kinds can be created:
- Database Route. Create a route that will record subscribed MQTT messages into your database. <b>You need to manage the database by yourself</b>.
- REST Route. Create a route that will call a REST API on received subscribed MQTT messages.
- S3 Routes. Create a route that will put subscribed MQTT messages into an S3 bucket. You need to create the bucket yourself and grant us write access. The grant can be done with s3cmd (`s3cmd setacl s3://<my-bucket> --acl-grant=write:555c69c3-87d0-4bf8-80f1-99a2f757d031:555c69c3-87d0-4bf8-80f1-99a2f757d031`).
func (*API) DeleteDevice ¶
func (s *API) DeleteDevice(req *DeleteDeviceRequest, opts ...scw.RequestOption) error
DeleteDevice: remove a device
func (*API) DeleteHub ¶
func (s *API) DeleteHub(req *DeleteHubRequest, opts ...scw.RequestOption) error
DeleteHub: delete a hub
func (*API) DeleteNetwork ¶
func (s *API) DeleteNetwork(req *DeleteNetworkRequest, opts ...scw.RequestOption) error
DeleteNetwork: delete a Network
func (*API) DeleteRoute ¶
func (s *API) DeleteRoute(req *DeleteRouteRequest, opts ...scw.RequestOption) error
DeleteRoute: delete a route
func (*API) DeleteTwinDocument ¶
func (s *API) DeleteTwinDocument(req *DeleteTwinDocumentRequest, opts ...scw.RequestOption) error
DeleteTwinDocument: bETA - Delete a Cloud Twin Document
func (*API) DeleteTwinDocuments ¶
func (s *API) DeleteTwinDocuments(req *DeleteTwinDocumentsRequest, opts ...scw.RequestOption) error
DeleteTwinDocuments: bETA - Delete all the documents of a Cloud Twin
func (*API) DisableDevice ¶
func (s *API) DisableDevice(req *DisableDeviceRequest, opts ...scw.RequestOption) (*Device, error)
DisableDevice: disable a device
func (*API) DisableHub ¶
func (s *API) DisableHub(req *DisableHubRequest, opts ...scw.RequestOption) (*Hub, error)
DisableHub: disable a hub
func (*API) EnableDevice ¶
func (s *API) EnableDevice(req *EnableDeviceRequest, opts ...scw.RequestOption) (*Device, error)
EnableDevice: enable a device
func (*API) EnableHub ¶
func (s *API) EnableHub(req *EnableHubRequest, opts ...scw.RequestOption) (*Hub, error)
EnableHub: enable a hub
func (*API) GetDevice ¶
func (s *API) GetDevice(req *GetDeviceRequest, opts ...scw.RequestOption) (*Device, error)
GetDevice: get a device
func (*API) GetDeviceCertificate ¶
func (s *API) GetDeviceCertificate(req *GetDeviceCertificateRequest, opts ...scw.RequestOption) (*GetDeviceCertificateResponse, error)
GetDeviceCertificate: get a device's certificate
func (*API) GetDeviceMetrics ¶
func (s *API) GetDeviceMetrics(req *GetDeviceMetricsRequest, opts ...scw.RequestOption) (*GetDeviceMetricsResponse, error)
GetDeviceMetrics: get a device's metrics
func (*API) GetHub ¶
func (s *API) GetHub(req *GetHubRequest, opts ...scw.RequestOption) (*Hub, error)
GetHub: get a hub
func (*API) GetHubCA ¶
func (s *API) GetHubCA(req *GetHubCARequest, opts ...scw.RequestOption) (*GetHubCAResponse, error)
GetHubCA: get the certificate authority of a hub
func (*API) GetHubMetrics ¶
func (s *API) GetHubMetrics(req *GetHubMetricsRequest, opts ...scw.RequestOption) (*GetHubMetricsResponse, error)
GetHubMetrics: get a hub's metrics
func (*API) GetNetwork ¶
func (s *API) GetNetwork(req *GetNetworkRequest, opts ...scw.RequestOption) (*Network, error)
GetNetwork: retrieve a specific Network
func (*API) GetRoute ¶
func (s *API) GetRoute(req *GetRouteRequest, opts ...scw.RequestOption) (*Route, error)
GetRoute: get a route
func (*API) GetServiceInfo ¶
func (s *API) GetServiceInfo(req *GetServiceInfoRequest, opts ...scw.RequestOption) (*scw.ServiceInfo, error)
func (*API) GetTwinDocument ¶
func (s *API) GetTwinDocument(req *GetTwinDocumentRequest, opts ...scw.RequestOption) (*TwinDocument, error)
GetTwinDocument: bETA - Get a Cloud Twin Document
func (*API) ListDevices ¶
func (s *API) ListDevices(req *ListDevicesRequest, opts ...scw.RequestOption) (*ListDevicesResponse, error)
ListDevices: list devices
func (*API) ListHubs ¶
func (s *API) ListHubs(req *ListHubsRequest, opts ...scw.RequestOption) (*ListHubsResponse, error)
ListHubs: list hubs
func (*API) ListNetworks ¶
func (s *API) ListNetworks(req *ListNetworksRequest, opts ...scw.RequestOption) (*ListNetworksResponse, error)
ListNetworks: list the Networks
func (*API) ListRoutes ¶
func (s *API) ListRoutes(req *ListRoutesRequest, opts ...scw.RequestOption) (*ListRoutesResponse, error)
ListRoutes: list routes
func (*API) ListTwinDocuments ¶
func (s *API) ListTwinDocuments(req *ListTwinDocumentsRequest, opts ...scw.RequestOption) (*ListTwinDocumentsResponse, error)
ListTwinDocuments: bETA - List the documents of a Cloud Twin
func (*API) PatchTwinDocument ¶
func (s *API) PatchTwinDocument(req *PatchTwinDocumentRequest, opts ...scw.RequestOption) (*TwinDocument, error)
PatchTwinDocument: bETA - Patch a Cloud Twin Document
func (*API) PutTwinDocument ¶
func (s *API) PutTwinDocument(req *PutTwinDocumentRequest, opts ...scw.RequestOption) (*TwinDocument, error)
PutTwinDocument: bETA - Update a Cloud Twin Document
func (*API) RenewDeviceCertificate ¶
func (s *API) RenewDeviceCertificate(req *RenewDeviceCertificateRequest, opts ...scw.RequestOption) (*RenewDeviceCertificateResponse, error)
RenewDeviceCertificate: renew a device certificate
func (*API) SetDeviceCertificate ¶
func (s *API) SetDeviceCertificate(req *SetDeviceCertificateRequest, opts ...scw.RequestOption) (*SetDeviceCertificateResponse, error)
SetDeviceCertificate: set a custom certificate on a device
func (*API) SetHubCA ¶
func (s *API) SetHubCA(req *SetHubCARequest, opts ...scw.RequestOption) (*Hub, error)
SetHubCA: set the certificate authority of a hub
func (*API) UpdateDevice ¶
func (s *API) UpdateDevice(req *UpdateDeviceRequest, opts ...scw.RequestOption) (*Device, error)
UpdateDevice: update a device
func (*API) UpdateHub ¶
func (s *API) UpdateHub(req *UpdateHubRequest, opts ...scw.RequestOption) (*Hub, error)
UpdateHub: update a hub
func (*API) UpdateRoute ¶
func (s *API) UpdateRoute(req *UpdateRouteRequest, opts ...scw.RequestOption) (*Route, error)
UpdateRoute: update a route
func (*API) WaitForHub ¶
func (s *API) WaitForHub(req *WaitForHubRequest, opts ...scw.RequestOption) (*Hub, error)
WaitForHub waits for the hub to be in a ready state before returning.
type Certificate ¶
type CreateDeviceRequest ¶
type CreateDeviceRequest struct { Region scw.Region `json:"-"` // Name: device name Name string `json:"name"` // HubID: ID of the device's hub HubID string `json:"hub_id"` // AllowInsecure: allow plain and server-authenticated SSL connections in addition to mutually-authenticated ones AllowInsecure bool `json:"allow_insecure"` // AllowMultipleConnections: allow multiple physical devices to connect with this device's credentials AllowMultipleConnections bool `json:"allow_multiple_connections"` // MessageFilters: filter-sets to authorize or deny the device to publish/subscribe to specific topics MessageFilters *DeviceMessageFilters `json:"message_filters"` // Description: device description Description *string `json:"description"` }
type CreateDeviceResponse ¶
type CreateDeviceResponse struct { // Device: created device information Device *Device `json:"device"` // Certificate: device certificate Certificate *Certificate `json:"certificate"` }
CreateDeviceResponse: create device response
type CreateHubRequest ¶
type CreateHubRequest struct { Region scw.Region `json:"-"` // Name: hub name (up to 255 characters) Name string `json:"name"` // ProjectID: organization/project owning the resource ProjectID string `json:"project_id"` // ProductPlan: hub feature set // // Default value: plan_shared ProductPlan HubProductPlan `json:"product_plan"` // DisableEvents: disable Hub events DisableEvents *bool `json:"disable_events"` // EventsTopicPrefix: hub events topic prefix (default '$SCW/events') EventsTopicPrefix *string `json:"events_topic_prefix"` // TwinsGraphiteConfig: bETA - not implemented yet // Precisely one of TwinsGraphiteConfig must be set. TwinsGraphiteConfig *HubTwinsGraphiteConfig `json:"twins_graphite_config,omitempty"` }
type CreateNetworkRequest ¶
type CreateNetworkRequest struct { Region scw.Region `json:"-"` // Name: network name Name string `json:"name"` // Type: type of network to connect with // // Default value: unknown Type NetworkNetworkType `json:"type"` // HubID: hub ID to connect the Network to HubID string `json:"hub_id"` // TopicPrefix: topic prefix for the Network TopicPrefix string `json:"topic_prefix"` }
type CreateNetworkResponse ¶
type CreateNetworkResponse struct { // Network: created network Network *Network `json:"network"` // Secret: endpoint Key to keep secret. This cannot be retrieved later Secret string `json:"secret"` }
CreateNetworkResponse: create network response
type CreateRouteRequest ¶
type CreateRouteRequest struct { Region scw.Region `json:"-"` // Name: route name Name string `json:"name"` // HubID: ID of the route's hub HubID string `json:"hub_id"` // Topic: topic the route subscribes to. It must be a valid MQTT topic and up to 65535 characters Topic string `json:"topic"` // S3Config: if creating S3 Route, S3-specific configuration fields // Precisely one of DbConfig, RestConfig, S3Config must be set. S3Config *CreateRouteRequestS3Config `json:"s3_config,omitempty"` // DbConfig: if creating Database Route, DB-specific configuration fields // Precisely one of DbConfig, RestConfig, S3Config must be set. DbConfig *CreateRouteRequestDatabaseConfig `json:"db_config,omitempty"` // RestConfig: if creating Rest Route, Rest-specific configuration fields // Precisely one of DbConfig, RestConfig, S3Config must be set. RestConfig *CreateRouteRequestRestConfig `json:"rest_config,omitempty"` }
type CreateRouteRequestDatabaseConfig ¶
type CreateRouteRequestDatabaseConfig struct { Host string `json:"host"` Port uint32 `json:"port"` Dbname string `json:"dbname"` Username string `json:"username"` Password string `json:"password"` Query string `json:"query"` // Engine: // // Default value: unknown Engine RouteDatabaseConfigEngine `json:"engine"` }
type CreateRouteRequestRestConfig ¶
type CreateRouteRequestRestConfig struct { // Verb: // // Default value: unknown Verb RouteRestConfigHTTPVerb `json:"verb"` URI string `json:"uri"` Headers map[string]string `json:"headers"` }
type CreateRouteRequestS3Config ¶
type CreateRouteRequestS3Config struct { BucketRegion string `json:"bucket_region"` BucketName string `json:"bucket_name"` ObjectPrefix string `json:"object_prefix"` // Strategy: // // Default value: unknown Strategy RouteS3ConfigS3Strategy `json:"strategy"` }
type DeleteDeviceRequest ¶
type DeleteHubRequest ¶
type DeleteNetworkRequest ¶
type DeleteRouteRequest ¶
type Device ¶
type Device struct { // ID: device ID, also used as MQTT Client ID or Username ID string `json:"id"` // Name: device name Name string `json:"name"` // Description: device description Description string `json:"description"` // Status: device status // // Default value: unknown Status DeviceStatus `json:"status"` // HubID: hub ID HubID string `json:"hub_id"` // LastActivityAt: device last connection/activity date LastActivityAt *time.Time `json:"last_activity_at"` // IsConnected: whether the device is connected to the Hub or not IsConnected bool `json:"is_connected"` // AllowInsecure: whether to allow device to connect without TLS mutual authentication AllowInsecure bool `json:"allow_insecure"` // AllowMultipleConnections: whether to allow multiple physical devices to connect with this device's credentials AllowMultipleConnections bool `json:"allow_multiple_connections"` // MessageFilters: filter-sets to restrict the topics the device can publish/subscribe to MessageFilters *DeviceMessageFilters `json:"message_filters"` // HasCustomCertificate: whether the device was assigned a custom certificate // // Assigning a custom certificate allows a device to authenticate using that specific certificate without checking the hub's CA certificate. HasCustomCertificate bool `json:"has_custom_certificate"` // CreatedAt: device add date CreatedAt *time.Time `json:"created_at"` // UpdatedAt: device last modification date UpdatedAt *time.Time `json:"updated_at"` }
Device: device
type DeviceMessageFilters ¶
type DeviceMessageFilters struct { // Publish: filtering rule to restrict topics the device can publish to Publish *DeviceMessageFiltersRule `json:"publish"` // Subscribe: filtering rule to restrict topics the device can subscribe to Subscribe *DeviceMessageFiltersRule `json:"subscribe"` }
DeviceMessageFilters: device. message filters
type DeviceMessageFiltersRule ¶
type DeviceMessageFiltersRule struct { // Policy: // // Default value: unknown Policy DeviceMessageFiltersRulePolicy `json:"policy"` Topics *[]string `json:"topics"` }
type DeviceMessageFiltersRulePolicy ¶
type DeviceMessageFiltersRulePolicy string
func (DeviceMessageFiltersRulePolicy) MarshalJSON ¶
func (enum DeviceMessageFiltersRulePolicy) MarshalJSON() ([]byte, error)
func (DeviceMessageFiltersRulePolicy) String ¶
func (enum DeviceMessageFiltersRulePolicy) String() string
func (*DeviceMessageFiltersRulePolicy) UnmarshalJSON ¶
func (enum *DeviceMessageFiltersRulePolicy) UnmarshalJSON(data []byte) error
type DeviceStatus ¶
type DeviceStatus string
func (DeviceStatus) MarshalJSON ¶
func (enum DeviceStatus) MarshalJSON() ([]byte, error)
func (DeviceStatus) String ¶
func (enum DeviceStatus) String() string
func (*DeviceStatus) UnmarshalJSON ¶
func (enum *DeviceStatus) UnmarshalJSON(data []byte) error
type DisableDeviceRequest ¶
type DisableHubRequest ¶
type EnableDeviceRequest ¶
type EnableHubRequest ¶
type GetDeviceCertificateResponse ¶
type GetDeviceCertificateResponse struct { // Device: created device information Device *Device `json:"device"` // CertificatePem: device certificate CertificatePem string `json:"certificate_pem"` }
GetDeviceCertificateResponse: get device certificate response
type GetDeviceMetricsRequest ¶
type GetDeviceMetricsResponse ¶
type GetDeviceMetricsResponse struct { // Metrics: metrics for a device over the requested period Metrics []*scw.TimeSeries `json:"metrics"` }
GetDeviceMetricsResponse: get device metrics response
type GetDeviceRequest ¶
type GetHubCARequest ¶
type GetHubCAResponse ¶
type GetHubCAResponse struct {
CaCertPem string `json:"ca_cert_pem"`
}
type GetHubMetricsRequest ¶
type GetHubMetricsResponse ¶
type GetHubMetricsResponse struct { // Metrics: metrics for a hub over the requested period Metrics []*scw.TimeSeries `json:"metrics"` }
GetHubMetricsResponse: get hub metrics response
type GetHubRequest ¶
type GetNetworkRequest ¶
type GetRouteRequest ¶
type GetServiceInfoRequest ¶
type GetTwinDocumentRequest ¶
type Hub ¶
type Hub struct { // ID: hub ID ID string `json:"id"` // Name: hub name Name string `json:"name"` // Status: current status of the Hub // // Default value: unknown Status HubStatus `json:"status"` // ProductPlan: hub feature set // // Default value: plan_unknown ProductPlan HubProductPlan `json:"product_plan"` // Enabled: whether the hub has been enabled Enabled bool `json:"enabled"` // DeviceCount: number of registered devices DeviceCount uint64 `json:"device_count"` // ConnectedDeviceCount: number of currently connected devices ConnectedDeviceCount uint64 `json:"connected_device_count"` // Endpoint: host to connect your devices to // // Devices should be connected to this host, port may be 1883 (MQTT), 8883 (MQTT over TLS), 80 (MQTT over Websocket) or 443 (MQTT over Websocket over TLS). Endpoint string `json:"endpoint"` // DisableEvents: disable Hub events DisableEvents bool `json:"disable_events"` // EventsTopicPrefix: hub events topic prefix EventsTopicPrefix string `json:"events_topic_prefix"` // Region: region of the Hub Region scw.Region `json:"region"` // CreatedAt: hub creation date CreatedAt *time.Time `json:"created_at"` // UpdatedAt: hub last modification date UpdatedAt *time.Time `json:"updated_at"` // ProjectID: project owning the resource ProjectID string `json:"project_id"` // OrganizationID: organization owning the resource OrganizationID string `json:"organization_id"` // EnableDeviceAutoProvisioning: enable device auto provisioning // // When an unknown device connects to your hub using a valid certificate chain, it will be automatically provisioned inside your hub. The hub uses the common name of the device certifcate to find out if a device with the same name already exists. This setting can only be enabled on a hub with a custom certificate authority. EnableDeviceAutoProvisioning bool `json:"enable_device_auto_provisioning"` // HasCustomCa: whether the hub is using a custom certificate authority // // After creating a hub, this flag is set to False as the hub certificates are managed by Scaleway. Once a custom certificate authority is installed, this flag will be set to true. HasCustomCa bool `json:"has_custom_ca"` // TwinsGraphiteConfig: bETA - not implemented yet // Precisely one of TwinsGraphiteConfig must be set. TwinsGraphiteConfig *HubTwinsGraphiteConfig `json:"twins_graphite_config,omitempty"` }
Hub: hub
type HubProductPlan ¶
type HubProductPlan string
func (HubProductPlan) MarshalJSON ¶
func (enum HubProductPlan) MarshalJSON() ([]byte, error)
func (HubProductPlan) String ¶
func (enum HubProductPlan) String() string
func (*HubProductPlan) UnmarshalJSON ¶
func (enum *HubProductPlan) UnmarshalJSON(data []byte) error
type HubStatus ¶
type HubStatus string
func (HubStatus) MarshalJSON ¶
func (*HubStatus) UnmarshalJSON ¶
type HubTwinsGraphiteConfig ¶
type HubTwinsGraphiteConfig struct {
PushURI string `json:"push_uri"`
}
type ListDevicesRequest ¶
type ListDevicesRequest struct { Region scw.Region `json:"-"` // Page: page number Page *int32 `json:"-"` // PageSize: page size. The maximum value is 100 PageSize *uint32 `json:"-"` // OrderBy: ordering of requested devices // // Default value: name_asc OrderBy ListDevicesRequestOrderBy `json:"-"` // Name: filter on the name Name *string `json:"-"` // HubID: filter on the hub HubID *string `json:"-"` // AllowInsecure: filter on the allow_insecure flag AllowInsecure *bool `json:"-"` // Status: device status (enabled, disabled, etc.) // // Default value: unknown Status DeviceStatus `json:"-"` }
type ListDevicesRequestOrderBy ¶
type ListDevicesRequestOrderBy string
func (ListDevicesRequestOrderBy) MarshalJSON ¶
func (enum ListDevicesRequestOrderBy) MarshalJSON() ([]byte, error)
func (ListDevicesRequestOrderBy) String ¶
func (enum ListDevicesRequestOrderBy) String() string
func (*ListDevicesRequestOrderBy) UnmarshalJSON ¶
func (enum *ListDevicesRequestOrderBy) UnmarshalJSON(data []byte) error
type ListDevicesResponse ¶
type ListDevicesResponse struct { // TotalCount: total number of devices TotalCount uint32 `json:"total_count"` // Devices: a page of devices Devices []*Device `json:"devices"` }
ListDevicesResponse: list devices response
func (*ListDevicesResponse) UnsafeAppend ¶
func (r *ListDevicesResponse) UnsafeAppend(res interface{}) (uint32, error)
UnsafeAppend should not be used Internal usage only
func (*ListDevicesResponse) UnsafeGetTotalCount ¶
func (r *ListDevicesResponse) UnsafeGetTotalCount() uint32
UnsafeGetTotalCount should not be used Internal usage only
type ListHubsRequest ¶
type ListHubsRequest struct { Region scw.Region `json:"-"` // Page: page number Page *int32 `json:"-"` // PageSize: page size. The maximum value is 100 PageSize *uint32 `json:"-"` // OrderBy: ordering of requested hub // // Default value: name_asc OrderBy ListHubsRequestOrderBy `json:"-"` // ProjectID: filter on project ProjectID *string `json:"-"` // OrganizationID: filter on the organization OrganizationID *string `json:"-"` // Name: filter on the name Name *string `json:"-"` }
type ListHubsRequestOrderBy ¶
type ListHubsRequestOrderBy string
func (ListHubsRequestOrderBy) MarshalJSON ¶
func (enum ListHubsRequestOrderBy) MarshalJSON() ([]byte, error)
func (ListHubsRequestOrderBy) String ¶
func (enum ListHubsRequestOrderBy) String() string
func (*ListHubsRequestOrderBy) UnmarshalJSON ¶
func (enum *ListHubsRequestOrderBy) UnmarshalJSON(data []byte) error
type ListHubsResponse ¶
type ListHubsResponse struct { // TotalCount: total number of hubs TotalCount uint32 `json:"total_count"` // Hubs: a page of hubs Hubs []*Hub `json:"hubs"` }
ListHubsResponse: list hubs response
func (*ListHubsResponse) UnsafeAppend ¶
func (r *ListHubsResponse) UnsafeAppend(res interface{}) (uint32, error)
UnsafeAppend should not be used Internal usage only
func (*ListHubsResponse) UnsafeGetTotalCount ¶
func (r *ListHubsResponse) UnsafeGetTotalCount() uint32
UnsafeGetTotalCount should not be used Internal usage only
type ListNetworksRequest ¶
type ListNetworksRequest struct { Region scw.Region `json:"-"` // Page: page number Page *int32 `json:"-"` // PageSize: page size. The maximum value is 100 PageSize *uint32 `json:"-"` // OrderBy: ordering of requested routes // // Default value: name_asc OrderBy ListNetworksRequestOrderBy `json:"-"` // Name: filter on Network name Name *string `json:"-"` // HubID: filter on the hub HubID *string `json:"-"` // TopicPrefix: filter on the topic prefix TopicPrefix *string `json:"-"` }
type ListNetworksRequestOrderBy ¶
type ListNetworksRequestOrderBy string
func (ListNetworksRequestOrderBy) MarshalJSON ¶
func (enum ListNetworksRequestOrderBy) MarshalJSON() ([]byte, error)
func (ListNetworksRequestOrderBy) String ¶
func (enum ListNetworksRequestOrderBy) String() string
func (*ListNetworksRequestOrderBy) UnmarshalJSON ¶
func (enum *ListNetworksRequestOrderBy) UnmarshalJSON(data []byte) error
type ListNetworksResponse ¶
type ListNetworksResponse struct { // TotalCount: total number of Networks TotalCount uint32 `json:"total_count"` // Networks: a page of networks Networks []*Network `json:"networks"` }
ListNetworksResponse: list networks response
func (*ListNetworksResponse) UnsafeAppend ¶
func (r *ListNetworksResponse) UnsafeAppend(res interface{}) (uint32, error)
UnsafeAppend should not be used Internal usage only
func (*ListNetworksResponse) UnsafeGetTotalCount ¶
func (r *ListNetworksResponse) UnsafeGetTotalCount() uint32
UnsafeGetTotalCount should not be used Internal usage only
type ListRoutesRequest ¶
type ListRoutesRequest struct { Region scw.Region `json:"-"` // Page: page number Page *int32 `json:"-"` // PageSize: page size. The maximum value is 100 PageSize *uint32 `json:"-"` // OrderBy: ordering of requested routes // // Default value: name_asc OrderBy ListRoutesRequestOrderBy `json:"-"` // HubID: filter on the hub HubID *string `json:"-"` // Name: filter on route's name Name *string `json:"-"` }
type ListRoutesRequestOrderBy ¶
type ListRoutesRequestOrderBy string
func (ListRoutesRequestOrderBy) MarshalJSON ¶
func (enum ListRoutesRequestOrderBy) MarshalJSON() ([]byte, error)
func (ListRoutesRequestOrderBy) String ¶
func (enum ListRoutesRequestOrderBy) String() string
func (*ListRoutesRequestOrderBy) UnmarshalJSON ¶
func (enum *ListRoutesRequestOrderBy) UnmarshalJSON(data []byte) error
type ListRoutesResponse ¶
type ListRoutesResponse struct { // TotalCount: total number of routes TotalCount uint32 `json:"total_count"` // Routes: a page of routes Routes []*RouteSummary `json:"routes"` }
ListRoutesResponse: list routes response
func (*ListRoutesResponse) UnsafeAppend ¶
func (r *ListRoutesResponse) UnsafeAppend(res interface{}) (uint32, error)
UnsafeAppend should not be used Internal usage only
func (*ListRoutesResponse) UnsafeGetTotalCount ¶
func (r *ListRoutesResponse) UnsafeGetTotalCount() uint32
UnsafeGetTotalCount should not be used Internal usage only
type ListTwinDocumentsResponse ¶
type ListTwinDocumentsResponse struct { // Documents: twin's document list Documents []*ListTwinDocumentsResponseDocumentSummary `json:"documents"` }
ListTwinDocumentsResponse: list twin documents response
type ListTwinDocumentsResponseDocumentSummary ¶
type ListTwinDocumentsResponseDocumentSummary struct { // DocumentName: document's name DocumentName string `json:"document_name"` }
ListTwinDocumentsResponseDocumentSummary: list twin documents response. document summary
type Network ¶
type Network struct { // ID: network ID ID string `json:"id"` // Name: network name Name string `json:"name"` // Type: type of network to connect with // // Default value: unknown Type NetworkNetworkType `json:"type"` // Endpoint: endpoint to use for interacting with the network Endpoint string `json:"endpoint"` // HubID: hub ID to connect the Network to HubID string `json:"hub_id"` // CreatedAt: network creation date CreatedAt *time.Time `json:"created_at"` // TopicPrefix: topic prefix for the Network // // This prefix will be prepended to all topics for this Network. TopicPrefix string `json:"topic_prefix"` }
Network: network
type NetworkNetworkType ¶
type NetworkNetworkType string
func (NetworkNetworkType) MarshalJSON ¶
func (enum NetworkNetworkType) MarshalJSON() ([]byte, error)
func (NetworkNetworkType) String ¶
func (enum NetworkNetworkType) String() string
func (*NetworkNetworkType) UnmarshalJSON ¶
func (enum *NetworkNetworkType) UnmarshalJSON(data []byte) error
type NullValue ¶
type NullValue string
func (NullValue) MarshalJSON ¶
func (*NullValue) UnmarshalJSON ¶
type PatchTwinDocumentRequest ¶
type PatchTwinDocumentRequest struct { Region scw.Region `json:"-"` // TwinID: twin ID TwinID string `json:"-"` // DocumentName: document name DocumentName string `json:"-"` // Version: the version of the document to update // // If set, ensures that the document's current version matches before persisting the update. Version *uint32 `json:"version"` // Data: patch data // // A json data that will be applied on the document's current data. // Patching rules: // * The patch goes recursively through the patch objects. // * If the patch object property is null, then it is removed from the final object. // * If the patch object property is a value (number, strings, bool, arrays), it is replaced. // * If the patch object property is an object, the previous rules will be applied recursively on it. // Data []byte `json:"data"` }
type PutTwinDocumentRequest ¶
type PutTwinDocumentRequest struct { Region scw.Region `json:"-"` // TwinID: twin ID TwinID string `json:"-"` // DocumentName: document name DocumentName string `json:"-"` // Version: the version of the document to update // // If set, ensures that the document's current version matches before persisting the update. Version *uint32 `json:"version"` // Data: new document data // // The new data that will replace the contents of the document. Data []byte `json:"data"` }
type RenewDeviceCertificateResponse ¶
type RenewDeviceCertificateResponse struct { // Device: created device information Device *Device `json:"device"` // Certificate: device certificate Certificate *Certificate `json:"certificate"` }
RenewDeviceCertificateResponse: renew device certificate response
type Route ¶
type Route struct { // ID: route ID ID string `json:"id"` // Name: route name Name string `json:"name"` // HubID: ID of the route's hub HubID string `json:"hub_id"` // Topic: topic the route subscribes to. It must be a valid MQTT topic and up to 65535 characters Topic string `json:"topic"` // Type: route type // // Default value: unknown Type RouteRouteType `json:"type"` // CreatedAt: route creation date CreatedAt *time.Time `json:"created_at"` // S3Config: when using S3 Route, S3-specific configuration fields // Precisely one of DbConfig, RestConfig, S3Config must be set. S3Config *RouteS3Config `json:"s3_config,omitempty"` // DbConfig: when using Database Route, DB-specific configuration fields // Precisely one of DbConfig, RestConfig, S3Config must be set. DbConfig *RouteDatabaseConfig `json:"db_config,omitempty"` // RestConfig: when using Rest Route, Rest-specific configuration fields // Precisely one of DbConfig, RestConfig, S3Config must be set. RestConfig *RouteRestConfig `json:"rest_config,omitempty"` // UpdatedAt: route last update date UpdatedAt *time.Time `json:"updated_at"` }
Route: route
type RouteDatabaseConfig ¶
type RouteDatabaseConfig struct { // Engine: database engine the route will connect to. If not specified, will default to 'PostgreSQL' // // Default value: unknown Engine RouteDatabaseConfigEngine `json:"engine"` // Host: database host Host string `json:"host"` // Port: database port Port uint32 `json:"port"` // Dbname: database name Dbname string `json:"dbname"` // Username: database username. Make sure this account can execute the provided query Username string `json:"username"` // Password: database password Password string `json:"password"` // Query: SQL query to be executed ($TOPIC and $PAYLOAD variables are available, see documentation) Query string `json:"query"` }
RouteDatabaseConfig: route. database config
type RouteDatabaseConfigEngine ¶
type RouteDatabaseConfigEngine string
func (RouteDatabaseConfigEngine) MarshalJSON ¶
func (enum RouteDatabaseConfigEngine) MarshalJSON() ([]byte, error)
func (RouteDatabaseConfigEngine) String ¶
func (enum RouteDatabaseConfigEngine) String() string
func (*RouteDatabaseConfigEngine) UnmarshalJSON ¶
func (enum *RouteDatabaseConfigEngine) UnmarshalJSON(data []byte) error
type RouteRestConfig ¶
type RouteRestConfig struct { // Verb: HTTP Verb used to call REST URI // // Default value: unknown Verb RouteRestConfigHTTPVerb `json:"verb"` // URI: URI of the REST endpoint URI string `json:"uri"` // Headers: HTTP call extra headers Headers map[string]string `json:"headers"` }
RouteRestConfig: route. rest config
type RouteRestConfigHTTPVerb ¶
type RouteRestConfigHTTPVerb string
func (RouteRestConfigHTTPVerb) MarshalJSON ¶
func (enum RouteRestConfigHTTPVerb) MarshalJSON() ([]byte, error)
func (RouteRestConfigHTTPVerb) String ¶
func (enum RouteRestConfigHTTPVerb) String() string
func (*RouteRestConfigHTTPVerb) UnmarshalJSON ¶
func (enum *RouteRestConfigHTTPVerb) UnmarshalJSON(data []byte) error
type RouteRouteType ¶
type RouteRouteType string
func (RouteRouteType) MarshalJSON ¶
func (enum RouteRouteType) MarshalJSON() ([]byte, error)
func (RouteRouteType) String ¶
func (enum RouteRouteType) String() string
func (*RouteRouteType) UnmarshalJSON ¶
func (enum *RouteRouteType) UnmarshalJSON(data []byte) error
type RouteS3Config ¶
type RouteS3Config struct { // BucketRegion: region of the S3 route's destination bucket (eg 'fr-par') BucketRegion string `json:"bucket_region"` // BucketName: name of the S3 route's destination bucket BucketName string `json:"bucket_name"` // ObjectPrefix: optional string to prefix object names with ObjectPrefix string `json:"object_prefix"` // Strategy: how the S3 route's objects will be created: one per topic or one per message // // Default value: unknown Strategy RouteS3ConfigS3Strategy `json:"strategy"` }
RouteS3Config: route.s3 config
type RouteS3ConfigS3Strategy ¶
type RouteS3ConfigS3Strategy string
func (RouteS3ConfigS3Strategy) MarshalJSON ¶
func (enum RouteS3ConfigS3Strategy) MarshalJSON() ([]byte, error)
func (RouteS3ConfigS3Strategy) String ¶
func (enum RouteS3ConfigS3Strategy) String() string
func (*RouteS3ConfigS3Strategy) UnmarshalJSON ¶
func (enum *RouteS3ConfigS3Strategy) UnmarshalJSON(data []byte) error
type RouteSummary ¶
type RouteSummary struct { // ID: route ID ID string `json:"id"` // Name: route name Name string `json:"name"` // HubID: ID of the route's hub HubID string `json:"hub_id"` // Topic: topic the route subscribes to. It must be a valid MQTT topic and up to 65535 characters Topic string `json:"topic"` // Type: route type // // Default value: unknown Type RouteRouteType `json:"type"` // CreatedAt: route creation date CreatedAt *time.Time `json:"created_at"` // UpdatedAt: route last update date UpdatedAt *time.Time `json:"updated_at"` }
RouteSummary: route summary
type SetHubCARequest ¶
type SetHubCARequest struct { Region scw.Region `json:"-"` // HubID: hub ID HubID string `json:"-"` // CaCertPem: the CA's PEM-encoded certificate CaCertPem string `json:"ca_cert_pem"` // ChallengeCertPem: proof of possession PEM-encoded certificate // // The challenge is a PEM-encoded certificate to prove the possession of the CA. It must be signed by the CA, and have a Common Name equal to the Hub ID. ChallengeCertPem string `json:"challenge_cert_pem"` }
type TwinDocument ¶
type TwinDocument struct { // TwinID: document's parent twin ID TwinID string `json:"twin_id"` // DocumentName: document's name DocumentName string `json:"document_name"` // Version: document's new version Version uint32 `json:"version"` // Data: document's new data Data []byte `json:"data"` }
TwinDocument: twin document
type UpdateDeviceRequest ¶
type UpdateDeviceRequest struct { Region scw.Region `json:"-"` // DeviceID: device ID DeviceID string `json:"-"` // Description: device description Description *string `json:"description"` // AllowInsecure: allow plain and server-authenticated SSL connections in addition to mutually-authenticated ones AllowInsecure *bool `json:"allow_insecure"` // AllowMultipleConnections: allow multiple physical devices to connect with this device's credentials AllowMultipleConnections *bool `json:"allow_multiple_connections"` // MessageFilters: filter-sets to restrict the topics the device can publish/subscribe to MessageFilters *DeviceMessageFilters `json:"message_filters"` // HubID: change Hub for this device, additional fees may apply, see IoT Hub pricing HubID *string `json:"hub_id"` }
type UpdateHubRequest ¶
type UpdateHubRequest struct { Region scw.Region `json:"-"` // HubID: hub ID HubID string `json:"-"` // Name: hub name (up to 255 characters) Name *string `json:"name"` // ProductPlan: hub feature set // // Default value: plan_unknown ProductPlan HubProductPlan `json:"product_plan"` // DisableEvents: disable Hub events DisableEvents *bool `json:"disable_events"` // EventsTopicPrefix: hub events topic prefix EventsTopicPrefix *string `json:"events_topic_prefix"` // EnableDeviceAutoProvisioning: enable device auto provisioning EnableDeviceAutoProvisioning *bool `json:"enable_device_auto_provisioning"` // TwinsGraphiteConfig: bETA - not implemented yet // Precisely one of TwinsGraphiteConfig must be set. TwinsGraphiteConfig *HubTwinsGraphiteConfig `json:"twins_graphite_config,omitempty"` }
type UpdateRouteRequest ¶
type UpdateRouteRequest struct { Region scw.Region `json:"-"` // RouteID: route id RouteID string `json:"-"` // Name: route name Name *string `json:"name"` // Topic: topic the route subscribes to. It must be a valid MQTT topic and up to 65535 characters Topic *string `json:"topic"` // S3Config: when updating S3 Route, S3-specific configuration fields // Precisely one of DbConfig, RestConfig, S3Config must be set. S3Config *UpdateRouteRequestS3Config `json:"s3_config,omitempty"` // DbConfig: when updating Database Route, DB-specific configuration fields // Precisely one of DbConfig, RestConfig, S3Config must be set. DbConfig *UpdateRouteRequestDatabaseConfig `json:"db_config,omitempty"` // RestConfig: when updating Rest Route, Rest-specific configuration fields // Precisely one of DbConfig, RestConfig, S3Config must be set. RestConfig *UpdateRouteRequestRestConfig `json:"rest_config,omitempty"` }
type UpdateRouteRequestDatabaseConfig ¶
type UpdateRouteRequestDatabaseConfig struct { Host *string `json:"host"` Port *uint32 `json:"port"` Dbname *string `json:"dbname"` Username *string `json:"username"` Password *string `json:"password"` Query *string `json:"query"` // Engine: // // Default value: unknown Engine RouteDatabaseConfigEngine `json:"engine"` }
type UpdateRouteRequestRestConfig ¶
type UpdateRouteRequestRestConfig struct { // Verb: // // Default value: unknown Verb RouteRestConfigHTTPVerb `json:"verb"` URI *string `json:"uri"` Headers *map[string]string `json:"headers"` }
type UpdateRouteRequestS3Config ¶
type UpdateRouteRequestS3Config struct { BucketRegion *string `json:"bucket_region"` BucketName *string `json:"bucket_name"` ObjectPrefix *string `json:"object_prefix"` // Strategy: // // Default value: unknown Strategy RouteS3ConfigS3Strategy `json:"strategy"` }