registry

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 5, 2020 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

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"`

	Certificates []*X509Cert `json:"certificates,omitempty"`
}

Device data struct with Certificates data strcuture as slice

type Server

type Server struct {
	Log *zap.Logger
	// contains filtered or unexported fields
}

Server is a Data type for Device Controller file

func NewServer

func NewServer(dg *dgo.Dgraph, rep1 repo.Server) *Server

NewServer is a method to create the Dgraph Server for Device registry

func (*Server) AssignOwnerDevices added in v1.0.0

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 added in v1.0.0

func (s *Server) AssignOwnerDevicesQ(ctx context.Context, request *registrypb.OwnershipRequestDevices) (err error)

AssignOwnerDevicesQ is a method to delete the Account

func (*Server) Create

Create is a method for creating Devices

func (*Server) CreateQ added in v1.0.0

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 added in v1.0.0

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

GetByFingerprint is a method for get FringerPrint for a Device

func (*Server) GetByFingerprintQ added in v1.0.0

GetByFingerprintQ is a method to execute Dgraph Query to Get Fringerprint of a specific Device

func (*Server) GetDeviceStatus added in v1.0.0

func (s *Server) GetDeviceStatus(ctx context.Context, request *registrypb.GetDeviceStatusRequest) (response *registrypb.GetDeviceStatusResponse, err error)

return device status from repo

func (*Server) GetQ added in v1.0.0

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 added in v1.0.0

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 added in v1.0.0

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 added in v1.0.0

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 added in v1.0.0

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 added in v1.0.0

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL