Documentation
¶
Index ¶
- Constants
- Variables
- func GetDevicesRegisteredSubject(owner string) string
- func GetDevicesUnregisteredSubject(owner string) string
- func GetRegistrationSubject(owner string) string
- func OwnerToUUID(owner string) string
- func ToSubject(template string, opts ...func(values map[string]string)) string
- func WithEventType(eventType string) func(values map[string]string)
- func WithOwner(owner string) func(values map[string]string)
- type AuditContext
- type DevicesRegistered
- func (*DevicesRegistered) Descriptor() ([]byte, []int)deprecated
- func (x *DevicesRegistered) GetAuditContext() *AuditContext
- func (x *DevicesRegistered) GetDeviceIds() []string
- func (x *DevicesRegistered) GetOpenTelemetryCarrier() map[string]string
- func (x *DevicesRegistered) GetOwner() string
- func (x *DevicesRegistered) GetTimestamp() int64
- func (*DevicesRegistered) ProtoMessage()
- func (x *DevicesRegistered) ProtoReflect() protoreflect.Message
- func (x *DevicesRegistered) Reset()
- func (x *DevicesRegistered) String() string
- type DevicesUnregistered
- func (*DevicesUnregistered) Descriptor() ([]byte, []int)deprecated
- func (x *DevicesUnregistered) GetAuditContext() *AuditContext
- func (x *DevicesUnregistered) GetDeviceIds() []string
- func (x *DevicesUnregistered) GetOpenTelemetryCarrier() map[string]string
- func (x *DevicesUnregistered) GetOwner() string
- func (x *DevicesUnregistered) GetTimestamp() int64
- func (*DevicesUnregistered) ProtoMessage()
- func (x *DevicesUnregistered) ProtoReflect() protoreflect.Message
- func (x *DevicesUnregistered) Reset()
- func (x *DevicesUnregistered) String() string
- type Event
- func (*Event) Descriptor() ([]byte, []int)deprecated
- func (x *Event) GetDevicesRegistered() *DevicesRegistered
- func (x *Event) GetDevicesUnregistered() *DevicesUnregistered
- func (m *Event) GetType() isEvent_Type
- func (e *Event) Marshal() ([]byte, error)
- func (*Event) ProtoMessage()
- func (x *Event) ProtoReflect() protoreflect.Message
- func (x *Event) Reset()
- func (x *Event) String() string
- func (e *Event) Unmarshal(b []byte) error
- type Event_DevicesRegistered
- type Event_DevicesUnregistered
Constants ¶
View Source
const DevicesRegisteredEvent = "devicesregistered"
View Source
const DevicesUnregisteredEvent = "devicesunregistered"
View Source
const EventTypeKey = "eventType"
View Source
const OwnerIdKey = "ownerId"
View Source
const Plgd = "plgd"
View Source
const PlgdOwners = Plgd + ".owners"
View Source
const PlgdOwnersOwner = PlgdOwners + ".{" + OwnerIdKey + "}"
View Source
const PlgdOwnersOwnerRegistrations = PlgdOwnersOwner + "." + Registrations
View Source
const PlgdOwnersOwnerRegistrationsEvent = PlgdOwnersOwnerRegistrations + ".{" + EventTypeKey + "}"
View Source
const Registrations = "registrations"
Variables ¶
View Source
var File_github_com_plgd_dev_hub_identity_store_pb_events_proto protoreflect.FileDescriptor
Functions ¶
func GetRegistrationSubject ¶
func OwnerToUUID ¶
func WithEventType ¶
Types ¶
type AuditContext ¶
type AuditContext struct { UserId string `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` // contains filtered or unexported fields }
provides who register/unregister the device
func (*AuditContext) Descriptor
deprecated
func (*AuditContext) Descriptor() ([]byte, []int)
Deprecated: Use AuditContext.ProtoReflect.Descriptor instead.
func (*AuditContext) GetUserId ¶
func (x *AuditContext) GetUserId() string
func (*AuditContext) ProtoMessage ¶
func (*AuditContext) ProtoMessage()
func (*AuditContext) ProtoReflect ¶
func (x *AuditContext) ProtoReflect() protoreflect.Message
func (*AuditContext) Reset ¶
func (x *AuditContext) Reset()
func (*AuditContext) String ¶
func (x *AuditContext) String() string
type DevicesRegistered ¶
type DevicesRegistered struct { Owner string `protobuf:"bytes,1,opt,name=owner,proto3" json:"owner,omitempty"` // new owner of devices. DeviceIds []string `protobuf:"bytes,2,rep,name=device_ids,json=deviceIds,proto3" json:"device_ids,omitempty"` // list of device ids added to owner. Timestamp int64 `protobuf:"varint,3,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // unix timestamp in nanoseconds of creation event. AuditContext *AuditContext `protobuf:"bytes,4,opt,name=audit_context,json=auditContext,proto3" json:"audit_context,omitempty"` // provides who register/unregister the device // Open telemetry data propagated to asynchronous events OpenTelemetryCarrier map[string]string `` /* 213-byte string literal not displayed */ // contains filtered or unexported fields }
devices was registered to owner.
func (*DevicesRegistered) Descriptor
deprecated
func (*DevicesRegistered) Descriptor() ([]byte, []int)
Deprecated: Use DevicesRegistered.ProtoReflect.Descriptor instead.
func (*DevicesRegistered) GetAuditContext ¶
func (x *DevicesRegistered) GetAuditContext() *AuditContext
func (*DevicesRegistered) GetDeviceIds ¶
func (x *DevicesRegistered) GetDeviceIds() []string
func (*DevicesRegistered) GetOpenTelemetryCarrier ¶ added in v2.4.0
func (x *DevicesRegistered) GetOpenTelemetryCarrier() map[string]string
func (*DevicesRegistered) GetOwner ¶
func (x *DevicesRegistered) GetOwner() string
func (*DevicesRegistered) GetTimestamp ¶
func (x *DevicesRegistered) GetTimestamp() int64
func (*DevicesRegistered) ProtoMessage ¶
func (*DevicesRegistered) ProtoMessage()
func (*DevicesRegistered) ProtoReflect ¶
func (x *DevicesRegistered) ProtoReflect() protoreflect.Message
func (*DevicesRegistered) Reset ¶
func (x *DevicesRegistered) Reset()
func (*DevicesRegistered) String ¶
func (x *DevicesRegistered) String() string
type DevicesUnregistered ¶
type DevicesUnregistered struct { Owner string `protobuf:"bytes,1,opt,name=owner,proto3" json:"owner,omitempty"` // owner, which lose devices. DeviceIds []string `protobuf:"bytes,2,rep,name=device_ids,json=deviceIds,proto3" json:"device_ids,omitempty"` // list of device ids deleted from owner. Timestamp int64 `protobuf:"varint,3,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // unix timestamp in nanoseconds of creation event. AuditContext *AuditContext `protobuf:"bytes,4,opt,name=audit_context,json=auditContext,proto3" json:"audit_context,omitempty"` // provides who register/unregister the device // Open telemetry data propagated to asynchronous events OpenTelemetryCarrier map[string]string `` /* 213-byte string literal not displayed */ // contains filtered or unexported fields }
devices was deregistered from owner.
func (*DevicesUnregistered) Descriptor
deprecated
func (*DevicesUnregistered) Descriptor() ([]byte, []int)
Deprecated: Use DevicesUnregistered.ProtoReflect.Descriptor instead.
func (*DevicesUnregistered) GetAuditContext ¶
func (x *DevicesUnregistered) GetAuditContext() *AuditContext
func (*DevicesUnregistered) GetDeviceIds ¶
func (x *DevicesUnregistered) GetDeviceIds() []string
func (*DevicesUnregistered) GetOpenTelemetryCarrier ¶ added in v2.4.0
func (x *DevicesUnregistered) GetOpenTelemetryCarrier() map[string]string
func (*DevicesUnregistered) GetOwner ¶
func (x *DevicesUnregistered) GetOwner() string
func (*DevicesUnregistered) GetTimestamp ¶
func (x *DevicesUnregistered) GetTimestamp() int64
func (*DevicesUnregistered) ProtoMessage ¶
func (*DevicesUnregistered) ProtoMessage()
func (*DevicesUnregistered) ProtoReflect ¶
func (x *DevicesUnregistered) ProtoReflect() protoreflect.Message
func (*DevicesUnregistered) Reset ¶
func (x *DevicesUnregistered) Reset()
func (*DevicesUnregistered) String ¶
func (x *DevicesUnregistered) String() string
type Event ¶
type Event struct { // Types that are assignable to Type: // *Event_DevicesRegistered // *Event_DevicesUnregistered Type isEvent_Type `protobuf_oneof:"type"` // contains filtered or unexported fields }
nats: owners.{owner}.>
func (*Event) Descriptor
deprecated
func (*Event) GetDevicesRegistered ¶
func (x *Event) GetDevicesRegistered() *DevicesRegistered
func (*Event) GetDevicesUnregistered ¶
func (x *Event) GetDevicesUnregistered() *DevicesUnregistered
func (*Event) ProtoMessage ¶
func (*Event) ProtoMessage()
func (*Event) ProtoReflect ¶
func (x *Event) ProtoReflect() protoreflect.Message
type Event_DevicesRegistered ¶
type Event_DevicesRegistered struct { // nats: owners.{owner}.registered DevicesRegistered *DevicesRegistered `protobuf:"bytes,1,opt,name=devices_registered,json=devicesRegistered,proto3,oneof"` }
type Event_DevicesUnregistered ¶
type Event_DevicesUnregistered struct { // nats: owners.{owner}.unregistered DevicesUnregistered *DevicesUnregistered `protobuf:"bytes,2,opt,name=devices_unregistered,json=devicesUnregistered,proto3,oneof"` }
Click to show internal directories.
Click to hide internal directories.