Documentation ¶
Overview ¶
Copyright © 2020 Randy Ridgley randy.ridgley@gmail.com
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrInvalidResponse = errors.New("invalid response from AWS IoT")
ErrInvalidResponse is returned if failed to parse response from AWS IoT.
Functions ¶
This section is empty.
Types ¶
type Parameters ¶
type Provisioner ¶
type Provisioner struct { Channels Channels KeysAndCertificateResponse struct { CertificateId string `json:"certificateId"` CertificatePem string `json:"certificatePem"` PrivateKey string `json:"privateKey"` CertificateOwnershipToken string `json:"certificateOwnershipToken"` } RegisterThingResponse struct { ThingName string `json:"thingName"` DeviceConfiguration string `json:"deviceConfiguration"` } Connection connect.Connection // contains filtered or unexported fields }
func New ¶
func New(tx context.Context, thing device.Thing, bootstrapKeypair connect.KeyPair) (*Provisioner, error)
New - Function to create a new Provisioner
func (*Provisioner) Disconnect ¶
func (p *Provisioner) Disconnect(ctx context.Context)
func (*Provisioner) Provision ¶
func (p *Provisioner) Provision(ctx context.Context)
func (*Provisioner) PublishThingRequest ¶
func (p *Provisioner) PublishThingRequest()
func (*Provisioner) RegisterThing ¶
func (p *Provisioner) RegisterThing(ctx context.Context)
type RegisterThingRequest ¶
type RegisterThingRequest struct { CertificateOwnershipToken string `json:"certificateOwnershipToken"` Parameters Parameters `json:"parameters"` }
func NewRegisterThingRequest ¶
func NewRegisterThingRequest(p *Provisioner) *RegisterThingRequest
Click to show internal directories.
Click to hide internal directories.