@@ -16,15 +16,15 @@ import (
1616)
1717
1818type (
19- // OCFClient for working with devices
20- OCFClient struct {
19+ // Ocfclient for working with devices
20+ Ocfclient struct {
2121 localClient * local.Client
2222 // add fields here
2323 }
2424)
2525
2626// Initialize creates and initializes new local client
27- func (c * OCFClient ) Initialize () error {
27+ func (c * Ocfclient ) Initialize () error {
2828 appCallback , err := app .NewApp (& app.AppConfig {
2929 RootCA : lets ,
3030 Manufacturer : & app.ManufacturerCerts {
@@ -63,7 +63,7 @@ func (c *OCFClient) Initialize() error {
6363}
6464
6565// Discover devices in the local area
66- func (c * OCFClient ) Discover () (string , error ) {
66+ func (c * Ocfclient ) Discover () (string , error ) {
6767 ctx , cancel := context .WithTimeout (context .Background (), 5 * time .Second )
6868 defer cancel ()
6969 res , err := c .localClient .GetDevices (ctx , local .WithGetDetails (getCloudConfiguration ))
@@ -106,7 +106,7 @@ func getCloudConfiguration(ctx context.Context, device *core.Device, links schem
106106}
107107
108108// OwnDevice transfers the ownersip of the device to user represented by the token
109- func (c * OCFClient ) OwnDevice (deviceID , token string ) error {
109+ func (c * Ocfclient ) OwnDevice (deviceID , token string ) error {
110110 ctx , cancel := context .WithTimeout (context .Background (), 10 * time .Second )
111111 defer cancel ()
112112 ctx = kitGrpc .CtxWithToken (ctx , token )
@@ -119,7 +119,7 @@ func (c *OCFClient) OwnDevice(deviceID, token string) error {
119119}
120120
121121// OnboardDevice registers the device to the Go-OCF Cloud
122- func (c * OCFClient ) OnboardDevice (deviceID , authorizationProvider , cloudURL , authCode , cloudID string ) error {
122+ func (c * Ocfclient ) OnboardDevice (deviceID , authorizationProvider , cloudURL , authCode , cloudID string ) error {
123123 ctx , cancel := context .WithTimeout (context .Background (), 20 * time .Second )
124124 defer cancel ()
125125 err := c .localClient .OnboardDevice (ctx , deviceID , authorizationProvider , cloudURL , authCode , cloudID )
@@ -131,7 +131,7 @@ func (c *OCFClient) OnboardDevice(deviceID, authorizationProvider, cloudURL, aut
131131}
132132
133133// OffboardDevice deregisters the device from the cloud where it's connected to
134- func (c * OCFClient ) OffboardDevice (deviceID string ) error {
134+ func (c * Ocfclient ) OffboardDevice (deviceID string ) error {
135135 ctx , cancel := context .WithTimeout (context .Background (), 20 * time .Second )
136136 defer cancel ()
137137 err := c .localClient .OffboardDevice (ctx , deviceID )
@@ -143,7 +143,7 @@ func (c *OCFClient) OffboardDevice(deviceID string) error {
143143}
144144
145145// DisownDevice removes the current ownership
146- func (c * OCFClient ) DisownDevice (deviceID string ) error {
146+ func (c * Ocfclient ) DisownDevice (deviceID string ) error {
147147 ctx , cancel := context .WithTimeout (context .Background (), 20 * time .Second )
148148 defer cancel ()
149149 err := c .localClient .DisownDevice (ctx , deviceID )
0 commit comments