pb

package
v2.15.0 Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2023 License: Apache-2.0 Imports: 35 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckGetEventsResponse

func CheckGetEventsResponse(t *testing.T, got []*pb.GetEventsResponse)

func CleanResourceDeleted

func CleanResourceDeleted(e *events.ResourceDeleted, resetCorrelationID bool) *events.ResourceDeleted

func CleanUpDeviceMetadataUpdatePending

func CleanUpDeviceMetadataUpdatePending(e *events.DeviceMetadataUpdatePending, resetCorrelationID bool) *events.DeviceMetadataUpdatePending

func CleanUpDeviceMetadataUpdated

func CleanUpDeviceMetadataUpdated(e *events.DeviceMetadataUpdated, resetCorrelationID bool) *events.DeviceMetadataUpdated

func CleanUpDeviceRegistered added in v2.4.0

func CleanUpDeviceRegistered(deviceRegistered *pb.Event_DeviceRegistered)

func CleanUpDeviceUnregistered added in v2.4.0

func CleanUpDeviceUnregistered(deviceUnregistered *pb.Event_DeviceUnregistered)

func CleanUpEvent

func CleanUpEvent(t *testing.T, ev *pb.Event)

Remove fields with unpredictable values

func CleanUpResourceChanged

func CleanUpResourceChanged(e *events.ResourceChanged, resetCorrelationID bool) *events.ResourceChanged

func CleanUpResourceCreatePending

func CleanUpResourceCreatePending(e *events.ResourceCreatePending, resetCorrelationID bool) *events.ResourceCreatePending

func CleanUpResourceCreated

func CleanUpResourceCreated(e *events.ResourceCreated, resetCorrelationID bool) *events.ResourceCreated

func CleanUpResourceDeletePending

func CleanUpResourceDeletePending(e *events.ResourceDeletePending, resetCorrelationID bool) *events.ResourceDeletePending

func CleanUpResourceLinksPublished

func CleanUpResourceLinksPublished(e *events.ResourceLinksPublished, resetCorrelationID bool) *events.ResourceLinksPublished

func CleanUpResourceLinksUnpublished

func CleanUpResourceLinksUnpublished(e *events.ResourceLinksUnpublished, resetCorrelationID bool) *events.ResourceLinksUnpublished

func CleanUpResourceRetrievePending

func CleanUpResourceRetrievePending(e *events.ResourceRetrievePending, resetCorrelationID bool) *events.ResourceRetrievePending

func CleanUpResourceRetrieved

func CleanUpResourceRetrieved(e *events.ResourceRetrieved, resetCorrelationID bool) *events.ResourceRetrieved

func CleanUpResourceStateSnapshotTaken

func CleanUpResourceStateSnapshotTaken(e *events.ResourceStateSnapshotTaken, resetCorrelationID bool) *events.ResourceStateSnapshotTaken

func CleanUpResourceUpdatePending

func CleanUpResourceUpdatePending(e *events.ResourceUpdatePending, resetCorrelationID bool) *events.ResourceUpdatePending

func CleanUpResourceUpdated

func CleanUpResourceUpdated(e *events.ResourceUpdated, resetCorrelationID bool) *events.ResourceUpdated

func CleanUpServiceEvent added in v2.12.0

func CleanUpServiceEvent(t *testing.T, ev eventstore.Event)

func CleanUpServiceMetadataUpdated added in v2.12.0

func CleanUpServiceMetadataUpdated(e *events.ServiceMetadataUpdated, resetCorrelationID bool) *events.ServiceMetadataUpdated

func CmpDeviceMetadataUpdatePending

func CmpDeviceMetadataUpdatePending(t *testing.T, expected, got *events.DeviceMetadataUpdatePending)

func CmpDeviceMetadataUpdated

func CmpDeviceMetadataUpdated(t *testing.T, expected, got *events.DeviceMetadataUpdated)

func CmpDeviceMetadataUpdatedSlice

func CmpDeviceMetadataUpdatedSlice(t *testing.T, expected, got []*events.DeviceMetadataUpdated)

func CmpDeviceValues

func CmpDeviceValues(t *testing.T, expected, got []*pbGrpc.Device)

func CmpEvent

func CmpEvent(t *testing.T, expected, got *pb.Event, cmpInterface string)

func CmpEvents

func CmpEvents(t *testing.T, expected, got []*pb.Event)

func CmpHubConfigurationResponse

func CmpHubConfigurationResponse(t *testing.T, expected, got *pb.HubConfigurationResponse)

func CmpPendingCmds

func CmpPendingCmds(t *testing.T, want []*pb.PendingCommand, got []*pb.PendingCommand)

func CmpResourceChanged

func CmpResourceChanged(t *testing.T, expected, got *events.ResourceChanged, cmpInterface string)

func CmpResourceChangedData

func CmpResourceChangedData(t *testing.T, expected, got []byte)

func CmpResourceCreatePending

func CmpResourceCreatePending(t *testing.T, expected, got *events.ResourceCreatePending)

func CmpResourceCreated

func CmpResourceCreated(t *testing.T, expected, got *events.ResourceCreated)

func CmpResourceDeletePending

func CmpResourceDeletePending(t *testing.T, expected, got *events.ResourceDeletePending)

func CmpResourceDeleted

func CmpResourceDeleted(t *testing.T, expected, got *events.ResourceDeleted)

func CmpResourceIds

func CmpResourceIds(t *testing.T, expected, got []*commands.ResourceId)

