Documentation ¶
Index ¶
- type Device
- type Server
- func (s *Server) AssignOwnerDevices(ctx context.Context, request *registrypb.OwnershipRequestDevices) (response *registrypb.OwnershipResponseDevices, err error)
- func (s *Server) AssignOwnerDevicesQ(ctx context.Context, request *registrypb.OwnershipRequestDevices) (err error)
- func (s *Server) Create(ctx context.Context, request *registrypb.CreateRequest) (*registrypb.CreateResponse, error)
- func (s *Server) CreateQ(ctx context.Context, request *registrypb.CreateRequest) (*registrypb.CreateResponse, error)
- func (s *Server) Delete(ctx context.Context, request *registrypb.DeleteRequest) (response *registrypb.DeleteResponse, err error)
- func (s *Server) DeleteQ(ctx context.Context, request *registrypb.DeleteRequest) (response *registrypb.DeleteResponse, err error)
- func (s *Server) Get(ctx context.Context, request *registrypb.GetRequest) (response *registrypb.GetResponse, err error)
- func (s *Server) GetByFingerprint(ctx context.Context, request *registrypb.GetByFingerprintRequest) (*registrypb.GetByFingerprintResponse, error)
- func (s *Server) GetByFingerprintQ(ctx context.Context, request *registrypb.GetByFingerprintRequest) (*registrypb.GetByFingerprintResponse, error)
- func (s *Server) GetDeviceStatus(ctx context.Context, request *registrypb.GetDeviceStatusRequest) (response *registrypb.GetDeviceStatusResponse, err error)
- func (s *Server) GetQ(ctx context.Context, request *registrypb.GetRequest, accesstocert bool) (response *registrypb.GetResponse, err error)
- func (s *Server) List(ctx context.Context, request *registrypb.ListDevicesRequest) (response *registrypb.ListResponse, err error)
- func (s *Server) ListForAccountQ(ctx context.Context, request *registrypb.ListDevicesRequest) (response *registrypb.ListResponse, err error)
- func (s *Server) ListQ(ctx context.Context, request *registrypb.ListDevicesRequest) (response *registrypb.ListResponse, err error)
- func (s *Server) RemoveOwnerDevices(ctx context.Context, request *registrypb.OwnershipRequestDevices) (response *registrypb.OwnershipResponseDevices, err error)
- func (s *Server) RemoveOwnerDevicesQ(ctx context.Context, request *registrypb.OwnershipRequestDevices) (err error)
- func (s *Server) Update(ctx context.Context, request *registrypb.UpdateRequest) (response *registrypb.UpdateResponse, err error)
- func (s *Server) UpdateQ(ctx context.Context, request *registrypb.UpdateRequest) (response *registrypb.UpdateResponse, err error)
- type X509Cert
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Device ¶
type Device struct { dgraph.Object Tags []string `json:"tags,omitempty"` Enabled bool `json:"enabled"` BasicEnabled bool `json:"basic_enabled"` Certificates []*X509Cert `json:"certificates,omitempty"` }
Device data struct with Certificates data strcuture as slice
type Server ¶
type Server struct { registrypb.UnimplementedDevicesServer Log *zap.Logger // contains filtered or unexported fields }
Server is a Data type for Device Controller file
func (*Server) AssignOwnerDevices ¶
func (s *Server) AssignOwnerDevices(ctx context.Context, request *registrypb.OwnershipRequestDevices) (response *registrypb.OwnershipResponseDevices, err error)
AssignOwnerDevices is a method that adds the owner from namespace
func (*Server) AssignOwnerDevicesQ ¶
func (s *Server) AssignOwnerDevicesQ(ctx context.Context, request *registrypb.OwnershipRequestDevices) (err error)
AssignOwnerDevicesQ is a method to delete the Account
func (*Server) Create ¶
func (s *Server) Create(ctx context.Context, request *registrypb.CreateRequest) (*registrypb.CreateResponse, error)
Create is a method for creating Devices
func (*Server) CreateQ ¶
func (s *Server) CreateQ(ctx context.Context, request *registrypb.CreateRequest) (*registrypb.CreateResponse, error)
CreateQ is a method to execute Dgraph Query to Create a new Device
func (*Server) Delete ¶
func (s *Server) Delete(ctx context.Context, request *registrypb.DeleteRequest) (response *registrypb.DeleteResponse, err error)
Delete is a method that deletes a Device
func (*Server) DeleteQ ¶
func (s *Server) DeleteQ(ctx context.Context, request *registrypb.DeleteRequest) (response *registrypb.DeleteResponse, err error)
DeleteQ is a method to execute Dgraph Query to delete Devices
func (*Server) Get ¶
func (s *Server) Get(ctx context.Context, request *registrypb.GetRequest) (response *registrypb.GetResponse, err error)
Get is a method for get details for a Device
func (*Server) GetByFingerprint ¶
func (s *Server) GetByFingerprint(ctx context.Context, request *registrypb.GetByFingerprintRequest) (*registrypb.GetByFingerprintResponse, error)
GetByFingerprint is a method for get FringerPrint for a Device
func (*Server) GetByFingerprintQ ¶
func (s *Server) GetByFingerprintQ(ctx context.Context, request *registrypb.GetByFingerprintRequest) (*registrypb.GetByFingerprintResponse, error)
GetByFingerprintQ is a method to execute Dgraph Query to Get Fringerprint of a specific Device
func (*Server) GetDeviceStatus ¶
func (s *Server) GetDeviceStatus(ctx context.Context, request *registrypb.GetDeviceStatusRequest) (response *registrypb.GetDeviceStatusResponse, err error)
return device status from repo
func (*Server) GetQ ¶
func (s *Server) GetQ(ctx context.Context, request *registrypb.GetRequest, accesstocert bool) (response *registrypb.GetResponse, err error)
GetQ is a method to execute Dgraph Query to Get details of a specific Device
func (*Server) List ¶
func (s *Server) List(ctx context.Context, request *registrypb.ListDevicesRequest) (response *registrypb.ListResponse, err error)
List is a method that list all Devices for a specific Namespace
func (*Server) ListForAccountQ ¶
func (s *Server) ListForAccountQ(ctx context.Context, request *registrypb.ListDevicesRequest) (response *registrypb.ListResponse, err error)
ListForAccountQ is a method to execute Dgraph Query to List details of all Devices
func (*Server) ListQ ¶
func (s *Server) ListQ(ctx context.Context, request *registrypb.ListDevicesRequest) (response *registrypb.ListResponse, err error)
ListQ is a method to execute Dgraph Query to List details of all Devices
func (*Server) RemoveOwnerDevices ¶
func (s *Server) RemoveOwnerDevices(ctx context.Context, request *registrypb.OwnershipRequestDevices) (response *registrypb.OwnershipResponseDevices, err error)
RemoveOwnerDevices is a method that removes the owner from namespace
func (*Server) RemoveOwnerDevicesQ ¶
func (s *Server) RemoveOwnerDevicesQ(ctx context.Context, request *registrypb.OwnershipRequestDevices) (err error)
RemoveOwnerDevicesQ is a method to delete the Account.
func (*Server) Update ¶
func (s *Server) Update(ctx context.Context, request *registrypb.UpdateRequest) (response *registrypb.UpdateResponse, err error)
Update is a method for updating Devices details
func (*Server) UpdateQ ¶
func (s *Server) UpdateQ(ctx context.Context, request *registrypb.UpdateRequest) (response *registrypb.UpdateResponse, err error)
UpdateQ is a method to execute Dgraph Query to Update a specific Device
type X509Cert ¶
type X509Cert struct { dgraph.Node PemData string `json:"pem_data,omitempty"` Algorithm string `json:"algorithm,omitempty"` Fingerprint []byte `json:"fingerprint,omitempty"` FingerprintAlgorithm string `json:"fingerprint.algorithm,omitempty"` }
X509Cert is Certificate data struct which is refered in Device data strcuture