Add identifier for MOC notifications

This commit is contained in:
Ganesh 2024-03-11 16:44:08 -07:00
Родитель 727a2b6da6
Коммит 235d1d0e81
4 изменённых файлов: 46 добавлений и 33 удалений

6
go.mod
Просмотреть файл

@ -5,7 +5,7 @@ go 1.16
require (
github.com/golang-jwt/jwt v3.2.2+incompatible
github.com/golang/mock v1.6.0
github.com/golang/protobuf v1.5.3
github.com/golang/protobuf v1.5.4
github.com/hectane/go-acl v0.0.0-20230122075934-ca0b05cb1adb
github.com/jmespath/go-jmespath v0.4.0
github.com/pkg/errors v0.9.1
@ -15,8 +15,8 @@ require (
)
require (
golang.org/x/net v0.21.0 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240304161311-37d4d3c04a78 // indirect
golang.org/x/net v0.22.0 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240311173647-c811ad7063a7 // indirect
)
replace (

17
go.sum
Просмотреть файл

@ -844,8 +844,9 @@ github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw
github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=
github.com/golang/protobuf v1.5.1/go.mod h1:DopwsBzvsk0Fs44TXzsVbJyPhcCPeIwnvohx4u74HPM=
github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=
github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg=
github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=
github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek=
github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps=
github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
@ -1112,8 +1113,8 @@ golang.org/x/net v0.9.0/go.mod h1:d48xBJpPfHeWQsugry2m+kC02ZBRGRgulfHnEXEuWns=
golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg=
golang.org/x/net v0.11.0/go.mod h1:2L/ixqYpgIVXmeoSA/4Lu7BzTG4KIyPIryS4IsOd1oQ=
golang.org/x/net v0.14.0/go.mod h1:PpSgVXXLK0OxS0F31C1/tv6XNguvCrnXIDrFMspZIUI=
golang.org/x/net v0.21.0 h1:AQyQV4dYCvJ7vGmJyKki9+PBdyvhkSd8EIx/qb0AYv4=
golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44=
golang.org/x/net v0.22.0 h1:9sGLhx7iRIHEiX0oAJ3MRZMUCElJgy7Br1nO+AMN3Tc=
golang.org/x/net v0.22.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg=
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
@ -1173,7 +1174,7 @@ golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo=
golang.org/x/term v0.9.0/go.mod h1:M6DEAAIenWoTxdKrOltXcmDY3rSplQUkrvaDU5FcQyo=
golang.org/x/term v0.11.0/go.mod h1:zC9APTIj3jG3FdV/Ons+XE1riIZXG4aZ4GTHiPZJPIU=
golang.org/x/term v0.15.0/go.mod h1:BDl952bC7+uMoWR75FIrCDx79TPU9oHkTZ9yRbYOrX0=
golang.org/x/term v0.17.0/go.mod h1:lLRBjIVuehSbZlaOtGMbcMncT+aqLLLmKrsjNrUguwk=
golang.org/x/term v0.18.0/go.mod h1:ILwASektA3OnRv7amZ1xhE/KTR+u50pbXfZ03+6Nx58=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
@ -1504,8 +1505,8 @@ google.golang.org/genproto/googleapis/rpc v0.0.0-20230706204954-ccb25ca9f130/go.
google.golang.org/genproto/googleapis/rpc v0.0.0-20230731190214-cbb8c96f2d6d/go.mod h1:TUfxEVdsvPg18p6AslUXFoLdpED4oBnGwyqk3dV1XzM=
google.golang.org/genproto/googleapis/rpc v0.0.0-20230803162519-f966b187b2e5/go.mod h1:zBEcrKX2ZOcEkHWxBPAIvYUWOKKMIhYcmNiUIu2ji3I=
google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d/go.mod h1:+Bk1OCOj40wS2hwAMA+aCW9ypzm63QTBBHp6lQ3p+9M=
google.golang.org/genproto/googleapis/rpc v0.0.0-20240304161311-37d4d3c04a78 h1:Xs9lu+tLXxLIfuci70nG4cpwaRC+mRQPUL7LoIeDJC4=
google.golang.org/genproto/googleapis/rpc v0.0.0-20240304161311-37d4d3c04a78/go.mod h1:UCOku4NytXMJuLQE5VuqA5lX3PcHCBo8pxNyvkf4xBs=
google.golang.org/genproto/googleapis/rpc v0.0.0-20240311173647-c811ad7063a7 h1:8EeVk1VKMD+GD/neyEHGmz7pFblqPjHoi+PGQIlLx2s=
google.golang.org/genproto/googleapis/rpc v0.0.0-20240311173647-c811ad7063a7/go.mod h1:WtryC6hu0hhx87FDGxWCDptyssuo68sk10vYjF+T9fY=
google.golang.org/grpc v1.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk=
google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98=
google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw=
@ -1527,8 +1528,8 @@ google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqw
google.golang.org/protobuf v1.29.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
google.golang.org/protobuf v1.30.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
google.golang.org/protobuf v1.32.0 h1:pPC6BG5ex8PDFnkbrGU3EixyhKcQ2aDuBS36lqK/C7I=
google.golang.org/protobuf v1.32.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos=
google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI=
google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=

Просмотреть файл

@ -32,6 +32,8 @@ type Notification struct {
ParentEntityName string `protobuf:"bytes,4,opt,name=parentEntityName,proto3" json:"parentEntityName,omitempty"`
// Optional flag to specify if the notification is async
Async bool `protobuf:"varint,5,opt,name=async,proto3" json:"async,omitempty"`
// Unique identifier for the notification
Id string `protobuf:"bytes,6,opt,name=id,proto3" json:"id,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
@ -97,6 +99,13 @@ func (m *Notification) GetAsync() bool {
return false
}
func (m *Notification) GetId() string {
if m != nil {
return m.Id
}
return ""
}
type NotificationResponse struct {
Notifications []*Notification `protobuf:"bytes,1,rep,name=notifications,proto3" json:"notifications,omitempty"`
Result *wrappers.BoolValue `protobuf:"bytes,2,opt,name=Result,proto3" json:"Result,omitempty"`
@ -160,25 +169,26 @@ func init() {
func init() { proto.RegisterFile("moc_common_notification.proto", fileDescriptor_d7c9519ae78bfcb0) }
var fileDescriptor_d7c9519ae78bfcb0 = []byte{
// 308 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x64, 0x91, 0x51, 0x4b, 0xc3, 0x30,
0x14, 0x85, 0x89, 0x73, 0xd3, 0x65, 0x3a, 0x34, 0x0c, 0x2c, 0x03, 0x47, 0x99, 0x08, 0x45, 0x24,
0x85, 0xfa, 0xe0, 0xfb, 0x60, 0xaf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, 0x6e,
0x43, 0xcc, 0x93, 0x13, 0xa7, 0x1c, 0x2b, 0xe8, 0xa0, 0x04, 0xd7, 0x36, 0x3e, 0x2c, 0x36, 0x2a,
0xa6, 0x3c, 0xd6, 0xca, 0x0f, 0xb5, 0xf2, 0x05, 0x62, 0xf3, 0x2e, 0x9a, 0x16, 0xca, 0x3d, 0xf9,
0x97, 0x6d, 0x69, 0x2d, 0xda, 0xfd, 0x7e, 0x71, 0x58, 0x3c, 0x7e, 0x3c, 0x54, 0xb5, 0xff, 0x6c,
0x37, 0x5c, 0xa2, 0xca, 0x55, 0x2d, 0x2d, 0x3a, 0xdc, 0xfa, 0x5c, 0xa1, 0xcc, 0xad, 0x91, 0x79,
0x7c, 0x83, 0xcd, 0x20, 0x18, 0xbf, 0xfc, 0x06, 0x00, 0x00, 0xff, 0xff, 0x6a, 0xaf, 0xd3, 0x58,
0xe3, 0x01, 0x00, 0x00,
// 321 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x64, 0x91, 0xc1, 0x6a, 0x2a, 0x31,
0x14, 0x86, 0x89, 0x5e, 0xbd, 0xd7, 0x78, 0xaf, 0xdc, 0x06, 0xa1, 0x41, 0xa8, 0x0c, 0x96, 0xc2,
0x50, 0x4a, 0x06, 0xa6, 0x8b, 0xee, 0x05, 0xb7, 0x16, 0x66, 0xd1, 0x45, 0x37, 0x12, 0x63, 0x9c,
0x06, 0x26, 0x39, 0x21, 0xc9, 0x50, 0x7c, 0x94, 0xbe, 0x51, 0x1f, 0xab, 0x34, 0x51, 0x1c, 0xe9,
0x2a, 0x9c, 0x3f, 0xdf, 0xf9, 0x73, 0xce, 0x1f, 0x7c, 0xa3, 0x41, 0x6c, 0x04, 0x68, 0x0d, 0x66,
0x63, 0x20, 0xa8, 0xbd, 0x12, 0x3c, 0x28, 0x30, 0xcc, 0x3a, 0x08, 0x40, 0xfa, 0x1a, 0xc4, 0x6c,
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0xad, 0x55, 0x78, 0x6b, 0xb7, 0x4c, 0x80,
0x2e, 0xb4, 0x12, 0x0e, 0x3c, 0xec, 0x43, 0xa1, 0x41, 0x14, 0xce, 0x8a, 0x22, 0xfd, 0xc9, 0x76,
0x18, 0x8d, 0x1f, 0xbf, 0x02, 0x00, 0x00, 0xff, 0xff, 0xf6, 0x30, 0x98, 0x3b, 0xf3, 0x01, 0x00,
0x00,
}

Просмотреть файл

@ -19,6 +19,8 @@ message Notification {
string parentEntityName = 4;
// Optional flag to specify if the notification is async
bool async = 5;
//Unique identifier for the notification
string id = 6;
}
message NotificationResponse {