diff --git a/pb/clear_cache.pb.go b/pb/clear_cache.pb.go index 4e4c71f3..05cfb69b 100644 --- a/pb/clear_cache.pb.go +++ b/pb/clear_cache.pb.go @@ -16,8 +16,8 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.27.1 -// protoc v3.21.9 +// protoc-gen-go v1.30.0 +// protoc v4.22.3 // source: github.com/plgd-dev/client-application/pb/clear_cache.proto package pb diff --git a/pb/create_resource.pb.go b/pb/create_resource.pb.go index 4ac0c15d..583909ee 100644 --- a/pb/create_resource.pb.go +++ b/pb/create_resource.pb.go @@ -16,8 +16,8 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.27.1 -// protoc v3.21.9 +// protoc-gen-go v1.30.0 +// protoc v4.22.3 // source: github.com/plgd-dev/client-application/pb/create_resource.proto package pb @@ -102,22 +102,22 @@ var file_github_com_plgd_dev_client_application_pb_create_resource_proto_rawDesc 0x74, 0x65, 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0a, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x62, 0x1a, 0x1d, 0x67, 0x72, 0x70, 0x63, 0x2d, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2f, 0x70, 0x62, 0x2f, 0x64, - 0x65, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x24, 0x72, 0x65, + 0x65, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x25, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2d, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, - 0x2f, 0x70, 0x62, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x22, 0x8d, 0x01, 0x0a, 0x15, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x41, 0x0a, 0x0b, - 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x20, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x61, 0x67, 0x67, 0x72, - 0x65, 0x67, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x49, 0x64, 0x52, 0x0a, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x64, 0x12, - 0x31, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x17, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, - 0x62, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, - 0x6e, 0x74, 0x42, 0x2e, 0x5a, 0x2c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, - 0x2f, 0x70, 0x6c, 0x67, 0x64, 0x2d, 0x64, 0x65, 0x76, 0x2f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, - 0x2d, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x70, 0x62, 0x3b, - 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x2f, 0x70, 0x62, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x22, 0x8d, 0x01, 0x0a, 0x15, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x41, 0x0a, + 0x0b, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x61, 0x67, 0x67, + 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x49, 0x64, 0x52, 0x0a, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x64, + 0x12, 0x31, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, + 0x70, 0x62, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, + 0x65, 0x6e, 0x74, 0x42, 0x2e, 0x5a, 0x2c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x70, 0x6c, 0x67, 0x64, 0x2d, 0x64, 0x65, 0x76, 0x2f, 0x63, 0x6c, 0x69, 0x65, 0x6e, + 0x74, 0x2d, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x70, 0x62, + 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pb/create_resource.proto b/pb/create_resource.proto index 089536fa..26952f22 100644 --- a/pb/create_resource.proto +++ b/pb/create_resource.proto @@ -19,7 +19,7 @@ syntax = "proto3"; package service.pb; import "grpc-gateway/pb/devices.proto"; -import "resource-aggregate/pb/commands.proto"; +import "resource-aggregate/pb/resources.proto"; option go_package = "github.com/plgd-dev/client-application/pb;pb"; diff --git a/pb/delete_resource.pb.go b/pb/delete_resource.pb.go index 3f64861b..65c0b18e 100644 --- a/pb/delete_resource.pb.go +++ b/pb/delete_resource.pb.go @@ -16,8 +16,8 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.27.1 -// protoc v3.21.9 +// protoc-gen-go v1.30.0 +// protoc v4.22.3 // source: github.com/plgd-dev/client-application/pb/delete_resource.proto package pb @@ -91,19 +91,19 @@ var file_github_com_plgd_dev_client_application_pb_delete_resource_proto_rawDesc 0x64, 0x2d, 0x64, 0x65, 0x76, 0x2f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2d, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x70, 0x62, 0x2f, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x12, 0x0a, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x62, 0x1a, 0x24, 0x72, + 0x6f, 0x12, 0x0a, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x62, 0x1a, 0x25, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2d, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, - 0x65, 0x2f, 0x70, 0x62, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x22, 0x5a, 0x0a, 0x15, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x41, 0x0a, 0x0b, - 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x20, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x61, 0x67, 0x67, 0x72, - 0x65, 0x67, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x49, 0x64, 0x52, 0x0a, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x64, 0x42, - 0x2e, 0x5a, 0x2c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x6c, - 0x67, 0x64, 0x2d, 0x64, 0x65, 0x76, 0x2f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2d, 0x61, 0x70, - 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x70, 0x62, 0x3b, 0x70, 0x62, 0x62, - 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x65, 0x2f, 0x70, 0x62, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x5a, 0x0a, 0x15, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x41, 0x0a, + 0x0b, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x61, 0x67, 0x67, + 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x49, 0x64, 0x52, 0x0a, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x64, + 0x42, 0x2e, 0x5a, 0x2c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, + 0x6c, 0x67, 0x64, 0x2d, 0x64, 0x65, 0x76, 0x2f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2d, 0x61, + 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x70, 0x62, 0x3b, 0x70, 0x62, + 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pb/delete_resource.proto b/pb/delete_resource.proto index cfd8139a..b560a129 100644 --- a/pb/delete_resource.proto +++ b/pb/delete_resource.proto @@ -18,7 +18,7 @@ syntax = "proto3"; package service.pb; -import "resource-aggregate/pb/commands.proto"; +import "resource-aggregate/pb/resources.proto"; option go_package = "github.com/plgd-dev/client-application/pb;pb"; diff --git a/pb/disown_device.pb.go b/pb/disown_device.pb.go index efc49f56..0d70eaf7 100644 --- a/pb/disown_device.pb.go +++ b/pb/disown_device.pb.go @@ -16,8 +16,8 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.27.1 -// protoc v3.21.9 +// protoc-gen-go v1.30.0 +// protoc v4.22.3 // source: github.com/plgd-dev/client-application/pb/disown_device.proto package pb diff --git a/pb/get_configuration.go b/pb/get_configuration.go index e6dc8966..1fd367fc 100644 --- a/pb/get_configuration.go +++ b/pb/get_configuration.go @@ -58,17 +58,42 @@ func (c *RemoteProvisioning) Clone() *RemoteProvisioning { } } +func (c *BuildInfo) Clone() *BuildInfo { + if c == nil { + return nil + } + return &BuildInfo{ + Version: c.GetVersion(), + BuildDate: c.GetBuildDate(), + CommitHash: c.GetCommitHash(), + CommitDate: c.GetCommitDate(), + ReleaseUrl: c.GetReleaseUrl(), + } +} + +func NewGetConfigurationResponse(info *BuildInfo) *GetConfigurationResponse { + return &GetConfigurationResponse{ + BuildInfo: info, + Version: info.GetVersion(), + BuildDate: info.GetBuildDate(), + CommitHash: info.GetCommitHash(), + CommitDate: info.GetCommitDate(), + ReleaseUrl: info.GetReleaseUrl(), + } +} + func (r *GetConfigurationResponse) Clone() *GetConfigurationResponse { if r == nil { return nil } return &GetConfigurationResponse{ - Version: r.Version, - BuildDate: r.BuildDate, - CommitHash: r.CommitHash, - CommitDate: r.CommitDate, - ReleaseUrl: r.ReleaseUrl, + Version: r.GetBuildInfo().GetVersion(), + BuildDate: r.GetBuildInfo().GetBuildDate(), + CommitHash: r.GetBuildInfo().GetCommitHash(), + CommitDate: r.GetBuildInfo().GetCommitDate(), + ReleaseUrl: r.GetBuildInfo().GetReleaseUrl(), RemoteProvisioning: r.RemoteProvisioning.Clone(), + BuildInfo: r.GetBuildInfo().Clone(), } } diff --git a/pb/get_configuration.pb.go b/pb/get_configuration.pb.go index 43fb5ed4..9c6d5c2f 100644 --- a/pb/get_configuration.pb.go +++ b/pb/get_configuration.pb.go @@ -16,8 +16,8 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.27.1 -// protoc v3.21.9 +// protoc-gen-go v1.30.0 +// protoc v4.22.3 // source: github.com/plgd-dev/client-application/pb/get_configuration.proto package pb @@ -126,7 +126,7 @@ func (x GetConfigurationResponse_DeviceAuthenticationMode) Number() protoreflect // Deprecated: Use GetConfigurationResponse_DeviceAuthenticationMode.Descriptor instead. func (GetConfigurationResponse_DeviceAuthenticationMode) EnumDescriptor() ([]byte, []int) { - return file_github_com_plgd_dev_client_application_pb_get_configuration_proto_rawDescGZIP(), []int{3, 0} + return file_github_com_plgd_dev_client_application_pb_get_configuration_proto_rawDescGZIP(), []int{4, 0} } type GetConfigurationRequest struct { @@ -357,27 +357,112 @@ func (x *RemoteProvisioning) GetCaPool() []string { return nil } -type GetConfigurationResponse struct { +type BuildInfo struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Version string `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"` - BuildDate string `protobuf:"bytes,2,opt,name=build_date,json=buildDate,proto3" json:"build_date,omitempty"` + // version of the service + Version string `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"` + // build date of the service + BuildDate string `protobuf:"bytes,2,opt,name=build_date,json=buildDate,proto3" json:"build_date,omitempty"` + // commit hash of the service CommitHash string `protobuf:"bytes,3,opt,name=commit_hash,json=commitHash,proto3" json:"commit_hash,omitempty"` + // commit date of the service CommitDate string `protobuf:"bytes,4,opt,name=commit_date,json=commitDate,proto3" json:"commit_date,omitempty"` + // release url of the service ReleaseUrl string `protobuf:"bytes,5,opt,name=release_url,json=releaseUrl,proto3" json:"release_url,omitempty"` +} + +func (x *BuildInfo) Reset() { + *x = BuildInfo{} + if protoimpl.UnsafeEnabled { + mi := &file_github_com_plgd_dev_client_application_pb_get_configuration_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BuildInfo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BuildInfo) ProtoMessage() {} + +func (x *BuildInfo) ProtoReflect() protoreflect.Message { + mi := &file_github_com_plgd_dev_client_application_pb_get_configuration_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BuildInfo.ProtoReflect.Descriptor instead. +func (*BuildInfo) Descriptor() ([]byte, []int) { + return file_github_com_plgd_dev_client_application_pb_get_configuration_proto_rawDescGZIP(), []int{3} +} + +func (x *BuildInfo) GetVersion() string { + if x != nil { + return x.Version + } + return "" +} + +func (x *BuildInfo) GetBuildDate() string { + if x != nil { + return x.BuildDate + } + return "" +} + +func (x *BuildInfo) GetCommitHash() string { + if x != nil { + return x.CommitHash + } + return "" +} + +func (x *BuildInfo) GetCommitDate() string { + if x != nil { + return x.CommitDate + } + return "" +} + +func (x *BuildInfo) GetReleaseUrl() string { + if x != nil { + return x.ReleaseUrl + } + return "" +} + +type GetConfigurationResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Version string `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"` // deprecated, use build_info.version + BuildDate string `protobuf:"bytes,2,opt,name=build_date,json=buildDate,proto3" json:"build_date,omitempty"` // deprecated, use build_info.build_date + CommitHash string `protobuf:"bytes,3,opt,name=commit_hash,json=commitHash,proto3" json:"commit_hash,omitempty"` // deprecated, use build_info.commit_hash + CommitDate string `protobuf:"bytes,4,opt,name=commit_date,json=commitDate,proto3" json:"commit_date,omitempty"` // deprecated, use build_info.commit_date + ReleaseUrl string `protobuf:"bytes,5,opt,name=release_url,json=releaseUrl,proto3" json:"release_url,omitempty"` // deprecated, use build_info.release_url // user don't need to call initialize endpoint IsInitialized bool `protobuf:"varint,6,opt,name=is_initialized,json=isInitialized,proto3" json:"is_initialized,omitempty"` DeviceAuthenticationMode GetConfigurationResponse_DeviceAuthenticationMode `protobuf:"varint,7,opt,name=device_authentication_mode,json=deviceAuthenticationMode,proto3,enum=service.pb.GetConfigurationResponse_DeviceAuthenticationMode" json:"device_authentication_mode,omitempty"` RemoteProvisioning *RemoteProvisioning `protobuf:"bytes,8,opt,name=remote_provisioning,json=remoteProvisioning,proto3" json:"remote_provisioning,omitempty"` Owner string `protobuf:"bytes,9,opt,name=owner,proto3" json:"owner,omitempty"` + BuildInfo *BuildInfo `protobuf:"bytes,10,opt,name=build_info,json=buildInfo,proto3" json:"build_info,omitempty"` } func (x *GetConfigurationResponse) Reset() { *x = GetConfigurationResponse{} if protoimpl.UnsafeEnabled { - mi := &file_github_com_plgd_dev_client_application_pb_get_configuration_proto_msgTypes[3] + mi := &file_github_com_plgd_dev_client_application_pb_get_configuration_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -390,7 +475,7 @@ func (x *GetConfigurationResponse) String() string { func (*GetConfigurationResponse) ProtoMessage() {} func (x *GetConfigurationResponse) ProtoReflect() protoreflect.Message { - mi := &file_github_com_plgd_dev_client_application_pb_get_configuration_proto_msgTypes[3] + mi := &file_github_com_plgd_dev_client_application_pb_get_configuration_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -403,7 +488,7 @@ func (x *GetConfigurationResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use GetConfigurationResponse.ProtoReflect.Descriptor instead. func (*GetConfigurationResponse) Descriptor() ([]byte, []int) { - return file_github_com_plgd_dev_client_application_pb_get_configuration_proto_rawDescGZIP(), []int{3} + return file_github_com_plgd_dev_client_application_pb_get_configuration_proto_rawDescGZIP(), []int{4} } func (x *GetConfigurationResponse) GetVersion() string { @@ -469,6 +554,13 @@ func (x *GetConfigurationResponse) GetOwner() string { return "" } +func (x *GetConfigurationResponse) GetBuildInfo() *BuildInfo { + if x != nil { + return x.BuildInfo + } + return nil +} + var File_github_com_plgd_dev_client_application_pb_get_configuration_proto protoreflect.FileDescriptor var file_github_com_plgd_dev_client_application_pb_get_configuration_proto_rawDesc = []byte{ @@ -526,35 +618,49 @@ var file_github_com_plgd_dev_client_application_pb_get_configuration_proto_rawDe 0x64, 0x65, 0x12, 0x0d, 0x0a, 0x09, 0x4d, 0x4f, 0x44, 0x45, 0x5f, 0x4e, 0x4f, 0x4e, 0x45, 0x10, 0x00, 0x12, 0x0e, 0x0a, 0x0a, 0x55, 0x53, 0x45, 0x52, 0x5f, 0x41, 0x47, 0x45, 0x4e, 0x54, 0x10, 0x01, 0x4a, 0x04, 0x08, 0x03, 0x10, 0x04, 0x4a, 0x04, 0x08, 0x08, 0x10, 0x09, 0x4a, 0x04, 0x08, - 0x0a, 0x10, 0x0b, 0x22, 0xfb, 0x03, 0x0a, 0x18, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1d, 0x0a, 0x0a, 0x62, 0x75, - 0x69, 0x6c, 0x64, 0x5f, 0x64, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, - 0x62, 0x75, 0x69, 0x6c, 0x64, 0x44, 0x61, 0x74, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x63, 0x6f, 0x6d, - 0x6d, 0x69, 0x74, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, - 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x48, 0x61, 0x73, 0x68, 0x12, 0x1f, 0x0a, 0x0b, 0x63, 0x6f, - 0x6d, 0x6d, 0x69, 0x74, 0x5f, 0x64, 0x61, 0x74, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0a, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x44, 0x61, 0x74, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x72, - 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0a, 0x72, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x55, 0x72, 0x6c, 0x12, 0x25, 0x0a, 0x0e, - 0x69, 0x73, 0x5f, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x18, 0x06, - 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x69, 0x73, 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x69, - 0x7a, 0x65, 0x64, 0x12, 0x7b, 0x0a, 0x1a, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x61, 0x75, - 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x6f, 0x64, - 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x3d, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, - 0x65, 0x2e, 0x70, 0x62, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x44, 0x65, - 0x76, 0x69, 0x63, 0x65, 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x4d, 0x6f, 0x64, 0x65, 0x52, 0x18, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x41, 0x75, + 0x0a, 0x10, 0x0b, 0x22, 0xa7, 0x01, 0x0a, 0x09, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x49, 0x6e, 0x66, + 0x6f, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1d, 0x0a, 0x0a, 0x62, + 0x75, 0x69, 0x6c, 0x64, 0x5f, 0x64, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x09, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x44, 0x61, 0x74, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x63, 0x6f, + 0x6d, 0x6d, 0x69, 0x74, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0a, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x48, 0x61, 0x73, 0x68, 0x12, 0x1f, 0x0a, 0x0b, 0x63, + 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x5f, 0x64, 0x61, 0x74, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0a, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x44, 0x61, 0x74, 0x65, 0x12, 0x1f, 0x0a, 0x0b, + 0x72, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0a, 0x72, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x55, 0x72, 0x6c, 0x22, 0xb1, 0x04, + 0x0a, 0x18, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, + 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, + 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1d, 0x0a, 0x0a, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x5f, 0x64, 0x61, + 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x44, + 0x61, 0x74, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x5f, 0x68, 0x61, + 0x73, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, + 0x48, 0x61, 0x73, 0x68, 0x12, 0x1f, 0x0a, 0x0b, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x5f, 0x64, + 0x61, 0x74, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x6f, 0x6d, 0x6d, 0x69, + 0x74, 0x44, 0x61, 0x74, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x72, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, + 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x72, 0x65, 0x6c, 0x65, + 0x61, 0x73, 0x65, 0x55, 0x72, 0x6c, 0x12, 0x25, 0x0a, 0x0e, 0x69, 0x73, 0x5f, 0x69, 0x6e, 0x69, + 0x74, 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, + 0x69, 0x73, 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x12, 0x7b, 0x0a, + 0x1a, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, + 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, + 0x0e, 0x32, 0x3d, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x62, 0x2e, 0x47, + 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x6f, 0x64, 0x65, - 0x12, 0x4f, 0x0a, 0x13, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x5f, 0x70, 0x72, 0x6f, 0x76, 0x69, - 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, - 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x74, - 0x65, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x52, 0x12, 0x72, - 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, - 0x67, 0x12, 0x14, 0x0a, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x22, 0x38, 0x0a, 0x18, 0x44, 0x65, 0x76, 0x69, 0x63, + 0x52, 0x18, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, + 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x4f, 0x0a, 0x13, 0x72, 0x65, + 0x6d, 0x6f, 0x74, 0x65, 0x5f, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, + 0x67, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x76, 0x69, + 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x52, 0x12, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x50, + 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x12, 0x14, 0x0a, 0x05, 0x6f, + 0x77, 0x6e, 0x65, 0x72, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6f, 0x77, 0x6e, 0x65, + 0x72, 0x12, 0x34, 0x0a, 0x0a, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, + 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, + 0x70, 0x62, 0x2e, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x09, 0x62, 0x75, + 0x69, 0x6c, 0x64, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x38, 0x0a, 0x18, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x12, 0x0a, 0x0e, 0x50, 0x52, 0x45, 0x5f, 0x53, 0x48, 0x41, 0x52, 0x45, 0x44, 0x5f, 0x4b, 0x45, 0x59, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x58, 0x35, 0x30, 0x39, 0x10, @@ -577,29 +683,31 @@ func file_github_com_plgd_dev_client_application_pb_get_configuration_proto_rawD } var file_github_com_plgd_dev_client_application_pb_get_configuration_proto_enumTypes = make([]protoimpl.EnumInfo, 2) -var file_github_com_plgd_dev_client_application_pb_get_configuration_proto_msgTypes = make([]protoimpl.MessageInfo, 4) +var file_github_com_plgd_dev_client_application_pb_get_configuration_proto_msgTypes = make([]protoimpl.MessageInfo, 5) var file_github_com_plgd_dev_client_application_pb_get_configuration_proto_goTypes = []interface{}{ (RemoteProvisioning_Mode)(0), // 0: service.pb.RemoteProvisioning.Mode (GetConfigurationResponse_DeviceAuthenticationMode)(0), // 1: service.pb.GetConfigurationResponse.DeviceAuthenticationMode (*GetConfigurationRequest)(nil), // 2: service.pb.GetConfigurationRequest (*UserAgent)(nil), // 3: service.pb.UserAgent (*RemoteProvisioning)(nil), // 4: service.pb.RemoteProvisioning - (*GetConfigurationResponse)(nil), // 5: service.pb.GetConfigurationResponse - (*pb.WebOAuthClient)(nil), // 6: grpcgateway.pb.WebOAuthClient - (*pb.DeviceOAuthClient)(nil), // 7: grpcgateway.pb.DeviceOAuthClient + (*BuildInfo)(nil), // 5: service.pb.BuildInfo + (*GetConfigurationResponse)(nil), // 6: service.pb.GetConfigurationResponse + (*pb.WebOAuthClient)(nil), // 7: grpcgateway.pb.WebOAuthClient + (*pb.DeviceOAuthClient)(nil), // 8: grpcgateway.pb.DeviceOAuthClient } var file_github_com_plgd_dev_client_application_pb_get_configuration_proto_depIdxs = []int32{ - 6, // 0: service.pb.RemoteProvisioning.web_oauth_client:type_name -> grpcgateway.pb.WebOAuthClient - 7, // 1: service.pb.RemoteProvisioning.device_oauth_client:type_name -> grpcgateway.pb.DeviceOAuthClient + 7, // 0: service.pb.RemoteProvisioning.web_oauth_client:type_name -> grpcgateway.pb.WebOAuthClient + 8, // 1: service.pb.RemoteProvisioning.device_oauth_client:type_name -> grpcgateway.pb.DeviceOAuthClient 0, // 2: service.pb.RemoteProvisioning.mode:type_name -> service.pb.RemoteProvisioning.Mode 3, // 3: service.pb.RemoteProvisioning.user_agent:type_name -> service.pb.UserAgent 1, // 4: service.pb.GetConfigurationResponse.device_authentication_mode:type_name -> service.pb.GetConfigurationResponse.DeviceAuthenticationMode 4, // 5: service.pb.GetConfigurationResponse.remote_provisioning:type_name -> service.pb.RemoteProvisioning - 6, // [6:6] is the sub-list for method output_type - 6, // [6:6] is the sub-list for method input_type - 6, // [6:6] is the sub-list for extension type_name - 6, // [6:6] is the sub-list for extension extendee - 0, // [0:6] is the sub-list for field type_name + 5, // 6: service.pb.GetConfigurationResponse.build_info:type_name -> service.pb.BuildInfo + 7, // [7:7] is the sub-list for method output_type + 7, // [7:7] is the sub-list for method input_type + 7, // [7:7] is the sub-list for extension type_name + 7, // [7:7] is the sub-list for extension extendee + 0, // [0:7] is the sub-list for field type_name } func init() { file_github_com_plgd_dev_client_application_pb_get_configuration_proto_init() } @@ -645,6 +753,18 @@ func file_github_com_plgd_dev_client_application_pb_get_configuration_proto_init } } file_github_com_plgd_dev_client_application_pb_get_configuration_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BuildInfo); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_github_com_plgd_dev_client_application_pb_get_configuration_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GetConfigurationResponse); i { case 0: return &v.state @@ -663,7 +783,7 @@ func file_github_com_plgd_dev_client_application_pb_get_configuration_proto_init GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_github_com_plgd_dev_client_application_pb_get_configuration_proto_rawDesc, NumEnums: 2, - NumMessages: 4, + NumMessages: 5, NumExtensions: 0, NumServices: 0, }, diff --git a/pb/get_configuration.proto b/pb/get_configuration.proto index 5eb67aa3..823ad448 100644 --- a/pb/get_configuration.proto +++ b/pb/get_configuration.proto @@ -61,20 +61,33 @@ message RemoteProvisioning { //int64 default_command_time_to_live = 8; } +message BuildInfo { + // version of the service + string version = 1; + // build date of the service + string build_date = 2; + // commit hash of the service + string commit_hash = 3; + // commit date of the service + string commit_date = 4; + // release url of the service + string release_url = 5; +} message GetConfigurationResponse { enum DeviceAuthenticationMode { PRE_SHARED_KEY = 0; X509 = 1; }; - string version = 1; - string build_date = 2; - string commit_hash = 3; - string commit_date = 4; - string release_url = 5; + string version = 1; // deprecated, use build_info.version + string build_date = 2; // deprecated, use build_info.build_date + string commit_hash = 3; // deprecated, use build_info.commit_hash + string commit_date = 4; // deprecated, use build_info.commit_date + string release_url = 5; // deprecated, use build_info.release_url // user don't need to call initialize endpoint bool is_initialized = 6; DeviceAuthenticationMode device_authentication_mode = 7; RemoteProvisioning remote_provisioning = 8; string owner = 9; + BuildInfo build_info = 10; } \ No newline at end of file diff --git a/pb/get_device.pb.go b/pb/get_device.pb.go index 9ac08ce4..9969fd35 100644 --- a/pb/get_device.pb.go +++ b/pb/get_device.pb.go @@ -16,8 +16,8 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.27.1 -// protoc v3.21.9 +// protoc-gen-go v1.30.0 +// protoc v4.22.3 // source: github.com/plgd-dev/client-application/pb/get_device.proto package pb diff --git a/pb/get_device_resource_links.pb.go b/pb/get_device_resource_links.pb.go index afe7132c..a9151f19 100644 --- a/pb/get_device_resource_links.pb.go +++ b/pb/get_device_resource_links.pb.go @@ -16,8 +16,8 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.27.1 -// protoc v3.21.9 +// protoc-gen-go v1.30.0 +// protoc v4.22.3 // source: github.com/plgd-dev/client-application/pb/get_device_resource_links.proto package pb diff --git a/pb/get_devices.pb.go b/pb/get_devices.pb.go index 515943ed..8a8c126e 100644 --- a/pb/get_devices.pb.go +++ b/pb/get_devices.pb.go @@ -16,8 +16,8 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.27.1 -// protoc v3.21.9 +// protoc-gen-go v1.30.0 +// protoc v4.22.3 // source: github.com/plgd-dev/client-application/pb/get_devices.proto package pb diff --git a/pb/get_identity_certificate.pb.go b/pb/get_identity_certificate.pb.go index 9dcc18c8..92901c58 100644 --- a/pb/get_identity_certificate.pb.go +++ b/pb/get_identity_certificate.pb.go @@ -16,8 +16,8 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.27.1 -// protoc v3.21.9 +// protoc-gen-go v1.30.0 +// protoc v4.22.3 // source: github.com/plgd-dev/client-application/pb/get_identity_certificate.proto package pb diff --git a/pb/get_json_web_keys.pb.go b/pb/get_json_web_keys.pb.go index e7677376..7603cd59 100644 --- a/pb/get_json_web_keys.pb.go +++ b/pb/get_json_web_keys.pb.go @@ -16,8 +16,8 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.27.1 -// protoc v3.21.9 +// protoc-gen-go v1.30.0 +// protoc v4.22.3 // source: github.com/plgd-dev/client-application/pb/get_json_web_keys.proto package pb diff --git a/pb/get_resource.pb.go b/pb/get_resource.pb.go index 65b8e80d..c9386406 100644 --- a/pb/get_resource.pb.go +++ b/pb/get_resource.pb.go @@ -16,8 +16,8 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.27.1 -// protoc v3.21.9 +// protoc-gen-go v1.30.0 +// protoc v4.22.3 // source: github.com/plgd-dev/client-application/pb/get_resource.proto package pb @@ -99,22 +99,22 @@ var file_github_com_plgd_dev_client_application_pb_get_resource_proto_rawDesc = 0x64, 0x2d, 0x64, 0x65, 0x76, 0x2f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2d, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x70, 0x62, 0x2f, 0x67, 0x65, 0x74, 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0a, - 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x62, 0x1a, 0x24, 0x72, 0x65, 0x73, 0x6f, + 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x62, 0x1a, 0x25, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2d, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x2f, 0x70, - 0x62, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x22, 0x86, 0x01, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x41, 0x0a, 0x0b, 0x72, 0x65, 0x73, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x72, - 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, - 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x64, 0x52, 0x0a, - 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x64, 0x12, 0x2d, 0x0a, 0x12, 0x72, 0x65, - 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x49, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x42, 0x2e, 0x5a, 0x2c, 0x67, 0x69, 0x74, - 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x6c, 0x67, 0x64, 0x2d, 0x64, 0x65, 0x76, - 0x2f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2d, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x2f, 0x70, 0x62, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x33, + 0x62, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x22, 0x86, 0x01, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x41, 0x0a, 0x0b, 0x72, 0x65, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, + 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, + 0x65, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x64, 0x52, + 0x0a, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x64, 0x12, 0x2d, 0x0a, 0x12, 0x72, + 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x42, 0x2e, 0x5a, 0x2c, 0x67, 0x69, + 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x6c, 0x67, 0x64, 0x2d, 0x64, 0x65, + 0x76, 0x2f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2d, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x70, 0x62, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, } var ( diff --git a/pb/get_resource.proto b/pb/get_resource.proto index 68135a48..28040c02 100644 --- a/pb/get_resource.proto +++ b/pb/get_resource.proto @@ -18,7 +18,7 @@ syntax = "proto3"; package service.pb; -import "resource-aggregate/pb/commands.proto"; +import "resource-aggregate/pb/resources.proto"; option go_package = "github.com/plgd-dev/client-application/pb;pb"; diff --git a/pb/initialize.pb.go b/pb/initialize.pb.go index 7f5462f4..cb081fd7 100644 --- a/pb/initialize.pb.go +++ b/pb/initialize.pb.go @@ -16,8 +16,8 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.27.1 -// protoc v3.21.9 +// protoc-gen-go v1.30.0 +// protoc v4.22.3 // source: github.com/plgd-dev/client-application/pb/initialize.proto package pb @@ -145,8 +145,8 @@ func (x *InitializeX509) GetCertificate() string { // The client application must be initialized when GetConfigurationResponse.is_initialized is set to false. // The initialization depends on the GetConfigurationResponse.device_authentication_mode. // For: -// - PRE_SHARED_KEY - pre_shared_key values need to be set. -// - X509 - jwks need to be set only if GetConfigurationResponse.remote_provisioning.mode is set to USER_AGENT +// - PRE_SHARED_KEY - pre_shared_key values need to be set. +// - X509 - jwks need to be set only if GetConfigurationResponse.remote_provisioning.mode is set to USER_AGENT type InitializeRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache diff --git a/pb/offboard_device.pb.go b/pb/offboard_device.pb.go index dcffa745..7a0e5d16 100644 --- a/pb/offboard_device.pb.go +++ b/pb/offboard_device.pb.go @@ -16,8 +16,8 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.27.1 -// protoc v3.21.9 +// protoc-gen-go v1.30.0 +// protoc v4.22.3 // source: github.com/plgd-dev/client-application/pb/offboard_device.proto package pb diff --git a/pb/onboard_device.pb.go b/pb/onboard_device.pb.go index 09b92b45..4331587c 100644 --- a/pb/onboard_device.pb.go +++ b/pb/onboard_device.pb.go @@ -16,8 +16,8 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.27.1 -// protoc v3.21.9 +// protoc-gen-go v1.30.0 +// protoc v4.22.3 // source: github.com/plgd-dev/client-application/pb/onboard_device.proto package pb diff --git a/pb/own_device.pb.go b/pb/own_device.pb.go index fb5f2bfc..80fb7f8c 100644 --- a/pb/own_device.pb.go +++ b/pb/own_device.pb.go @@ -16,8 +16,8 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.27.1 -// protoc v3.21.9 +// protoc-gen-go v1.30.0 +// protoc v4.22.3 // source: github.com/plgd-dev/client-application/pb/own_device.proto package pb diff --git a/pb/reset.pb.go b/pb/reset.pb.go index a8eb1b08..97a5feef 100644 --- a/pb/reset.pb.go +++ b/pb/reset.pb.go @@ -16,8 +16,8 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.27.1 -// protoc v3.21.9 +// protoc-gen-go v1.30.0 +// protoc v4.22.3 // source: github.com/plgd-dev/client-application/pb/reset.proto package pb diff --git a/pb/service.pb.gw.go b/pb/service.pb.gw.go index a6461e44..4f009610 100644 --- a/pb/service.pb.gw.go +++ b/pb/service.pb.gw.go @@ -164,7 +164,7 @@ func local_request_ClientApplication_GetDeviceResourceLinks_0(ctx context.Contex } var ( - filter_ClientApplication_GetResource_0 = &utilities.DoubleArray{Encoding: map[string]int{"resource_id": 0, "device_id": 1, "href": 2}, Base: []int{1, 1, 1, 2, 0, 0}, Check: []int{0, 1, 2, 2, 3, 4}} + filter_ClientApplication_GetResource_0 = &utilities.DoubleArray{Encoding: map[string]int{"resource_id": 0, "device_id": 1, "deviceId": 2, "href": 3}, Base: []int{1, 3, 1, 4, 5, 0, 3, 0, 0, 0}, Check: []int{0, 1, 2, 1, 1, 3, 2, 7, 4, 5}} ) func request_ClientApplication_GetResource_0(ctx context.Context, marshaler runtime.Marshaler, client ClientApplicationClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -254,7 +254,7 @@ func local_request_ClientApplication_GetResource_0(ctx context.Context, marshale } var ( - filter_ClientApplication_UpdateResource_0 = &utilities.DoubleArray{Encoding: map[string]int{"content": 0, "resource_id": 1, "device_id": 2, "href": 3}, Base: []int{1, 1, 1, 2, 3, 0, 0, 0}, Check: []int{0, 1, 1, 3, 3, 2, 4, 5}} + filter_ClientApplication_UpdateResource_0 = &utilities.DoubleArray{Encoding: map[string]int{"content": 0, "resource_id": 1, "device_id": 2, "deviceId": 3, "href": 4}, Base: []int{1, 2, 5, 3, 6, 7, 0, 0, 0, 5, 0, 0, 0}, Check: []int{0, 1, 1, 3, 1, 1, 2, 2, 4, 3, 10, 5, 6}} ) func request_ClientApplication_UpdateResource_0(ctx context.Context, marshaler runtime.Marshaler, client ClientApplicationClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -360,7 +360,7 @@ func local_request_ClientApplication_UpdateResource_0(ctx context.Context, marsh } var ( - filter_ClientApplication_CreateResource_0 = &utilities.DoubleArray{Encoding: map[string]int{"content": 0, "resource_id": 1, "device_id": 2, "href": 3}, Base: []int{1, 1, 1, 2, 3, 0, 0, 0}, Check: []int{0, 1, 1, 3, 3, 2, 4, 5}} + filter_ClientApplication_CreateResource_0 = &utilities.DoubleArray{Encoding: map[string]int{"content": 0, "resource_id": 1, "device_id": 2, "deviceId": 3, "href": 4}, Base: []int{1, 2, 5, 3, 6, 7, 0, 0, 0, 5, 0, 0, 0}, Check: []int{0, 1, 1, 3, 1, 1, 2, 2, 4, 3, 10, 5, 6}} ) func request_ClientApplication_CreateResource_0(ctx context.Context, marshaler runtime.Marshaler, client ClientApplicationClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -466,7 +466,7 @@ func local_request_ClientApplication_CreateResource_0(ctx context.Context, marsh } var ( - filter_ClientApplication_DeleteResource_0 = &utilities.DoubleArray{Encoding: map[string]int{"resource_id": 0, "device_id": 1, "href": 2}, Base: []int{1, 1, 1, 2, 0, 0}, Check: []int{0, 1, 2, 2, 3, 4}} + filter_ClientApplication_DeleteResource_0 = &utilities.DoubleArray{Encoding: map[string]int{"resource_id": 0, "device_id": 1, "deviceId": 2, "href": 3}, Base: []int{1, 3, 1, 4, 5, 0, 3, 0, 0, 0}, Check: []int{0, 1, 2, 1, 1, 3, 2, 7, 4, 5}} ) func request_ClientApplication_DeleteResource_0(ctx context.Context, marshaler runtime.Marshaler, client ClientApplicationClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -1110,20 +1110,22 @@ func RegisterClientApplicationHandlerServer(ctx context.Context, mux *runtime.Se var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/service.pb.ClientApplication/GetDevice", runtime.WithHTTPPathPattern("/api/v1/devices/{device_id}")) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/service.pb.ClientApplication/GetDevice", runtime.WithHTTPPathPattern("/api/v1/devices/{device_id}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_ClientApplication_GetDevice_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_ClientApplication_GetDevice_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_ClientApplication_GetDevice_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_ClientApplication_GetDevice_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -1133,20 +1135,22 @@ func RegisterClientApplicationHandlerServer(ctx context.Context, mux *runtime.Se var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/service.pb.ClientApplication/GetDeviceResourceLinks", runtime.WithHTTPPathPattern("/api/v1/devices/{device_id}/resource-links")) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/service.pb.ClientApplication/GetDeviceResourceLinks", runtime.WithHTTPPathPattern("/api/v1/devices/{device_id}/resource-links")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_ClientApplication_GetDeviceResourceLinks_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_ClientApplication_GetDeviceResourceLinks_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_ClientApplication_GetDeviceResourceLinks_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_ClientApplication_GetDeviceResourceLinks_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -1156,20 +1160,22 @@ func RegisterClientApplicationHandlerServer(ctx context.Context, mux *runtime.Se var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/service.pb.ClientApplication/GetResource", runtime.WithHTTPPathPattern("/api/v1/devices/{resource_id.device_id}/resources/{resource_id.href=**}")) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/service.pb.ClientApplication/GetResource", runtime.WithHTTPPathPattern("/api/v1/devices/{resource_id.device_id}/resources/{resource_id.href=**}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_ClientApplication_GetResource_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_ClientApplication_GetResource_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_ClientApplication_GetResource_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_ClientApplication_GetResource_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -1179,20 +1185,22 @@ func RegisterClientApplicationHandlerServer(ctx context.Context, mux *runtime.Se var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/service.pb.ClientApplication/UpdateResource", runtime.WithHTTPPathPattern("/api/v1/devices/{resource_id.device_id}/resources/{resource_id.href=**}")) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/service.pb.ClientApplication/UpdateResource", runtime.WithHTTPPathPattern("/api/v1/devices/{resource_id.device_id}/resources/{resource_id.href=**}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_ClientApplication_UpdateResource_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_ClientApplication_UpdateResource_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_ClientApplication_UpdateResource_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_ClientApplication_UpdateResource_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -1202,20 +1210,22 @@ func RegisterClientApplicationHandlerServer(ctx context.Context, mux *runtime.Se var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/service.pb.ClientApplication/CreateResource", runtime.WithHTTPPathPattern("/api/v1/devices/{resource_id.device_id}/resource-links/{resource_id.href=**}")) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/service.pb.ClientApplication/CreateResource", runtime.WithHTTPPathPattern("/api/v1/devices/{resource_id.device_id}/resource-links/{resource_id.href=**}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_ClientApplication_CreateResource_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_ClientApplication_CreateResource_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_ClientApplication_CreateResource_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_ClientApplication_CreateResource_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -1225,20 +1235,22 @@ func RegisterClientApplicationHandlerServer(ctx context.Context, mux *runtime.Se var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/service.pb.ClientApplication/DeleteResource", runtime.WithHTTPPathPattern("/api/v1/devices/{resource_id.device_id}/resource-links/{resource_id.href=**}")) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/service.pb.ClientApplication/DeleteResource", runtime.WithHTTPPathPattern("/api/v1/devices/{resource_id.device_id}/resource-links/{resource_id.href=**}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_ClientApplication_DeleteResource_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_ClientApplication_DeleteResource_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_ClientApplication_DeleteResource_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_ClientApplication_DeleteResource_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -1248,20 +1260,22 @@ func RegisterClientApplicationHandlerServer(ctx context.Context, mux *runtime.Se var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/service.pb.ClientApplication/OwnDevice", runtime.WithHTTPPathPattern("/api/v1/devices/{device_id}/own")) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/service.pb.ClientApplication/OwnDevice", runtime.WithHTTPPathPattern("/api/v1/devices/{device_id}/own")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_ClientApplication_OwnDevice_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_ClientApplication_OwnDevice_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_ClientApplication_OwnDevice_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_ClientApplication_OwnDevice_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -1271,20 +1285,22 @@ func RegisterClientApplicationHandlerServer(ctx context.Context, mux *runtime.Se var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/service.pb.ClientApplication/FinishOwnDevice", runtime.WithHTTPPathPattern("/api/v1/devices/{device_id}/own/{state}")) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/service.pb.ClientApplication/FinishOwnDevice", runtime.WithHTTPPathPattern("/api/v1/devices/{device_id}/own/{state}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_ClientApplication_FinishOwnDevice_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_ClientApplication_FinishOwnDevice_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_ClientApplication_FinishOwnDevice_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_ClientApplication_FinishOwnDevice_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -1294,20 +1310,22 @@ func RegisterClientApplicationHandlerServer(ctx context.Context, mux *runtime.Se var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/service.pb.ClientApplication/DisownDevice", runtime.WithHTTPPathPattern("/api/v1/devices/{device_id}/disown")) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/service.pb.ClientApplication/DisownDevice", runtime.WithHTTPPathPattern("/api/v1/devices/{device_id}/disown")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_ClientApplication_DisownDevice_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_ClientApplication_DisownDevice_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_ClientApplication_DisownDevice_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_ClientApplication_DisownDevice_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -1317,20 +1335,22 @@ func RegisterClientApplicationHandlerServer(ctx context.Context, mux *runtime.Se var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/service.pb.ClientApplication/ClearCache", runtime.WithHTTPPathPattern("/api/v1/devices")) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/service.pb.ClientApplication/ClearCache", runtime.WithHTTPPathPattern("/api/v1/devices")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_ClientApplication_ClearCache_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_ClientApplication_ClearCache_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_ClientApplication_ClearCache_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_ClientApplication_ClearCache_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -1340,20 +1360,22 @@ func RegisterClientApplicationHandlerServer(ctx context.Context, mux *runtime.Se var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/service.pb.ClientApplication/GetConfiguration", runtime.WithHTTPPathPattern("/.well-known/configuration")) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/service.pb.ClientApplication/GetConfiguration", runtime.WithHTTPPathPattern("/.well-known/configuration")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_ClientApplication_GetConfiguration_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_ClientApplication_GetConfiguration_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_ClientApplication_GetConfiguration_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_ClientApplication_GetConfiguration_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -1363,20 +1385,22 @@ func RegisterClientApplicationHandlerServer(ctx context.Context, mux *runtime.Se var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/service.pb.ClientApplication/GetJSONWebKeys", runtime.WithHTTPPathPattern("/.well-known/jwks.json")) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/service.pb.ClientApplication/GetJSONWebKeys", runtime.WithHTTPPathPattern("/.well-known/jwks.json")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_ClientApplication_GetJSONWebKeys_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_ClientApplication_GetJSONWebKeys_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_ClientApplication_GetJSONWebKeys_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_ClientApplication_GetJSONWebKeys_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -1386,20 +1410,22 @@ func RegisterClientApplicationHandlerServer(ctx context.Context, mux *runtime.Se var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/service.pb.ClientApplication/GetIdentityCertificate", runtime.WithHTTPPathPattern("/api/v1/identity/certificate")) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/service.pb.ClientApplication/GetIdentityCertificate", runtime.WithHTTPPathPattern("/api/v1/identity/certificate")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_ClientApplication_GetIdentityCertificate_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_ClientApplication_GetIdentityCertificate_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_ClientApplication_GetIdentityCertificate_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_ClientApplication_GetIdentityCertificate_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -1409,20 +1435,22 @@ func RegisterClientApplicationHandlerServer(ctx context.Context, mux *runtime.Se var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/service.pb.ClientApplication/Initialize", runtime.WithHTTPPathPattern("/api/v1/initialize")) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/service.pb.ClientApplication/Initialize", runtime.WithHTTPPathPattern("/api/v1/initialize")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_ClientApplication_Initialize_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_ClientApplication_Initialize_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_ClientApplication_Initialize_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_ClientApplication_Initialize_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -1432,20 +1460,22 @@ func RegisterClientApplicationHandlerServer(ctx context.Context, mux *runtime.Se var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/service.pb.ClientApplication/FinishInitialize", runtime.WithHTTPPathPattern("/api/v1/initialize/{state}")) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/service.pb.ClientApplication/FinishInitialize", runtime.WithHTTPPathPattern("/api/v1/initialize/{state}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_ClientApplication_FinishInitialize_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_ClientApplication_FinishInitialize_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_ClientApplication_FinishInitialize_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_ClientApplication_FinishInitialize_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -1455,20 +1485,22 @@ func RegisterClientApplicationHandlerServer(ctx context.Context, mux *runtime.Se var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/service.pb.ClientApplication/Reset", runtime.WithHTTPPathPattern("/api/v1/reset")) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/service.pb.ClientApplication/Reset", runtime.WithHTTPPathPattern("/api/v1/reset")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_ClientApplication_Reset_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_ClientApplication_Reset_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_ClientApplication_Reset_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_ClientApplication_Reset_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -1478,20 +1510,22 @@ func RegisterClientApplicationHandlerServer(ctx context.Context, mux *runtime.Se var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/service.pb.ClientApplication/OnboardDevice", runtime.WithHTTPPathPattern("/api/v1/devices/{device_id}/onboard")) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/service.pb.ClientApplication/OnboardDevice", runtime.WithHTTPPathPattern("/api/v1/devices/{device_id}/onboard")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_ClientApplication_OnboardDevice_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_ClientApplication_OnboardDevice_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_ClientApplication_OnboardDevice_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_ClientApplication_OnboardDevice_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -1501,20 +1535,22 @@ func RegisterClientApplicationHandlerServer(ctx context.Context, mux *runtime.Se var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/service.pb.ClientApplication/OffboardDevice", runtime.WithHTTPPathPattern("/api/v1/devices/{device_id}/offboard")) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/service.pb.ClientApplication/OffboardDevice", runtime.WithHTTPPathPattern("/api/v1/devices/{device_id}/offboard")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_ClientApplication_OffboardDevice_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_ClientApplication_OffboardDevice_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_ClientApplication_OffboardDevice_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_ClientApplication_OffboardDevice_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -1524,7 +1560,7 @@ func RegisterClientApplicationHandlerServer(ctx context.Context, mux *runtime.Se // RegisterClientApplicationHandlerFromEndpoint is same as RegisterClientApplicationHandler but // automatically dials to "endpoint" and closes the connection when "ctx" gets done. func RegisterClientApplicationHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { - conn, err := grpc.Dial(endpoint, opts...) + conn, err := grpc.DialContext(ctx, endpoint, opts...) if err != nil { return err } @@ -1563,19 +1599,21 @@ func RegisterClientApplicationHandlerClient(ctx context.Context, mux *runtime.Se ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req, "/service.pb.ClientApplication/GetDevices", runtime.WithHTTPPathPattern("/api/v1/devices")) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/service.pb.ClientApplication/GetDevices", runtime.WithHTTPPathPattern("/api/v1/devices")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_ClientApplication_GetDevices_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_ClientApplication_GetDevices_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_ClientApplication_GetDevices_0(ctx, mux, outboundMarshaler, w, req, func() (proto.Message, error) { return resp.Recv() }, mux.GetForwardResponseOptions()...) + forward_ClientApplication_GetDevices_0(annotatedContext, mux, outboundMarshaler, w, req, func() (proto.Message, error) { return resp.Recv() }, mux.GetForwardResponseOptions()...) }) @@ -1583,19 +1621,21 @@ func RegisterClientApplicationHandlerClient(ctx context.Context, mux *runtime.Se ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req, "/service.pb.ClientApplication/GetDevice", runtime.WithHTTPPathPattern("/api/v1/devices/{device_id}")) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/service.pb.ClientApplication/GetDevice", runtime.WithHTTPPathPattern("/api/v1/devices/{device_id}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_ClientApplication_GetDevice_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_ClientApplication_GetDevice_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_ClientApplication_GetDevice_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_ClientApplication_GetDevice_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -1603,19 +1643,21 @@ func RegisterClientApplicationHandlerClient(ctx context.Context, mux *runtime.Se ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req, "/service.pb.ClientApplication/GetDeviceResourceLinks", runtime.WithHTTPPathPattern("/api/v1/devices/{device_id}/resource-links")) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/service.pb.ClientApplication/GetDeviceResourceLinks", runtime.WithHTTPPathPattern("/api/v1/devices/{device_id}/resource-links")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_ClientApplication_GetDeviceResourceLinks_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_ClientApplication_GetDeviceResourceLinks_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_ClientApplication_GetDeviceResourceLinks_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_ClientApplication_GetDeviceResourceLinks_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -1623,19 +1665,21 @@ func RegisterClientApplicationHandlerClient(ctx context.Context, mux *runtime.Se ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req, "/service.pb.ClientApplication/GetResource", runtime.WithHTTPPathPattern("/api/v1/devices/{resource_id.device_id}/resources/{resource_id.href=**}")) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/service.pb.ClientApplication/GetResource", runtime.WithHTTPPathPattern("/api/v1/devices/{resource_id.device_id}/resources/{resource_id.href=**}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_ClientApplication_GetResource_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_ClientApplication_GetResource_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_ClientApplication_GetResource_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_ClientApplication_GetResource_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -1643,19 +1687,21 @@ func RegisterClientApplicationHandlerClient(ctx context.Context, mux *runtime.Se ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req, "/service.pb.ClientApplication/UpdateResource", runtime.WithHTTPPathPattern("/api/v1/devices/{resource_id.device_id}/resources/{resource_id.href=**}")) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/service.pb.ClientApplication/UpdateResource", runtime.WithHTTPPathPattern("/api/v1/devices/{resource_id.device_id}/resources/{resource_id.href=**}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_ClientApplication_UpdateResource_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_ClientApplication_UpdateResource_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_ClientApplication_UpdateResource_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_ClientApplication_UpdateResource_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -1663,19 +1709,21 @@ func RegisterClientApplicationHandlerClient(ctx context.Context, mux *runtime.Se ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req, "/service.pb.ClientApplication/CreateResource", runtime.WithHTTPPathPattern("/api/v1/devices/{resource_id.device_id}/resource-links/{resource_id.href=**}")) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/service.pb.ClientApplication/CreateResource", runtime.WithHTTPPathPattern("/api/v1/devices/{resource_id.device_id}/resource-links/{resource_id.href=**}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_ClientApplication_CreateResource_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_ClientApplication_CreateResource_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_ClientApplication_CreateResource_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_ClientApplication_CreateResource_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -1683,19 +1731,21 @@ func RegisterClientApplicationHandlerClient(ctx context.Context, mux *runtime.Se ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req, "/service.pb.ClientApplication/DeleteResource", runtime.WithHTTPPathPattern("/api/v1/devices/{resource_id.device_id}/resource-links/{resource_id.href=**}")) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/service.pb.ClientApplication/DeleteResource", runtime.WithHTTPPathPattern("/api/v1/devices/{resource_id.device_id}/resource-links/{resource_id.href=**}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_ClientApplication_DeleteResource_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_ClientApplication_DeleteResource_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_ClientApplication_DeleteResource_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_ClientApplication_DeleteResource_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -1703,19 +1753,21 @@ func RegisterClientApplicationHandlerClient(ctx context.Context, mux *runtime.Se ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req, "/service.pb.ClientApplication/OwnDevice", runtime.WithHTTPPathPattern("/api/v1/devices/{device_id}/own")) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/service.pb.ClientApplication/OwnDevice", runtime.WithHTTPPathPattern("/api/v1/devices/{device_id}/own")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_ClientApplication_OwnDevice_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_ClientApplication_OwnDevice_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_ClientApplication_OwnDevice_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_ClientApplication_OwnDevice_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -1723,19 +1775,21 @@ func RegisterClientApplicationHandlerClient(ctx context.Context, mux *runtime.Se ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req, "/service.pb.ClientApplication/FinishOwnDevice", runtime.WithHTTPPathPattern("/api/v1/devices/{device_id}/own/{state}")) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/service.pb.ClientApplication/FinishOwnDevice", runtime.WithHTTPPathPattern("/api/v1/devices/{device_id}/own/{state}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_ClientApplication_FinishOwnDevice_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_ClientApplication_FinishOwnDevice_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_ClientApplication_FinishOwnDevice_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_ClientApplication_FinishOwnDevice_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -1743,19 +1797,21 @@ func RegisterClientApplicationHandlerClient(ctx context.Context, mux *runtime.Se ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req, "/service.pb.ClientApplication/DisownDevice", runtime.WithHTTPPathPattern("/api/v1/devices/{device_id}/disown")) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/service.pb.ClientApplication/DisownDevice", runtime.WithHTTPPathPattern("/api/v1/devices/{device_id}/disown")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_ClientApplication_DisownDevice_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_ClientApplication_DisownDevice_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_ClientApplication_DisownDevice_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_ClientApplication_DisownDevice_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -1763,19 +1819,21 @@ func RegisterClientApplicationHandlerClient(ctx context.Context, mux *runtime.Se ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req, "/service.pb.ClientApplication/ClearCache", runtime.WithHTTPPathPattern("/api/v1/devices")) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/service.pb.ClientApplication/ClearCache", runtime.WithHTTPPathPattern("/api/v1/devices")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_ClientApplication_ClearCache_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_ClientApplication_ClearCache_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_ClientApplication_ClearCache_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_ClientApplication_ClearCache_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -1783,19 +1841,21 @@ func RegisterClientApplicationHandlerClient(ctx context.Context, mux *runtime.Se ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req, "/service.pb.ClientApplication/GetConfiguration", runtime.WithHTTPPathPattern("/.well-known/configuration")) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/service.pb.ClientApplication/GetConfiguration", runtime.WithHTTPPathPattern("/.well-known/configuration")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_ClientApplication_GetConfiguration_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_ClientApplication_GetConfiguration_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_ClientApplication_GetConfiguration_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_ClientApplication_GetConfiguration_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -1803,19 +1863,21 @@ func RegisterClientApplicationHandlerClient(ctx context.Context, mux *runtime.Se ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req, "/service.pb.ClientApplication/GetJSONWebKeys", runtime.WithHTTPPathPattern("/.well-known/jwks.json")) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/service.pb.ClientApplication/GetJSONWebKeys", runtime.WithHTTPPathPattern("/.well-known/jwks.json")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_ClientApplication_GetJSONWebKeys_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_ClientApplication_GetJSONWebKeys_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_ClientApplication_GetJSONWebKeys_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_ClientApplication_GetJSONWebKeys_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -1823,19 +1885,21 @@ func RegisterClientApplicationHandlerClient(ctx context.Context, mux *runtime.Se ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req, "/service.pb.ClientApplication/GetIdentityCertificate", runtime.WithHTTPPathPattern("/api/v1/identity/certificate")) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/service.pb.ClientApplication/GetIdentityCertificate", runtime.WithHTTPPathPattern("/api/v1/identity/certificate")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_ClientApplication_GetIdentityCertificate_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_ClientApplication_GetIdentityCertificate_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_ClientApplication_GetIdentityCertificate_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_ClientApplication_GetIdentityCertificate_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -1843,19 +1907,21 @@ func RegisterClientApplicationHandlerClient(ctx context.Context, mux *runtime.Se ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req, "/service.pb.ClientApplication/Initialize", runtime.WithHTTPPathPattern("/api/v1/initialize")) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/service.pb.ClientApplication/Initialize", runtime.WithHTTPPathPattern("/api/v1/initialize")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_ClientApplication_Initialize_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_ClientApplication_Initialize_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_ClientApplication_Initialize_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_ClientApplication_Initialize_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -1863,19 +1929,21 @@ func RegisterClientApplicationHandlerClient(ctx context.Context, mux *runtime.Se ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req, "/service.pb.ClientApplication/FinishInitialize", runtime.WithHTTPPathPattern("/api/v1/initialize/{state}")) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/service.pb.ClientApplication/FinishInitialize", runtime.WithHTTPPathPattern("/api/v1/initialize/{state}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_ClientApplication_FinishInitialize_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_ClientApplication_FinishInitialize_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_ClientApplication_FinishInitialize_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_ClientApplication_FinishInitialize_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -1883,19 +1951,21 @@ func RegisterClientApplicationHandlerClient(ctx context.Context, mux *runtime.Se ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req, "/service.pb.ClientApplication/Reset", runtime.WithHTTPPathPattern("/api/v1/reset")) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/service.pb.ClientApplication/Reset", runtime.WithHTTPPathPattern("/api/v1/reset")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_ClientApplication_Reset_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_ClientApplication_Reset_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_ClientApplication_Reset_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_ClientApplication_Reset_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -1903,19 +1973,21 @@ func RegisterClientApplicationHandlerClient(ctx context.Context, mux *runtime.Se ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req, "/service.pb.ClientApplication/OnboardDevice", runtime.WithHTTPPathPattern("/api/v1/devices/{device_id}/onboard")) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/service.pb.ClientApplication/OnboardDevice", runtime.WithHTTPPathPattern("/api/v1/devices/{device_id}/onboard")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_ClientApplication_OnboardDevice_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_ClientApplication_OnboardDevice_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_ClientApplication_OnboardDevice_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_ClientApplication_OnboardDevice_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -1923,19 +1995,21 @@ func RegisterClientApplicationHandlerClient(ctx context.Context, mux *runtime.Se ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req, "/service.pb.ClientApplication/OffboardDevice", runtime.WithHTTPPathPattern("/api/v1/devices/{device_id}/offboard")) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/service.pb.ClientApplication/OffboardDevice", runtime.WithHTTPPathPattern("/api/v1/devices/{device_id}/offboard")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_ClientApplication_OffboardDevice_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_ClientApplication_OffboardDevice_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_ClientApplication_OffboardDevice_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_ClientApplication_OffboardDevice_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) diff --git a/pb/service.swagger.json b/pb/service.swagger.json index 573ebb08..09e36689 100644 --- a/pb/service.swagger.json +++ b/pb/service.swagger.json @@ -976,7 +976,8 @@ "SYNCING", "IN_SYNC" ], - "default": "OUT_OF_SYNC" + "default": "OUT_OF_SYNC", + "description": " - OUT_OF_SYNC: As soon as it connects after it was offline or when it goes errorless offline or when twin enabled has been changed to true.\n - DISABLED: As soon as twin enabled is set to false.\n - SYNCING: As soon as device connects, successfully signs in and batch observe is called on device from the cloud.\n - IN_SYNC: As soon as current device resources values are received and applied to twin database. Twin was successfully reconciled after device reconnect and is kept up to date using an active subscription to device resource changes." }, "googlerpcStatus": { "type": "object", @@ -991,6 +992,7 @@ "details": { "type": "array", "items": { + "type": "object", "$ref": "#/definitions/protobufAny" } } @@ -1057,6 +1059,31 @@ } } }, + "pbBuildInfo": { + "type": "object", + "properties": { + "version": { + "type": "string", + "title": "version of the service" + }, + "buildDate": { + "type": "string", + "title": "build date of the service" + }, + "commitHash": { + "type": "string", + "title": "commit hash of the service" + }, + "commitDate": { + "type": "string", + "title": "commit date of the service" + }, + "releaseUrl": { + "type": "string", + "title": "release url of the service" + } + } + }, "pbClearCacheResponse": { "type": "object" }, @@ -1083,14 +1110,17 @@ "format": "int64" }, "id": { - "type": "string" + "type": "string", + "description": "when status is ONLINE, this field contains the connection id. To update state offline, this field must be same as the one in the previous message." }, "connectedAt": { "type": "string", - "format": "int64" + "format": "int64", + "title": "timestamp when the device was connected" }, "protocol": { - "$ref": "#/definitions/ConnectionProtocol" + "$ref": "#/definitions/ConnectionProtocol", + "description": "application protocol. It need to be set when the status is ONLINE." } } }, @@ -1123,6 +1153,7 @@ "manufacturerName": { "type": "array", "items": { + "type": "object", "$ref": "#/definitions/pbLocalizedString" } }, @@ -1158,7 +1189,8 @@ "type": "object", "properties": { "clientId": { - "type": "string" + "type": "string", + "title": "@gotags: yaml:\"clientID\"" }, "audience": { "type": "string" @@ -1170,7 +1202,8 @@ } }, "providerName": { - "type": "string" + "type": "string", + "title": "@gotags: yaml:\"providerName\"" } } }, @@ -1205,7 +1238,8 @@ }, "sequence": { "type": "string", - "format": "uint64" + "format": "uint64", + "title": "sequence number within the same connection_id; the ResourceChanged event uses the value to skip old events, other event types might not fill the value" } } }, @@ -1219,19 +1253,24 @@ "type": "object", "properties": { "version": { - "type": "string" + "type": "string", + "title": "deprecated, use build_info.version" }, "buildDate": { - "type": "string" + "type": "string", + "title": "deprecated, use build_info.build_date" }, "commitHash": { - "type": "string" + "type": "string", + "title": "deprecated, use build_info.commit_hash" }, "commitDate": { - "type": "string" + "type": "string", + "title": "deprecated, use build_info.commit_date" }, "releaseUrl": { - "type": "string" + "type": "string", + "title": "deprecated, use build_info.release_url" }, "isInitialized": { "type": "boolean", @@ -1245,6 +1284,9 @@ }, "owner": { "type": "string" + }, + "buildInfo": { + "$ref": "#/definitions/pbBuildInfo" } } }, @@ -1253,7 +1295,8 @@ "properties": { "certificate": { "type": "string", - "format": "byte" + "format": "byte", + "title": "PEM format" } } }, @@ -1262,10 +1305,12 @@ "properties": { "certificateSigningRequest": { "type": "string", - "format": "byte" + "format": "byte", + "title": "in PEM format" }, "state": { - "type": "string" + "type": "string", + "title": "for pairing calls" } } }, @@ -1343,49 +1388,61 @@ "properties": { "currentTime": { "type": "string", - "format": "int64" + "format": "int64", + "title": "@gotags: yaml:\"-\"" }, "jwtOwnerClaim": { - "type": "string" + "type": "string", + "title": "@gotags: yaml:\"ownerClaim\"" }, "id": { "type": "string", + "description": "@gotags: yaml:\"hubID\"", "title": "Hub ID" }, "coapGateway": { "type": "string", + "description": "@gotags: yaml:\"coapGateway\"", "title": "coap-gateway in format coaps+tcp://host:port" }, "certificateAuthorities": { "type": "string", + "description": "@gotags: yaml:\"-\"", "title": "certificate_authorities in format PEM - can contain multiple certificates" }, "authority": { "type": "string", + "description": "@gotags: yaml:\"authority\"", "title": "authority in format https://host:port" }, "certificateAuthority": { "type": "string", + "description": "@gotags: yaml:\"certificateAuthority\"", "title": "certificate_authority in format https://host:port" }, "webOauthClient": { "$ref": "#/definitions/pbWebOAuthClient", + "description": "@gotags: yaml:\"webOAuthClient\"", "title": "http-gateway in format https://host:port\nstring http_gateway_address = 10; // @gotags: yaml:\"-\"" }, "deviceOauthClient": { - "$ref": "#/definitions/pbDeviceOAuthClient" + "$ref": "#/definitions/pbDeviceOAuthClient", + "title": "@gotags: yaml:\"deviceOAuthClient\"" }, "mode": { - "$ref": "#/definitions/RemoteProvisioningMode" + "$ref": "#/definitions/RemoteProvisioningMode", + "title": "@gotags: yaml:\"mode\"" }, "userAgent": { - "$ref": "#/definitions/pbUserAgent" + "$ref": "#/definitions/pbUserAgent", + "title": "@gotags: yaml:\"userAgent\"" }, "caPool": { "type": "array", "items": { "type": "string" - } + }, + "title": "@gotags: yaml:\"caPool\"" } } }, @@ -1496,6 +1553,7 @@ "resources": { "type": "array", "items": { + "type": "object", "$ref": "#/definitions/resourceaggregatepbResource" } }, @@ -1550,14 +1608,17 @@ }, "syncingAt": { "type": "string", - "format": "int64" + "format": "int64", + "description": "unix timestamp in nanoseconds (https://golang.org/pkg/time/#Time.UnixNano) when synchronization started." }, "inSyncAt": { "type": "string", - "format": "int64" + "format": "int64", + "description": "unix timestamp in nanoseconds (https://golang.org/pkg/time/#Time.UnixNano) when synchronization finished." }, "commandMetadata": { - "$ref": "#/definitions/pbCommandMetadata" + "$ref": "#/definitions/pbCommandMetadata", + "description": "when status is SYNCING, this field contains the connection id. To update state to IN_SYNC, this field must be same as the one in the previous message." } } }, @@ -1567,6 +1628,7 @@ "csrChallengeStateExpiration": { "type": "string", "format": "int64", + "description": "@gotags: yaml:\"csrChallengeStateExpiration\"", "title": "in nanoseconds" } } @@ -1575,7 +1637,8 @@ "type": "object", "properties": { "clientId": { - "type": "string" + "type": "string", + "title": "@gotags: yaml:\"clientID\"" }, "audience": { "type": "string" @@ -1617,7 +1680,8 @@ }, "coapContentFormat": { "type": "integer", - "format": "int32" + "format": "int32", + "title": "-1 means content-format was not provided" } } }, @@ -1664,6 +1728,7 @@ "endpointInformations": { "type": "array", "items": { + "type": "object", "$ref": "#/definitions/pbEndpointInformation" } } @@ -1687,7 +1752,8 @@ "CREATED", "CANCELED" ], - "default": "UNKNOWN" + "default": "UNKNOWN", + "description": " - CANCELED: Canceled indicates the operation was canceled (typically by the user)." } }, "securityDefinitions": { diff --git a/pb/service_grpc.pb.go b/pb/service_grpc.pb.go index e66b4d30..b7d659d2 100644 --- a/pb/service_grpc.pb.go +++ b/pb/service_grpc.pb.go @@ -1,4 +1,24 @@ +// ************************************************************************ +// Copyright (C) 2022 plgd.dev, s.r.o. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ************************************************************************ + // Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.3.0 +// - protoc v4.22.3 +// source: github.com/plgd-dev/client-application/pb/service.proto package pb @@ -17,6 +37,28 @@ import ( // Requires gRPC-Go v1.32.0 or later. const _ = grpc.SupportPackageIsVersion7 +const ( + ClientApplication_GetDevices_FullMethodName = "/service.pb.ClientApplication/GetDevices" + ClientApplication_GetDevice_FullMethodName = "/service.pb.ClientApplication/GetDevice" + ClientApplication_GetDeviceResourceLinks_FullMethodName = "/service.pb.ClientApplication/GetDeviceResourceLinks" + ClientApplication_GetResource_FullMethodName = "/service.pb.ClientApplication/GetResource" + ClientApplication_UpdateResource_FullMethodName = "/service.pb.ClientApplication/UpdateResource" + ClientApplication_CreateResource_FullMethodName = "/service.pb.ClientApplication/CreateResource" + ClientApplication_DeleteResource_FullMethodName = "/service.pb.ClientApplication/DeleteResource" + ClientApplication_OwnDevice_FullMethodName = "/service.pb.ClientApplication/OwnDevice" + ClientApplication_FinishOwnDevice_FullMethodName = "/service.pb.ClientApplication/FinishOwnDevice" + ClientApplication_DisownDevice_FullMethodName = "/service.pb.ClientApplication/DisownDevice" + ClientApplication_ClearCache_FullMethodName = "/service.pb.ClientApplication/ClearCache" + ClientApplication_GetConfiguration_FullMethodName = "/service.pb.ClientApplication/GetConfiguration" + ClientApplication_GetJSONWebKeys_FullMethodName = "/service.pb.ClientApplication/GetJSONWebKeys" + ClientApplication_GetIdentityCertificate_FullMethodName = "/service.pb.ClientApplication/GetIdentityCertificate" + ClientApplication_Initialize_FullMethodName = "/service.pb.ClientApplication/Initialize" + ClientApplication_FinishInitialize_FullMethodName = "/service.pb.ClientApplication/FinishInitialize" + ClientApplication_Reset_FullMethodName = "/service.pb.ClientApplication/Reset" + ClientApplication_OnboardDevice_FullMethodName = "/service.pb.ClientApplication/OnboardDevice" + ClientApplication_OffboardDevice_FullMethodName = "/service.pb.ClientApplication/OffboardDevice" +) + // ClientApplicationClient is the client API for ClientApplication 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. @@ -51,7 +93,7 @@ func NewClientApplicationClient(cc grpc.ClientConnInterface) ClientApplicationCl } func (c *clientApplicationClient) GetDevices(ctx context.Context, in *GetDevicesRequest, opts ...grpc.CallOption) (ClientApplication_GetDevicesClient, error) { - stream, err := c.cc.NewStream(ctx, &ClientApplication_ServiceDesc.Streams[0], "/service.pb.ClientApplication/GetDevices", opts...) + stream, err := c.cc.NewStream(ctx, &ClientApplication_ServiceDesc.Streams[0], ClientApplication_GetDevices_FullMethodName, opts...) if err != nil { return nil, err } @@ -84,7 +126,7 @@ func (x *clientApplicationGetDevicesClient) Recv() (*pb.Device, error) { func (c *clientApplicationClient) GetDevice(ctx context.Context, in *GetDeviceRequest, opts ...grpc.CallOption) (*pb.Device, error) { out := new(pb.Device) - err := c.cc.Invoke(ctx, "/service.pb.ClientApplication/GetDevice", in, out, opts...) + err := c.cc.Invoke(ctx, ClientApplication_GetDevice_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -93,7 +135,7 @@ func (c *clientApplicationClient) GetDevice(ctx context.Context, in *GetDeviceRe func (c *clientApplicationClient) GetDeviceResourceLinks(ctx context.Context, in *GetDeviceResourceLinksRequest, opts ...grpc.CallOption) (*events.ResourceLinksPublished, error) { out := new(events.ResourceLinksPublished) - err := c.cc.Invoke(ctx, "/service.pb.ClientApplication/GetDeviceResourceLinks", in, out, opts...) + err := c.cc.Invoke(ctx, ClientApplication_GetDeviceResourceLinks_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -102,7 +144,7 @@ func (c *clientApplicationClient) GetDeviceResourceLinks(ctx context.Context, in func (c *clientApplicationClient) GetResource(ctx context.Context, in *GetResourceRequest, opts ...grpc.CallOption) (*pb.Resource, error) { out := new(pb.Resource) - err := c.cc.Invoke(ctx, "/service.pb.ClientApplication/GetResource", in, out, opts...) + err := c.cc.Invoke(ctx, ClientApplication_GetResource_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -111,7 +153,7 @@ func (c *clientApplicationClient) GetResource(ctx context.Context, in *GetResour func (c *clientApplicationClient) UpdateResource(ctx context.Context, in *UpdateResourceRequest, opts ...grpc.CallOption) (*pb.UpdateResourceResponse, error) { out := new(pb.UpdateResourceResponse) - err := c.cc.Invoke(ctx, "/service.pb.ClientApplication/UpdateResource", in, out, opts...) + err := c.cc.Invoke(ctx, ClientApplication_UpdateResource_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -120,7 +162,7 @@ func (c *clientApplicationClient) UpdateResource(ctx context.Context, in *Update func (c *clientApplicationClient) CreateResource(ctx context.Context, in *CreateResourceRequest, opts ...grpc.CallOption) (*pb.CreateResourceResponse, error) { out := new(pb.CreateResourceResponse) - err := c.cc.Invoke(ctx, "/service.pb.ClientApplication/CreateResource", in, out, opts...) + err := c.cc.Invoke(ctx, ClientApplication_CreateResource_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -129,7 +171,7 @@ func (c *clientApplicationClient) CreateResource(ctx context.Context, in *Create func (c *clientApplicationClient) DeleteResource(ctx context.Context, in *DeleteResourceRequest, opts ...grpc.CallOption) (*pb.DeleteResourceResponse, error) { out := new(pb.DeleteResourceResponse) - err := c.cc.Invoke(ctx, "/service.pb.ClientApplication/DeleteResource", in, out, opts...) + err := c.cc.Invoke(ctx, ClientApplication_DeleteResource_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -138,7 +180,7 @@ func (c *clientApplicationClient) DeleteResource(ctx context.Context, in *Delete func (c *clientApplicationClient) OwnDevice(ctx context.Context, in *OwnDeviceRequest, opts ...grpc.CallOption) (*OwnDeviceResponse, error) { out := new(OwnDeviceResponse) - err := c.cc.Invoke(ctx, "/service.pb.ClientApplication/OwnDevice", in, out, opts...) + err := c.cc.Invoke(ctx, ClientApplication_OwnDevice_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -147,7 +189,7 @@ func (c *clientApplicationClient) OwnDevice(ctx context.Context, in *OwnDeviceRe func (c *clientApplicationClient) FinishOwnDevice(ctx context.Context, in *FinishOwnDeviceRequest, opts ...grpc.CallOption) (*FinishOwnDeviceResponse, error) { out := new(FinishOwnDeviceResponse) - err := c.cc.Invoke(ctx, "/service.pb.ClientApplication/FinishOwnDevice", in, out, opts...) + err := c.cc.Invoke(ctx, ClientApplication_FinishOwnDevice_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -156,7 +198,7 @@ func (c *clientApplicationClient) FinishOwnDevice(ctx context.Context, in *Finis func (c *clientApplicationClient) DisownDevice(ctx context.Context, in *DisownDeviceRequest, opts ...grpc.CallOption) (*DisownDeviceResponse, error) { out := new(DisownDeviceResponse) - err := c.cc.Invoke(ctx, "/service.pb.ClientApplication/DisownDevice", in, out, opts...) + err := c.cc.Invoke(ctx, ClientApplication_DisownDevice_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -165,7 +207,7 @@ func (c *clientApplicationClient) DisownDevice(ctx context.Context, in *DisownDe func (c *clientApplicationClient) ClearCache(ctx context.Context, in *ClearCacheRequest, opts ...grpc.CallOption) (*ClearCacheResponse, error) { out := new(ClearCacheResponse) - err := c.cc.Invoke(ctx, "/service.pb.ClientApplication/ClearCache", in, out, opts...) + err := c.cc.Invoke(ctx, ClientApplication_ClearCache_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -174,7 +216,7 @@ func (c *clientApplicationClient) ClearCache(ctx context.Context, in *ClearCache func (c *clientApplicationClient) GetConfiguration(ctx context.Context, in *GetConfigurationRequest, opts ...grpc.CallOption) (*GetConfigurationResponse, error) { out := new(GetConfigurationResponse) - err := c.cc.Invoke(ctx, "/service.pb.ClientApplication/GetConfiguration", in, out, opts...) + err := c.cc.Invoke(ctx, ClientApplication_GetConfiguration_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -183,7 +225,7 @@ func (c *clientApplicationClient) GetConfiguration(ctx context.Context, in *GetC func (c *clientApplicationClient) GetJSONWebKeys(ctx context.Context, in *GetJSONWebKeysRequest, opts ...grpc.CallOption) (*structpb.Struct, error) { out := new(structpb.Struct) - err := c.cc.Invoke(ctx, "/service.pb.ClientApplication/GetJSONWebKeys", in, out, opts...) + err := c.cc.Invoke(ctx, ClientApplication_GetJSONWebKeys_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -192,7 +234,7 @@ func (c *clientApplicationClient) GetJSONWebKeys(ctx context.Context, in *GetJSO func (c *clientApplicationClient) GetIdentityCertificate(ctx context.Context, in *GetIdentityCertificateRequest, opts ...grpc.CallOption) (*GetIdentityCertificateResponse, error) { out := new(GetIdentityCertificateResponse) - err := c.cc.Invoke(ctx, "/service.pb.ClientApplication/GetIdentityCertificate", in, out, opts...) + err := c.cc.Invoke(ctx, ClientApplication_GetIdentityCertificate_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -201,7 +243,7 @@ func (c *clientApplicationClient) GetIdentityCertificate(ctx context.Context, in func (c *clientApplicationClient) Initialize(ctx context.Context, in *InitializeRequest, opts ...grpc.CallOption) (*InitializeResponse, error) { out := new(InitializeResponse) - err := c.cc.Invoke(ctx, "/service.pb.ClientApplication/Initialize", in, out, opts...) + err := c.cc.Invoke(ctx, ClientApplication_Initialize_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -210,7 +252,7 @@ func (c *clientApplicationClient) Initialize(ctx context.Context, in *Initialize func (c *clientApplicationClient) FinishInitialize(ctx context.Context, in *FinishInitializeRequest, opts ...grpc.CallOption) (*FinishInitializeResponse, error) { out := new(FinishInitializeResponse) - err := c.cc.Invoke(ctx, "/service.pb.ClientApplication/FinishInitialize", in, out, opts...) + err := c.cc.Invoke(ctx, ClientApplication_FinishInitialize_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -219,7 +261,7 @@ func (c *clientApplicationClient) FinishInitialize(ctx context.Context, in *Fini func (c *clientApplicationClient) Reset(ctx context.Context, in *ResetRequest, opts ...grpc.CallOption) (*ResetResponse, error) { out := new(ResetResponse) - err := c.cc.Invoke(ctx, "/service.pb.ClientApplication/Reset", in, out, opts...) + err := c.cc.Invoke(ctx, ClientApplication_Reset_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -228,7 +270,7 @@ func (c *clientApplicationClient) Reset(ctx context.Context, in *ResetRequest, o func (c *clientApplicationClient) OnboardDevice(ctx context.Context, in *OnboardDeviceRequest, opts ...grpc.CallOption) (*OnboardDeviceResponse, error) { out := new(OnboardDeviceResponse) - err := c.cc.Invoke(ctx, "/service.pb.ClientApplication/OnboardDevice", in, out, opts...) + err := c.cc.Invoke(ctx, ClientApplication_OnboardDevice_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -237,7 +279,7 @@ func (c *clientApplicationClient) OnboardDevice(ctx context.Context, in *Onboard func (c *clientApplicationClient) OffboardDevice(ctx context.Context, in *OffboardDeviceRequest, opts ...grpc.CallOption) (*OffboardDeviceResponse, error) { out := new(OffboardDeviceResponse) - err := c.cc.Invoke(ctx, "/service.pb.ClientApplication/OffboardDevice", in, out, opts...) + err := c.cc.Invoke(ctx, ClientApplication_OffboardDevice_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -375,7 +417,7 @@ func _ClientApplication_GetDevice_Handler(srv interface{}, ctx context.Context, } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/service.pb.ClientApplication/GetDevice", + FullMethod: ClientApplication_GetDevice_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ClientApplicationServer).GetDevice(ctx, req.(*GetDeviceRequest)) @@ -393,7 +435,7 @@ func _ClientApplication_GetDeviceResourceLinks_Handler(srv interface{}, ctx cont } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/service.pb.ClientApplication/GetDeviceResourceLinks", + FullMethod: ClientApplication_GetDeviceResourceLinks_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ClientApplicationServer).GetDeviceResourceLinks(ctx, req.(*GetDeviceResourceLinksRequest)) @@ -411,7 +453,7 @@ func _ClientApplication_GetResource_Handler(srv interface{}, ctx context.Context } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/service.pb.ClientApplication/GetResource", + FullMethod: ClientApplication_GetResource_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ClientApplicationServer).GetResource(ctx, req.(*GetResourceRequest)) @@ -429,7 +471,7 @@ func _ClientApplication_UpdateResource_Handler(srv interface{}, ctx context.Cont } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/service.pb.ClientApplication/UpdateResource", + FullMethod: ClientApplication_UpdateResource_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ClientApplicationServer).UpdateResource(ctx, req.(*UpdateResourceRequest)) @@ -447,7 +489,7 @@ func _ClientApplication_CreateResource_Handler(srv interface{}, ctx context.Cont } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/service.pb.ClientApplication/CreateResource", + FullMethod: ClientApplication_CreateResource_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ClientApplicationServer).CreateResource(ctx, req.(*CreateResourceRequest)) @@ -465,7 +507,7 @@ func _ClientApplication_DeleteResource_Handler(srv interface{}, ctx context.Cont } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/service.pb.ClientApplication/DeleteResource", + FullMethod: ClientApplication_DeleteResource_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ClientApplicationServer).DeleteResource(ctx, req.(*DeleteResourceRequest)) @@ -483,7 +525,7 @@ func _ClientApplication_OwnDevice_Handler(srv interface{}, ctx context.Context, } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/service.pb.ClientApplication/OwnDevice", + FullMethod: ClientApplication_OwnDevice_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ClientApplicationServer).OwnDevice(ctx, req.(*OwnDeviceRequest)) @@ -501,7 +543,7 @@ func _ClientApplication_FinishOwnDevice_Handler(srv interface{}, ctx context.Con } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/service.pb.ClientApplication/FinishOwnDevice", + FullMethod: ClientApplication_FinishOwnDevice_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ClientApplicationServer).FinishOwnDevice(ctx, req.(*FinishOwnDeviceRequest)) @@ -519,7 +561,7 @@ func _ClientApplication_DisownDevice_Handler(srv interface{}, ctx context.Contex } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/service.pb.ClientApplication/DisownDevice", + FullMethod: ClientApplication_DisownDevice_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ClientApplicationServer).DisownDevice(ctx, req.(*DisownDeviceRequest)) @@ -537,7 +579,7 @@ func _ClientApplication_ClearCache_Handler(srv interface{}, ctx context.Context, } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/service.pb.ClientApplication/ClearCache", + FullMethod: ClientApplication_ClearCache_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ClientApplicationServer).ClearCache(ctx, req.(*ClearCacheRequest)) @@ -555,7 +597,7 @@ func _ClientApplication_GetConfiguration_Handler(srv interface{}, ctx context.Co } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/service.pb.ClientApplication/GetConfiguration", + FullMethod: ClientApplication_GetConfiguration_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ClientApplicationServer).GetConfiguration(ctx, req.(*GetConfigurationRequest)) @@ -573,7 +615,7 @@ func _ClientApplication_GetJSONWebKeys_Handler(srv interface{}, ctx context.Cont } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/service.pb.ClientApplication/GetJSONWebKeys", + FullMethod: ClientApplication_GetJSONWebKeys_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ClientApplicationServer).GetJSONWebKeys(ctx, req.(*GetJSONWebKeysRequest)) @@ -591,7 +633,7 @@ func _ClientApplication_GetIdentityCertificate_Handler(srv interface{}, ctx cont } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/service.pb.ClientApplication/GetIdentityCertificate", + FullMethod: ClientApplication_GetIdentityCertificate_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ClientApplicationServer).GetIdentityCertificate(ctx, req.(*GetIdentityCertificateRequest)) @@ -609,7 +651,7 @@ func _ClientApplication_Initialize_Handler(srv interface{}, ctx context.Context, } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/service.pb.ClientApplication/Initialize", + FullMethod: ClientApplication_Initialize_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ClientApplicationServer).Initialize(ctx, req.(*InitializeRequest)) @@ -627,7 +669,7 @@ func _ClientApplication_FinishInitialize_Handler(srv interface{}, ctx context.Co } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/service.pb.ClientApplication/FinishInitialize", + FullMethod: ClientApplication_FinishInitialize_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ClientApplicationServer).FinishInitialize(ctx, req.(*FinishInitializeRequest)) @@ -645,7 +687,7 @@ func _ClientApplication_Reset_Handler(srv interface{}, ctx context.Context, dec } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/service.pb.ClientApplication/Reset", + FullMethod: ClientApplication_Reset_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ClientApplicationServer).Reset(ctx, req.(*ResetRequest)) @@ -663,7 +705,7 @@ func _ClientApplication_OnboardDevice_Handler(srv interface{}, ctx context.Conte } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/service.pb.ClientApplication/OnboardDevice", + FullMethod: ClientApplication_OnboardDevice_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ClientApplicationServer).OnboardDevice(ctx, req.(*OnboardDeviceRequest)) @@ -681,7 +723,7 @@ func _ClientApplication_OffboardDevice_Handler(srv interface{}, ctx context.Cont } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/service.pb.ClientApplication/OffboardDevice", + FullMethod: ClientApplication_OffboardDevice_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ClientApplicationServer).OffboardDevice(ctx, req.(*OffboardDeviceRequest)) diff --git a/pb/update_resource.pb.go b/pb/update_resource.pb.go index 679238d6..192a35ac 100644 --- a/pb/update_resource.pb.go +++ b/pb/update_resource.pb.go @@ -16,8 +16,8 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.27.1 -// protoc v3.21.9 +// protoc-gen-go v1.30.0 +// protoc v4.22.3 // source: github.com/plgd-dev/client-application/pb/update_resource.proto package pb @@ -110,25 +110,25 @@ var file_github_com_plgd_dev_client_application_pb_update_resource_proto_rawDesc 0x74, 0x65, 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0a, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x62, 0x1a, 0x1d, 0x67, 0x72, 0x70, 0x63, 0x2d, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2f, 0x70, 0x62, 0x2f, 0x64, - 0x65, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x24, 0x72, 0x65, + 0x65, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x25, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2d, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, - 0x2f, 0x70, 0x62, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x22, 0xbc, 0x01, 0x0a, 0x15, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x41, 0x0a, 0x0b, - 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x20, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x61, 0x67, 0x67, 0x72, - 0x65, 0x67, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x49, 0x64, 0x52, 0x0a, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x64, 0x12, - 0x31, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x17, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, - 0x62, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, - 0x6e, 0x74, 0x12, 0x2d, 0x0a, 0x12, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x69, - 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, - 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, - 0x65, 0x42, 0x2e, 0x5a, 0x2c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, - 0x70, 0x6c, 0x67, 0x64, 0x2d, 0x64, 0x65, 0x76, 0x2f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2d, - 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x70, 0x62, 0x3b, 0x70, - 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x2f, 0x70, 0x62, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x22, 0xbc, 0x01, 0x0a, 0x15, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x41, 0x0a, + 0x0b, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x61, 0x67, 0x67, + 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x49, 0x64, 0x52, 0x0a, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x64, + 0x12, 0x31, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, + 0x70, 0x62, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, + 0x65, 0x6e, 0x74, 0x12, 0x2d, 0x0a, 0x12, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, + 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x11, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, + 0x63, 0x65, 0x42, 0x2e, 0x5a, 0x2c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x70, 0x6c, 0x67, 0x64, 0x2d, 0x64, 0x65, 0x76, 0x2f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, + 0x2d, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x70, 0x62, 0x3b, + 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pb/update_resource.proto b/pb/update_resource.proto index d4b73d6d..9d14c463 100644 --- a/pb/update_resource.proto +++ b/pb/update_resource.proto @@ -19,7 +19,7 @@ syntax = "proto3"; package service.pb; import "grpc-gateway/pb/devices.proto"; -import "resource-aggregate/pb/commands.proto"; +import "resource-aggregate/pb/resources.proto"; option go_package = "github.com/plgd-dev/client-application/pb;pb"; diff --git a/service/config/grpc/config.go b/service/config/grpc/config.go index d798abf4..f22bf37c 100644 --- a/service/config/grpc/config.go +++ b/service/config/grpc/config.go @@ -26,7 +26,7 @@ import ( type Config = server.Config -type ServiceInformation = pb.GetConfigurationResponse +type ServiceInformation = pb.BuildInfo var defaultConfig = Config{ Addr: ":8081", diff --git a/service/grpc/server.go b/service/grpc/server.go index 79ea61c6..35d929bd 100644 --- a/service/grpc/server.go +++ b/service/grpc/server.go @@ -37,7 +37,7 @@ type ClientApplicationServer struct { pb.UnimplementedClientApplicationServer serviceDevice *serviceDevice.Service - info *configGrpc.ServiceInformation + info *pb.GetConfigurationResponse logger log.Logger devices *coapSync.Map[uuid.UUID, *device] csrCache *ttlcache.Cache[uuid.UUID, bool] @@ -53,7 +53,7 @@ func NewClientApplicationServer(cfg *atomic.Pointer[config.Config], serviceDevic go csrCache.Start() return &ClientApplicationServer{ serviceDevice: serviceDevice, - info: info, + info: pb.NewGetConfigurationResponse(info), logger: logger, csrCache: csrCache, config: cfg, diff --git a/service/service_test.go b/service/service_test.go index 1c25a2d7..53406cbc 100644 --- a/service/service_test.go +++ b/service/service_test.go @@ -48,6 +48,6 @@ func TestServiceFailSetup(t *testing.T) { defer func() { _ = fileWatcher.Close() }() - _, err = service.New(ctx, cfg, test.NewServiceInformation(), fileWatcher, logger) + _, err = service.New(ctx, cfg, test.NewServiceInformation().GetBuildInfo(), fileWatcher, logger) require.Error(t, err) } diff --git a/test/test.go b/test/test.go index 258469bf..30253735 100644 --- a/test/test.go +++ b/test/test.go @@ -119,7 +119,7 @@ func New(t *testing.T, cfg config.Config) func() { fileWatcher, err := fsnotify.NewWatcher(logger) require.NoError(t, err) - s, err := service.New(ctx, cfg, NewServiceInformation(), fileWatcher, logger) + s, err := service.New(ctx, cfg, NewServiceInformation().GetBuildInfo(), fileWatcher, logger) require.NoError(t, err) var wg sync.WaitGroup @@ -265,14 +265,19 @@ func NewHttpService(ctx context.Context, t *testing.T) (*http.Service, func()) { return s, cleanUp } -func NewServiceInformation() *configGrpc.ServiceInformation { - return &configGrpc.ServiceInformation{ +func NewServiceInformation() *pb.GetConfigurationResponse { + return &pb.GetConfigurationResponse{ Version: VERSION, BuildDate: BUILD_DATE, CommitHash: COMMIT_HASH, IsInitialized: true, DeviceAuthenticationMode: pb.GetConfigurationResponse_PRE_SHARED_KEY, Owner: PSK_OWNER, + BuildInfo: &pb.BuildInfo{ + Version: VERSION, + BuildDate: BUILD_DATE, + CommitHash: COMMIT_HASH, + }, } } @@ -330,7 +335,7 @@ func NewClientApplicationServer(ctx context.Context, opts ...ClientApplicationSe }() cfg.RemoteProvisioning = remoteProvisioningCfg cfg.Clients.Device = deviceCfg - clientApplicationServer := serviceGrpc.NewClientApplicationServer(atomic.NewPointer(&cfg), d, NewServiceInformation(), logger) + clientApplicationServer := serviceGrpc.NewClientApplicationServer(atomic.NewPointer(&cfg), d, NewServiceInformation().GetBuildInfo(), logger) return clientApplicationServer, func() { _ = d.Close() clientApplicationServer.Close() diff --git a/web/Dockerfile b/web/Dockerfile index 39abcea5..8cf876b7 100644 --- a/web/Dockerfile +++ b/web/Dockerfile @@ -1,3 +1,3 @@ FROM node:16 AS build-web COPY . /web -RUN cd /web && npm install && npm run build +RUN cd /web && npm install --ignore-scripts && npm run build