Documentation ¶
Index ¶
- Constants
- Variables
- func NewSecureClient() (*local.Client, error)
- func ReadCommandOptions(opts Options.Options)
- func WriteCertOut(filename string, cert []byte) error
- func WritePrivateKey(filename string, priv *ecdsa.PrivateKey) error
- type OCFClient
- func (c *OCFClient) Close() error
- func (c *OCFClient) Discover(discoveryTimeout time.Duration) (string, error)
- func (c *OCFClient) DisownDevice(deviceID string) error
- func (c *OCFClient) GetResource(deviceID, href string) (string, error)
- func (c *OCFClient) GetResources(deviceID string) (string, error)
- func (c *OCFClient) Initialize() error
- func (c *OCFClient) OwnDevice(deviceID string) (string, error)
- func (c *OCFClient) UpdateResource(deviceID string, href string, data interface{}) error
- type SetupSecureClient
Constants ¶
View Source
const Timeout = time.Second * 10
Variables ¶
View Source
var ( CertIdentity = "00000000-0000-0000-0000-000000000001" MfgCert = []byte{} MfgKey = []byte{} MfgTrustedCA = []byte{} MfgTrustedCAKey = []byte{} IdentityTrustedCA = []byte{} IdentityTrustedCAKey = []byte{} IdentityIntermediateCA = []byte{} IdentityIntermediateCAKey = []byte{} IdentityCert = []byte{} IdentityKey = []byte{} )
Functions ¶
func NewSecureClient ¶
func ReadCommandOptions ¶
func WriteCertOut ¶
func WritePrivateKey ¶
func WritePrivateKey(filename string, priv *ecdsa.PrivateKey) error
Types ¶
type OCFClient ¶
type OCFClient struct {
// contains filtered or unexported fields
}
OCFClient is an OCF Client for working with devices
func (*OCFClient) DisownDevice ¶
DisownDevice removes the current ownership
func (*OCFClient) GetResource ¶
GetResource returns info of the resource at the given href of the device
func (*OCFClient) GetResources ¶
GetResources returns all resources info of the device
func (*OCFClient) Initialize ¶
Initialize creates and initializes new local client
type SetupSecureClient ¶
type SetupSecureClient struct {
// contains filtered or unexported fields
}
func (*SetupSecureClient) GetManufacturerCertificate ¶
func (c *SetupSecureClient) GetManufacturerCertificate() (tls.Certificate, error)
func (*SetupSecureClient) GetManufacturerCertificateAuthorities ¶
func (c *SetupSecureClient) GetManufacturerCertificateAuthorities() ([]*x509.Certificate, error)
func (*SetupSecureClient) GetRootCertificateAuthorities ¶
func (c *SetupSecureClient) GetRootCertificateAuthorities() ([]*x509.Certificate, error)
Click to show internal directories.
Click to hide internal directories.