Documentation
¶
Index ¶
- Variables
- func DeviceMetadataFactoryModel(ctx context.Context) (cqrsAggregate.AggregateModel, error)
- func New(ctx context.Context, config Config, fileWatcher *fsnotify.Watcher, ...) (*service.Service, error)
- func NewService(ctx context.Context, config Config, fileWatcher *fsnotify.Watcher, ...) (*service.Service, error)
- func PublishEvents(publisher eventbus.Publisher, owner, deviceID, resourceID string, ...) error
- func RegisterResourceAggregateServer(s grpc.ServiceRegistrar, srv ResourceAggregateServer)
- func ResourceLinksFactoryModel(ctx context.Context) (cqrsAggregate.AggregateModel, error)
- func ResourceStateFactoryModel(ctx context.Context) (cqrsAggregate.AggregateModel, error)
- type APIsConfig
- type Aggregate
- func (a *Aggregate) CancelPendingMetadataUpdates(ctx context.Context, request *commands.CancelPendingMetadataUpdatesRequest) (events []eventstore.Event, err error)
- func (a *Aggregate) CancelResourceCommand(ctx context.Context, request *commands.CancelPendingCommandsRequest) (events []eventstore.Event, err error)
- func (a *Aggregate) ConfirmDeviceMetadataUpdate(ctx context.Context, request *commands.ConfirmDeviceMetadataUpdateRequest) (events []eventstore.Event, err error)
- func (a *Aggregate) ConfirmResourceCreate(ctx context.Context, request *commands.ConfirmResourceCreateRequest) (events []eventstore.Event, err error)
- func (a *Aggregate) ConfirmResourceDelete(ctx context.Context, request *commands.ConfirmResourceDeleteRequest) (events []eventstore.Event, err error)
- func (a *Aggregate) ConfirmResourceRetrieve(ctx context.Context, request *commands.ConfirmResourceRetrieveRequest) (events []eventstore.Event, err error)
- func (a *Aggregate) ConfirmResourceUpdate(ctx context.Context, request *commands.ConfirmResourceUpdateRequest) (events []eventstore.Event, err error)
- func (a *Aggregate) CreateResource(ctx context.Context, request *commands.CreateResourceRequest) (events []eventstore.Event, err error)
- func (a *Aggregate) DeleteResource(ctx context.Context, request *commands.DeleteResourceRequest) (events []eventstore.Event, err error)
- func (a *Aggregate) DeviceID() string
- func (a *Aggregate) NotifyResourceChanged(ctx context.Context, request *commands.NotifyResourceChangedRequest) (events []eventstore.Event, err error)
- func (a *Aggregate) PublishResourceLinks(ctx context.Context, request *commands.PublishResourceLinksRequest) (events []eventstore.Event, err error)
- func (a *Aggregate) ResourceID() string
- func (a *Aggregate) RetrieveResource(ctx context.Context, request *commands.RetrieveResourceRequest) (events []eventstore.Event, err error)
- func (a *Aggregate) UnpublishResourceLinks(ctx context.Context, request *commands.UnpublishResourceLinksRequest) (events []eventstore.Event, err error)
- func (a *Aggregate) UpdateDeviceMetadata(ctx context.Context, request *commands.UpdateDeviceMetadataRequest) (events []eventstore.Event, err error)
- func (a *Aggregate) UpdateResource(ctx context.Context, request *commands.UpdateResourceRequest) (events []eventstore.Event, err error)
- type ClientsConfig
- type Config
- type EventBusConfig
- type EventStore
- type EventStoreConfig
- type GRPCConfig
- type IdentityStoreConfig
- type LogPublishErrFunc
- type RequestHandler
- func (r RequestHandler) BatchNotifyResourceChanged(ctx context.Context, request *commands.BatchNotifyResourceChangedRequest) (*commands.BatchNotifyResourceChangedResponse, error)
- func (r RequestHandler) CancelPendingCommands(ctx context.Context, request *commands.CancelPendingCommandsRequest) (*commands.CancelPendingCommandsResponse, error)
- func (r RequestHandler) CancelPendingMetadataUpdates(ctx context.Context, request *commands.CancelPendingMetadataUpdatesRequest) (*commands.CancelPendingMetadataUpdatesResponse, error)
- func (r RequestHandler) ConfirmDeviceMetadataUpdate(ctx context.Context, request *commands.ConfirmDeviceMetadataUpdateRequest) (*commands.ConfirmDeviceMetadataUpdateResponse, error)
- func (r RequestHandler) ConfirmResourceCreate(ctx context.Context, request *commands.ConfirmResourceCreateRequest) (*commands.ConfirmResourceCreateResponse, error)
- func (r RequestHandler) ConfirmResourceDelete(ctx context.Context, request *commands.ConfirmResourceDeleteRequest) (*commands.ConfirmResourceDeleteResponse, error)
- func (r RequestHandler) ConfirmResourceRetrieve(ctx context.Context, request *commands.ConfirmResourceRetrieveRequest) (*commands.ConfirmResourceRetrieveResponse, error)
- func (r RequestHandler) ConfirmResourceUpdate(ctx context.Context, request *commands.ConfirmResourceUpdateRequest) (*commands.ConfirmResourceUpdateResponse, error)
- func (r RequestHandler) CreateResource(ctx context.Context, request *commands.CreateResourceRequest) (*commands.CreateResourceResponse, error)
- func (r RequestHandler) DeleteDevices(ctx context.Context, request *commands.DeleteDevicesRequest) (*commands.DeleteDevicesResponse, error)
- func (r RequestHandler) DeleteResource(ctx context.Context, request *commands.DeleteResourceRequest) (*commands.DeleteResourceResponse, error)
- func (r RequestHandler) NotifyResourceChanged(ctx context.Context, request *commands.NotifyResourceChangedRequest) (*commands.NotifyResourceChangedResponse, error)
- func (r RequestHandler) PublishResourceLinks(ctx context.Context, request *commands.PublishResourceLinksRequest) (*commands.PublishResourceLinksResponse, error)
- func (r RequestHandler) RetrieveResource(ctx context.Context, request *commands.RetrieveResourceRequest) (*commands.RetrieveResourceResponse, error)
- func (r RequestHandler) UnpublishResourceLinks(ctx context.Context, request *commands.UnpublishResourceLinksRequest) (*commands.UnpublishResourceLinksResponse, error)
- func (r RequestHandler) UpdateDeviceMetadata(ctx context.Context, request *commands.UpdateDeviceMetadataRequest) (*commands.UpdateDeviceMetadataResponse, error)
- func (r RequestHandler) UpdateResource(ctx context.Context, request *commands.UpdateResourceRequest) (*commands.UpdateResourceResponse, error)
- type ResourceAggregateClient
- type ResourceAggregateServer
- type UnimplementedResourceAggregateServer
- func (UnimplementedResourceAggregateServer) BatchNotifyResourceChanged(context.Context, *commands.BatchNotifyResourceChangedRequest) (*commands.BatchNotifyResourceChangedResponse, error)
- func (UnimplementedResourceAggregateServer) CancelPendingCommands(context.Context, *commands.CancelPendingCommandsRequest) (*commands.CancelPendingCommandsResponse, error)
- func (UnimplementedResourceAggregateServer) CancelPendingMetadataUpdates(context.Context, *commands.CancelPendingMetadataUpdatesRequest) (*commands.CancelPendingMetadataUpdatesResponse, error)
- func (UnimplementedResourceAggregateServer) ConfirmDeviceMetadataUpdate(context.Context, *commands.ConfirmDeviceMetadataUpdateRequest) (*commands.ConfirmDeviceMetadataUpdateResponse, error)
- func (UnimplementedResourceAggregateServer) ConfirmResourceCreate(context.Context, *commands.ConfirmResourceCreateRequest) (*commands.ConfirmResourceCreateResponse, error)
- func (UnimplementedResourceAggregateServer) ConfirmResourceDelete(context.Context, *commands.ConfirmResourceDeleteRequest) (*commands.ConfirmResourceDeleteResponse, error)
- func (UnimplementedResourceAggregateServer) ConfirmResourceRetrieve(context.Context, *commands.ConfirmResourceRetrieveRequest) (*commands.ConfirmResourceRetrieveResponse, error)
- func (UnimplementedResourceAggregateServer) ConfirmResourceUpdate(context.Context, *commands.ConfirmResourceUpdateRequest) (*commands.ConfirmResourceUpdateResponse, error)
- func (UnimplementedResourceAggregateServer) CreateResource(context.Context, *commands.CreateResourceRequest) (*commands.CreateResourceResponse, error)
- func (UnimplementedResourceAggregateServer) DeleteDevices(context.Context, *commands.DeleteDevicesRequest) (*commands.DeleteDevicesResponse, error)
- func (UnimplementedResourceAggregateServer) DeleteResource(context.Context, *commands.DeleteResourceRequest) (*commands.DeleteResourceResponse, error)
- func (UnimplementedResourceAggregateServer) NotifyResourceChanged(context.Context, *commands.NotifyResourceChangedRequest) (*commands.NotifyResourceChangedResponse, error)
- func (UnimplementedResourceAggregateServer) PublishResourceLinks(context.Context, *commands.PublishResourceLinksRequest) (*commands.PublishResourceLinksResponse, error)
- func (UnimplementedResourceAggregateServer) RetrieveResource(context.Context, *commands.RetrieveResourceRequest) (*commands.RetrieveResourceResponse, error)
- func (UnimplementedResourceAggregateServer) UnpublishResourceLinks(context.Context, *commands.UnpublishResourceLinksRequest) (*commands.UnpublishResourceLinksResponse, error)
- func (UnimplementedResourceAggregateServer) UpdateDeviceMetadata(context.Context, *commands.UpdateDeviceMetadataRequest) (*commands.UpdateDeviceMetadataResponse, error)
- func (UnimplementedResourceAggregateServer) UpdateResource(context.Context, *commands.UpdateResourceRequest) (*commands.UpdateResourceResponse, error)
- type UnsafeResourceAggregateServer
Constants ¶
This section is empty.
Variables ¶
var ResourceAggregate_ServiceDesc = grpc.ServiceDesc{ ServiceName: "resourceaggregate.pb.ResourceAggregate", HandlerType: (*ResourceAggregateServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "PublishResourceLinks", Handler: _ResourceAggregate_PublishResourceLinks_Handler, }, { MethodName: "UnpublishResourceLinks", Handler: _ResourceAggregate_UnpublishResourceLinks_Handler, }, { MethodName: "NotifyResourceChanged", Handler: _ResourceAggregate_NotifyResourceChanged_Handler, }, { MethodName: "UpdateResource", Handler: _ResourceAggregate_UpdateResource_Handler, }, { MethodName: "ConfirmResourceUpdate", Handler: _ResourceAggregate_ConfirmResourceUpdate_Handler, }, { MethodName: "RetrieveResource", Handler: _ResourceAggregate_RetrieveResource_Handler, }, { MethodName: "ConfirmResourceRetrieve", Handler: _ResourceAggregate_ConfirmResourceRetrieve_Handler, }, { MethodName: "DeleteResource", Handler: _ResourceAggregate_DeleteResource_Handler, }, { MethodName: "ConfirmResourceDelete", Handler: _ResourceAggregate_ConfirmResourceDelete_Handler, }, { MethodName: "CreateResource", Handler: _ResourceAggregate_CreateResource_Handler, }, { MethodName: "ConfirmResourceCreate", Handler: _ResourceAggregate_ConfirmResourceCreate_Handler, }, { MethodName: "UpdateDeviceMetadata", Handler: _ResourceAggregate_UpdateDeviceMetadata_Handler, }, { MethodName: "ConfirmDeviceMetadataUpdate", Handler: _ResourceAggregate_ConfirmDeviceMetadataUpdate_Handler, }, { MethodName: "CancelPendingMetadataUpdates", Handler: _ResourceAggregate_CancelPendingMetadataUpdates_Handler, }, { MethodName: "CancelPendingCommands", Handler: _ResourceAggregate_CancelPendingCommands_Handler, }, { MethodName: "DeleteDevices", Handler: _ResourceAggregate_DeleteDevices_Handler, }, { MethodName: "BatchNotifyResourceChanged", Handler: _ResourceAggregate_BatchNotifyResourceChanged_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "resource-aggregate/pb/service.proto", }
ResourceAggregate_ServiceDesc is the grpc.ServiceDesc for ResourceAggregate service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func DeviceMetadataFactoryModel ¶
func DeviceMetadataFactoryModel(ctx context.Context) (cqrsAggregate.AggregateModel, error)
func NewService ¶
func NewService(ctx context.Context, config Config, fileWatcher *fsnotify.Watcher, logger log.Logger, tracerProvider trace.TracerProvider, eventStore EventStore, publisher cqrsEventBus.Publisher) (*service.Service, error)
New creates new Server with provided store and publisher.
func PublishEvents ¶
func RegisterResourceAggregateServer ¶
func RegisterResourceAggregateServer(s grpc.ServiceRegistrar, srv ResourceAggregateServer)
func ResourceLinksFactoryModel ¶
func ResourceLinksFactoryModel(ctx context.Context) (cqrsAggregate.AggregateModel, error)
func ResourceStateFactoryModel ¶
func ResourceStateFactoryModel(ctx context.Context) (cqrsAggregate.AggregateModel, error)
Types ¶
type APIsConfig ¶
type APIsConfig struct {
GRPC GRPCConfig `yaml:"grpc" json:"grpc"`
}
func (*APIsConfig) Validate ¶
func (c *APIsConfig) Validate() error
type Aggregate ¶ added in v2.7.0
type Aggregate struct {
// contains filtered or unexported fields
}
func NewAggregate ¶
func NewAggregate(resourceID *commands.ResourceId, snapshotThreshold int, eventstore EventStore, factoryModel cqrsAggregate.FactoryModelFunc, retry cqrsAggregate.RetryFunc) (*Aggregate, error)
NewAggregate creates new resource aggreate - it must be created for every run command.
func (*Aggregate) CancelPendingMetadataUpdates ¶ added in v2.7.0
func (a *Aggregate) CancelPendingMetadataUpdates(ctx context.Context, request *commands.CancelPendingMetadataUpdatesRequest) (events []eventstore.Event, err error)
func (*Aggregate) CancelResourceCommand ¶ added in v2.7.0
func (a *Aggregate) CancelResourceCommand(ctx context.Context, request *commands.CancelPendingCommandsRequest) (events []eventstore.Event, err error)
func (*Aggregate) ConfirmDeviceMetadataUpdate ¶ added in v2.7.0
func (a *Aggregate) ConfirmDeviceMetadataUpdate(ctx context.Context, request *commands.ConfirmDeviceMetadataUpdateRequest) (events []eventstore.Event, err error)
func (*Aggregate) ConfirmResourceCreate ¶ added in v2.7.0
func (a *Aggregate) ConfirmResourceCreate(ctx context.Context, request *commands.ConfirmResourceCreateRequest) (events []eventstore.Event, err error)
func (*Aggregate) ConfirmResourceDelete ¶ added in v2.7.0
func (a *Aggregate) ConfirmResourceDelete(ctx context.Context, request *commands.ConfirmResourceDeleteRequest) (events []eventstore.Event, err error)
func (*Aggregate) ConfirmResourceRetrieve ¶ added in v2.7.0
func (a *Aggregate) ConfirmResourceRetrieve(ctx context.Context, request *commands.ConfirmResourceRetrieveRequest) (events []eventstore.Event, err error)
func (*Aggregate) ConfirmResourceUpdate ¶ added in v2.7.0
func (a *Aggregate) ConfirmResourceUpdate(ctx context.Context, request *commands.ConfirmResourceUpdateRequest) (events []eventstore.Event, err error)
func (*Aggregate) CreateResource ¶ added in v2.7.0
func (a *Aggregate) CreateResource(ctx context.Context, request *commands.CreateResourceRequest) (events []eventstore.Event, err error)
CreateResource handles a command CreateResource
func (*Aggregate) DeleteResource ¶ added in v2.7.0
func (a *Aggregate) DeleteResource(ctx context.Context, request *commands.DeleteResourceRequest) (events []eventstore.Event, err error)
DeleteResource handles a command DeleteResource
func (*Aggregate) NotifyResourceChanged ¶ added in v2.7.0
func (a *Aggregate) NotifyResourceChanged(ctx context.Context, request *commands.NotifyResourceChangedRequest) (events []eventstore.Event, err error)
NotifyContentChanged handles a command NotifyContentChanged
func (*Aggregate) PublishResourceLinks ¶ added in v2.7.0
func (a *Aggregate) PublishResourceLinks(ctx context.Context, request *commands.PublishResourceLinksRequest) (events []eventstore.Event, err error)
HandlePublishResource handles a command PublishResourceLinks
func (*Aggregate) ResourceID ¶ added in v2.7.0
func (*Aggregate) RetrieveResource ¶ added in v2.7.0
func (a *Aggregate) RetrieveResource(ctx context.Context, request *commands.RetrieveResourceRequest) (events []eventstore.Event, err error)
RetrieveResource handles a command RetriveResource
func (*Aggregate) UnpublishResourceLinks ¶ added in v2.7.0
func (a *Aggregate) UnpublishResourceLinks(ctx context.Context, request *commands.UnpublishResourceLinksRequest) (events []eventstore.Event, err error)
HandleUnpublishResource handles a command UnpublishResourceLinks
func (*Aggregate) UpdateDeviceMetadata ¶ added in v2.7.0
func (a *Aggregate) UpdateDeviceMetadata(ctx context.Context, request *commands.UpdateDeviceMetadataRequest) (events []eventstore.Event, err error)
func (*Aggregate) UpdateResource ¶ added in v2.7.0
func (a *Aggregate) UpdateResource(ctx context.Context, request *commands.UpdateResourceRequest) (events []eventstore.Event, err error)
HandleUpdateResourceContent handles a command UpdateResource
type ClientsConfig ¶
type ClientsConfig struct { Eventbus EventBusConfig `yaml:"eventBus" json:"eventBus"` Eventstore EventStoreConfig `yaml:"eventStore" json:"eventStore"` IdentityStore IdentityStoreConfig `yaml:"identityStore" json:"identityStore"` OpenTelemetryCollector otelClient.Config `yaml:"openTelemetryCollector" json:"openTelemetryCollector"` }
func (*ClientsConfig) Validate ¶
func (c *ClientsConfig) Validate() error
type Config ¶
type Config struct { Log log.Config `yaml:"log" json:"log"` APIs APIsConfig `yaml:"apis" json:"apis"` Clients ClientsConfig `yaml:"clients" json:"clients"` }
Config represent application configuration
type EventBusConfig ¶
type EventBusConfig struct {
NATS natsClient.ConfigPublisher `yaml:"nats" json:"nats"`
}
func (*EventBusConfig) Validate ¶
func (c *EventBusConfig) Validate() error
type EventStore ¶
type EventStore interface { cqrsEventStore.EventStore cqrsMaintenance.EventStore }
type EventStoreConfig ¶
type EventStoreConfig struct { SnapshotThreshold int `yaml:"snapshotThreshold" json:"snapshotThreshold"` ConcurrencyExceptionMaxRetry int `yaml:"occMaxRetry" json:"occMaxRetry"` DefaultCommandTimeToLive time.Duration `yaml:"defaultCommandTimeToLive" json:"defaultCommandTimeToLive"` Connection eventstoreConfig.Config `yaml:",inline" json:",inline"` }
func (*EventStoreConfig) Validate ¶
func (c *EventStoreConfig) Validate() error
type GRPCConfig ¶
type GRPCConfig struct { OwnerCacheExpiration time.Duration `yaml:"ownerCacheExpiration" json:"ownerCacheExpiration"` grpcServer.Config `yaml:",inline" json:",inline"` }
func (*GRPCConfig) Validate ¶
func (c *GRPCConfig) Validate() error
type IdentityStoreConfig ¶
func (*IdentityStoreConfig) Validate ¶
func (c *IdentityStoreConfig) Validate() error
type LogPublishErrFunc ¶
type LogPublishErrFunc func(err error)
type RequestHandler ¶
type RequestHandler struct { UnimplementedResourceAggregateServer // contains filtered or unexported fields }
RequestHandler for handling incoming request
func NewRequestHandler ¶
func NewRequestHandler(config Config, eventstore EventStore, publisher eventbus.Publisher, getOwnerDevicesFunc getOwnerDevicesFunc) *RequestHandler
NewRequestHandler factory for new RequestHandler
func (RequestHandler) BatchNotifyResourceChanged ¶ added in v2.6.0
func (r RequestHandler) BatchNotifyResourceChanged(ctx context.Context, request *commands.BatchNotifyResourceChangedRequest) (*commands.BatchNotifyResourceChangedResponse, error)
func (RequestHandler) CancelPendingCommands ¶
func (r RequestHandler) CancelPendingCommands(ctx context.Context, request *commands.CancelPendingCommandsRequest) (*commands.CancelPendingCommandsResponse, error)
func (RequestHandler) CancelPendingMetadataUpdates ¶
func (r RequestHandler) CancelPendingMetadataUpdates(ctx context.Context, request *commands.CancelPendingMetadataUpdatesRequest) (*commands.CancelPendingMetadataUpdatesResponse, error)
func (RequestHandler) ConfirmDeviceMetadataUpdate ¶
func (r RequestHandler) ConfirmDeviceMetadataUpdate(ctx context.Context, request *commands.ConfirmDeviceMetadataUpdateRequest) (*commands.ConfirmDeviceMetadataUpdateResponse, error)
func (RequestHandler) ConfirmResourceCreate ¶
func (r RequestHandler) ConfirmResourceCreate(ctx context.Context, request *commands.ConfirmResourceCreateRequest) (*commands.ConfirmResourceCreateResponse, error)
func (RequestHandler) ConfirmResourceDelete ¶
func (r RequestHandler) ConfirmResourceDelete(ctx context.Context, request *commands.ConfirmResourceDeleteRequest) (*commands.ConfirmResourceDeleteResponse, error)
func (RequestHandler) ConfirmResourceRetrieve ¶
func (r RequestHandler) ConfirmResourceRetrieve(ctx context.Context, request *commands.ConfirmResourceRetrieveRequest) (*commands.ConfirmResourceRetrieveResponse, error)
func (RequestHandler) ConfirmResourceUpdate ¶
func (r RequestHandler) ConfirmResourceUpdate(ctx context.Context, request *commands.ConfirmResourceUpdateRequest) (*commands.ConfirmResourceUpdateResponse, error)
func (RequestHandler) CreateResource ¶
func (r RequestHandler) CreateResource(ctx context.Context, request *commands.CreateResourceRequest) (*commands.CreateResourceResponse, error)
func (RequestHandler) DeleteDevices ¶
func (r RequestHandler) DeleteDevices(ctx context.Context, request *commands.DeleteDevicesRequest) (*commands.DeleteDevicesResponse, error)
Delete documents from events database for devices selected by query
Using empty deviceIdFilter in DeleteDevicesRequest is interpreting as requesting to delete all documents for devices owned by the user.
Function returns error or a non-empty DeleteDevicesResponse message, where the DeviceIds field is filled with list of device ids. The list is an intersection of the list provided by DeleteDevicesRequest and device ids owned by the user (ie. from the original list of device ids it filters out devices that are not owned by the user).
func (RequestHandler) DeleteResource ¶
func (r RequestHandler) DeleteResource(ctx context.Context, request *commands.DeleteResourceRequest) (*commands.DeleteResourceResponse, error)
func (RequestHandler) NotifyResourceChanged ¶
func (r RequestHandler) NotifyResourceChanged(ctx context.Context, request *commands.NotifyResourceChangedRequest) (*commands.NotifyResourceChangedResponse, error)
func (RequestHandler) PublishResourceLinks ¶
func (r RequestHandler) PublishResourceLinks(ctx context.Context, request *commands.PublishResourceLinksRequest) (*commands.PublishResourceLinksResponse, error)
func (RequestHandler) RetrieveResource ¶
func (r RequestHandler) RetrieveResource(ctx context.Context, request *commands.RetrieveResourceRequest) (*commands.RetrieveResourceResponse, error)
func (RequestHandler) UnpublishResourceLinks ¶
func (r RequestHandler) UnpublishResourceLinks(ctx context.Context, request *commands.UnpublishResourceLinksRequest) (*commands.UnpublishResourceLinksResponse, error)
func (RequestHandler) UpdateDeviceMetadata ¶
func (r RequestHandler) UpdateDeviceMetadata(ctx context.Context, request *commands.UpdateDeviceMetadataRequest) (*commands.UpdateDeviceMetadataResponse, error)
func (RequestHandler) UpdateResource ¶
func (r RequestHandler) UpdateResource(ctx context.Context, request *commands.UpdateResourceRequest) (*commands.UpdateResourceResponse, error)
type ResourceAggregateClient ¶
type ResourceAggregateClient interface { PublishResourceLinks(ctx context.Context, in *commands.PublishResourceLinksRequest, opts ...grpc.CallOption) (*commands.PublishResourceLinksResponse, error) UnpublishResourceLinks(ctx context.Context, in *commands.UnpublishResourceLinksRequest, opts ...grpc.CallOption) (*commands.UnpublishResourceLinksResponse, error) NotifyResourceChanged(ctx context.Context, in *commands.NotifyResourceChangedRequest, opts ...grpc.CallOption) (*commands.NotifyResourceChangedResponse, error) UpdateResource(ctx context.Context, in *commands.UpdateResourceRequest, opts ...grpc.CallOption) (*commands.UpdateResourceResponse, error) ConfirmResourceUpdate(ctx context.Context, in *commands.ConfirmResourceUpdateRequest, opts ...grpc.CallOption) (*commands.ConfirmResourceUpdateResponse, error) RetrieveResource(ctx context.Context, in *commands.RetrieveResourceRequest, opts ...grpc.CallOption) (*commands.RetrieveResourceResponse, error) ConfirmResourceRetrieve(ctx context.Context, in *commands.ConfirmResourceRetrieveRequest, opts ...grpc.CallOption) (*commands.ConfirmResourceRetrieveResponse, error) DeleteResource(ctx context.Context, in *commands.DeleteResourceRequest, opts ...grpc.CallOption) (*commands.DeleteResourceResponse, error) ConfirmResourceDelete(ctx context.Context, in *commands.ConfirmResourceDeleteRequest, opts ...grpc.CallOption) (*commands.ConfirmResourceDeleteResponse, error) CreateResource(ctx context.Context, in *commands.CreateResourceRequest, opts ...grpc.CallOption) (*commands.CreateResourceResponse, error) ConfirmResourceCreate(ctx context.Context, in *commands.ConfirmResourceCreateRequest, opts ...grpc.CallOption) (*commands.ConfirmResourceCreateResponse, error) UpdateDeviceMetadata(ctx context.Context, in *commands.UpdateDeviceMetadataRequest, opts ...grpc.CallOption) (*commands.UpdateDeviceMetadataResponse, error) ConfirmDeviceMetadataUpdate(ctx context.Context, in *commands.ConfirmDeviceMetadataUpdateRequest, opts ...grpc.CallOption) (*commands.ConfirmDeviceMetadataUpdateResponse, error) CancelPendingMetadataUpdates(ctx context.Context, in *commands.CancelPendingMetadataUpdatesRequest, opts ...grpc.CallOption) (*commands.CancelPendingMetadataUpdatesResponse, error) CancelPendingCommands(ctx context.Context, in *commands.CancelPendingCommandsRequest, opts ...grpc.CallOption) (*commands.CancelPendingCommandsResponse, error) DeleteDevices(ctx context.Context, in *commands.DeleteDevicesRequest, opts ...grpc.CallOption) (*commands.DeleteDevicesResponse, error) BatchNotifyResourceChanged(ctx context.Context, in *commands.BatchNotifyResourceChangedRequest, opts ...grpc.CallOption) (*commands.BatchNotifyResourceChangedResponse, error) }
ResourceAggregateClient is the client API for ResourceAggregate service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
func NewResourceAggregateClient ¶
func NewResourceAggregateClient(cc grpc.ClientConnInterface) ResourceAggregateClient
type ResourceAggregateServer ¶
type ResourceAggregateServer interface { PublishResourceLinks(context.Context, *commands.PublishResourceLinksRequest) (*commands.PublishResourceLinksResponse, error) UnpublishResourceLinks(context.Context, *commands.UnpublishResourceLinksRequest) (*commands.UnpublishResourceLinksResponse, error) NotifyResourceChanged(context.Context, *commands.NotifyResourceChangedRequest) (*commands.NotifyResourceChangedResponse, error) UpdateResource(context.Context, *commands.UpdateResourceRequest) (*commands.UpdateResourceResponse, error) ConfirmResourceUpdate(context.Context, *commands.ConfirmResourceUpdateRequest) (*commands.ConfirmResourceUpdateResponse, error) RetrieveResource(context.Context, *commands.RetrieveResourceRequest) (*commands.RetrieveResourceResponse, error) ConfirmResourceRetrieve(context.Context, *commands.ConfirmResourceRetrieveRequest) (*commands.ConfirmResourceRetrieveResponse, error) DeleteResource(context.Context, *commands.DeleteResourceRequest) (*commands.DeleteResourceResponse, error) ConfirmResourceDelete(context.Context, *commands.ConfirmResourceDeleteRequest) (*commands.ConfirmResourceDeleteResponse, error) CreateResource(context.Context, *commands.CreateResourceRequest) (*commands.CreateResourceResponse, error) ConfirmResourceCreate(context.Context, *commands.ConfirmResourceCreateRequest) (*commands.ConfirmResourceCreateResponse, error) UpdateDeviceMetadata(context.Context, *commands.UpdateDeviceMetadataRequest) (*commands.UpdateDeviceMetadataResponse, error) ConfirmDeviceMetadataUpdate(context.Context, *commands.ConfirmDeviceMetadataUpdateRequest) (*commands.ConfirmDeviceMetadataUpdateResponse, error) CancelPendingMetadataUpdates(context.Context, *commands.CancelPendingMetadataUpdatesRequest) (*commands.CancelPendingMetadataUpdatesResponse, error) CancelPendingCommands(context.Context, *commands.CancelPendingCommandsRequest) (*commands.CancelPendingCommandsResponse, error) DeleteDevices(context.Context, *commands.DeleteDevicesRequest) (*commands.DeleteDevicesResponse, error) BatchNotifyResourceChanged(context.Context, *commands.BatchNotifyResourceChangedRequest) (*commands.BatchNotifyResourceChangedResponse, error) // contains filtered or unexported methods }
ResourceAggregateServer is the server API for ResourceAggregate service. All implementations must embed UnimplementedResourceAggregateServer for forward compatibility
type UnimplementedResourceAggregateServer ¶
type UnimplementedResourceAggregateServer struct { }
UnimplementedResourceAggregateServer must be embedded to have forward compatible implementations.
func (UnimplementedResourceAggregateServer) BatchNotifyResourceChanged ¶ added in v2.6.0
func (UnimplementedResourceAggregateServer) BatchNotifyResourceChanged(context.Context, *commands.BatchNotifyResourceChangedRequest) (*commands.BatchNotifyResourceChangedResponse, error)
func (UnimplementedResourceAggregateServer) CancelPendingCommands ¶
func (UnimplementedResourceAggregateServer) CancelPendingCommands(context.Context, *commands.CancelPendingCommandsRequest) (*commands.CancelPendingCommandsResponse, error)
func (UnimplementedResourceAggregateServer) CancelPendingMetadataUpdates ¶
func (UnimplementedResourceAggregateServer) CancelPendingMetadataUpdates(context.Context, *commands.CancelPendingMetadataUpdatesRequest) (*commands.CancelPendingMetadataUpdatesResponse, error)
func (UnimplementedResourceAggregateServer) ConfirmDeviceMetadataUpdate ¶
func (UnimplementedResourceAggregateServer) ConfirmDeviceMetadataUpdate(context.Context, *commands.ConfirmDeviceMetadataUpdateRequest) (*commands.ConfirmDeviceMetadataUpdateResponse, error)
func (UnimplementedResourceAggregateServer) ConfirmResourceCreate ¶
func (UnimplementedResourceAggregateServer) ConfirmResourceCreate(context.Context, *commands.ConfirmResourceCreateRequest) (*commands.ConfirmResourceCreateResponse, error)
func (UnimplementedResourceAggregateServer) ConfirmResourceDelete ¶
func (UnimplementedResourceAggregateServer) ConfirmResourceDelete(context.Context, *commands.ConfirmResourceDeleteRequest) (*commands.ConfirmResourceDeleteResponse, error)
func (UnimplementedResourceAggregateServer) ConfirmResourceRetrieve ¶
func (UnimplementedResourceAggregateServer) ConfirmResourceRetrieve(context.Context, *commands.ConfirmResourceRetrieveRequest) (*commands.ConfirmResourceRetrieveResponse, error)
func (UnimplementedResourceAggregateServer) ConfirmResourceUpdate ¶
func (UnimplementedResourceAggregateServer) ConfirmResourceUpdate(context.Context, *commands.ConfirmResourceUpdateRequest) (*commands.ConfirmResourceUpdateResponse, error)
func (UnimplementedResourceAggregateServer) CreateResource ¶
func (UnimplementedResourceAggregateServer) CreateResource(context.Context, *commands.CreateResourceRequest) (*commands.CreateResourceResponse, error)
func (UnimplementedResourceAggregateServer) DeleteDevices ¶
func (UnimplementedResourceAggregateServer) DeleteDevices(context.Context, *commands.DeleteDevicesRequest) (*commands.DeleteDevicesResponse, error)
func (UnimplementedResourceAggregateServer) DeleteResource ¶
func (UnimplementedResourceAggregateServer) DeleteResource(context.Context, *commands.DeleteResourceRequest) (*commands.DeleteResourceResponse, error)
func (UnimplementedResourceAggregateServer) NotifyResourceChanged ¶
func (UnimplementedResourceAggregateServer) NotifyResourceChanged(context.Context, *commands.NotifyResourceChangedRequest) (*commands.NotifyResourceChangedResponse, error)
func (UnimplementedResourceAggregateServer) PublishResourceLinks ¶
func (UnimplementedResourceAggregateServer) PublishResourceLinks(context.Context, *commands.PublishResourceLinksRequest) (*commands.PublishResourceLinksResponse, error)
func (UnimplementedResourceAggregateServer) RetrieveResource ¶
func (UnimplementedResourceAggregateServer) RetrieveResource(context.Context, *commands.RetrieveResourceRequest) (*commands.RetrieveResourceResponse, error)
func (UnimplementedResourceAggregateServer) UnpublishResourceLinks ¶
func (UnimplementedResourceAggregateServer) UnpublishResourceLinks(context.Context, *commands.UnpublishResourceLinksRequest) (*commands.UnpublishResourceLinksResponse, error)
func (UnimplementedResourceAggregateServer) UpdateDeviceMetadata ¶
func (UnimplementedResourceAggregateServer) UpdateDeviceMetadata(context.Context, *commands.UpdateDeviceMetadataRequest) (*commands.UpdateDeviceMetadataResponse, error)
func (UnimplementedResourceAggregateServer) UpdateResource ¶
func (UnimplementedResourceAggregateServer) UpdateResource(context.Context, *commands.UpdateResourceRequest) (*commands.UpdateResourceResponse, error)
type UnsafeResourceAggregateServer ¶
type UnsafeResourceAggregateServer interface {
// contains filtered or unexported methods
}
UnsafeResourceAggregateServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ResourceAggregateServer will result in compilation errors.