func CmpResourceRetrievePending

func CmpResourceRetrievePending(t *testing.T, expected, got *events.ResourceRetrievePending)

func CmpResourceRetrieved

func CmpResourceRetrieved(t *testing.T, expected, got *events.ResourceRetrieved)

func CmpResourceStateSnapshotTaken

func CmpResourceStateSnapshotTaken(t *testing.T, expected, got *events.ResourceStateSnapshotTaken)

func CmpResourceUpdatePending

func CmpResourceUpdatePending(t *testing.T, expected, got *events.ResourceUpdatePending)

func CmpResourceUpdated

func CmpResourceUpdated(t *testing.T, expected, got *events.ResourceUpdated)

func CmpResourceValues

func CmpResourceValues(t *testing.T, expected, got []*pb.Resource)

func CmpResourceValuesBasic

func CmpResourceValuesBasic(t *testing.T, expected, got []*pb.Resource)

compare only deviceId, href and resourceTypes

func CmpServiceMetadataUpdated added in v2.12.0

func CmpServiceMetadataUpdated(t *testing.T, expected, got *events.ServiceMetadataUpdated)

func CmpServiceMetadataUpdatedSlice added in v2.12.0

func CmpServiceMetadataUpdatedSlice(t *testing.T, expected, got []*events.ServiceMetadataUpdated)

func CmpServicesEvents added in v2.12.0

func CmpServicesEvents(t *testing.T, expected, got []eventstore.Event)

func FindResourceInResourceLinksPublishedByHref added in v2.5.0

func FindResourceInResourceLinksPublishedByHref(e *events.ResourceLinksPublished, href string) *commands.Resource

func GetEventID

func GetEventID(ev *pb.Event) string

func GetEventType

func GetEventType(ev *pb.Event) string

func GetWrappedEvent

func GetWrappedEvent(v *pb.GetEventsResponse) interface{}

func MakeCreateSwitchResourceResponseData

func MakeCreateSwitchResourceResponseData(id string) map[string]interface{}

func MakeDeviceMetadataUpdatePending

func MakeDeviceMetadataUpdatePending(deviceID string, twinEnabled bool, correlationID string) *events.DeviceMetadataUpdatePending

func MakeDeviceMetadataUpdated

func MakeDeviceMetadataUpdated(deviceID string, connectionStatus commands.Connection_Status, connectionProtocol commands.Connection_Protocol, twinEnabled bool, twinSynchronizationState commands.TwinSynchronization_State, correlationID string) *events.DeviceMetadataUpdated

func MakeResourceChanged

func MakeResourceChanged(t *testing.T, deviceID, href, correlationID string, data interface{}) *events.ResourceChanged

func MakeResourceCreatePending

func MakeResourceCreatePending(t *testing.T, deviceID, href, correlationID string, data interface{}) *events.ResourceCreatePending

func MakeResourceCreated

func MakeResourceCreated(t *testing.T, deviceID, href, correlationID string, data map[string]interface{}) *events.ResourceCreated

func MakeResourceDeletePending

func MakeResourceDeletePending(deviceID, href, correlationID string) *events.ResourceDeletePending

func MakeResourceDeleted

func MakeResourceDeleted(deviceID, href, correlationID string) *events.ResourceDeleted

func MakeResourceLinksPublished

func MakeResourceLinksPublished(deviceID string, resources []*commands.Resource, correlationID string) *events.ResourceLinksPublished

func MakeResourceLinksUnpublished

func MakeResourceLinksUnpublished(deviceID string, resources []string, correlationID string) *events.ResourceLinksUnpublished

func MakeResourceRetrievePending

func MakeResourceRetrievePending(deviceID, href, correlationID string) *events.ResourceRetrievePending

func MakeResourceRetrieved

func MakeResourceRetrieved(t *testing.T, deviceID, href, correlationID string, data interface{}) *events.ResourceRetrieved

func MakeResourceUpdatePending

func MakeResourceUpdatePending(t *testing.T, deviceID, href, correlationID string, data interface{}) *events.ResourceUpdatePending

func MakeResourceUpdated

func MakeResourceUpdated(t *testing.T, deviceID, href, correlationID string, data interface{}) *events.ResourceUpdated

func MakeServiceMetadataUpdated added in v2.12.0

func MakeServiceMetadataUpdated(servicesHeartbeat *events.ServicesHeartbeat, correlationID string) *events.ServiceMetadataUpdated

func OperationProcessedOK

func OperationProcessedOK() *pb.Event_OperationProcessed_

func ResourceLinkToPublishEvent

func ResourceLinkToPublishEvent(deviceID, token string, links []schema.ResourceLink) *pb.Event

func ToEvent

func ToEvent(data interface{}) *pb.Event

Try to create a *pb.Event which wraps the given data (data must be castable to one of pb.isEvent_Type types)

Types

type DevicePendingEvent

type DevicePendingEvent struct {
	DeviceID      string
	CorrelationID string
}

type ResourcePendingEvent

type ResourcePendingEvent struct {
	ResourceId    *commands.ResourceId
	CorrelationID string
}

type SortPendingCommand

type SortPendingCommand []*pb.PendingCommand

func (SortPendingCommand) Len

func (a SortPendingCommand) Len() int

func (SortPendingCommand) Less

func (a SortPendingCommand) Less(i, j int) bool

func (SortPendingCommand) Swap

func (a SortPendingCommand) Swap(i, j int)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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