Add metadate management in grpc
All checks were successful
Build and Push Docker Image / build_and_push (push) Successful in 2m7s

This commit is contained in:
Arnaud Delcasse
2026-01-14 00:38:18 +01:00
parent 44f5a3d182
commit bc7ba530d4
3 changed files with 46 additions and 11 deletions

View File

@@ -28,6 +28,7 @@ type Account struct {
Namespace string `protobuf:"bytes,2,opt,name=namespace,proto3" json:"namespace,omitempty"`
Authentication *AccountAuth `protobuf:"bytes,3,opt,name=authentication,proto3" json:"authentication,omitempty"`
Data *structpb.Struct `protobuf:"bytes,4,opt,name=data,proto3" json:"data,omitempty"`
Metadata *structpb.Struct `protobuf:"bytes,5,opt,name=metadata,proto3" json:"metadata,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
@@ -90,6 +91,13 @@ func (x *Account) GetData() *structpb.Struct {
return nil
}
func (x *Account) GetMetadata() *structpb.Struct {
if x != nil {
return x.Metadata
}
return nil
}
type AccountAuth struct {
state protoimpl.MessageState `protogen:"open.v1"`
Local *LocalAuth `protobuf:"bytes,7,opt,name=local,proto3,oneof" json:"local,omitempty"` //TODO SSO
@@ -274,12 +282,13 @@ var File_accounts_proto protoreflect.FileDescriptor
const file_accounts_proto_rawDesc = "" +
"\n" +
"\x0eaccounts.proto\x1a\x1cgoogle/protobuf/struct.proto\"\x9a\x01\n" +
"\x0eaccounts.proto\x1a\x1cgoogle/protobuf/struct.proto\"\xcf\x01\n" +
"\aAccount\x12\x0e\n" +
"\x02id\x18\x01 \x01(\tR\x02id\x12\x1c\n" +
"\tnamespace\x18\x02 \x01(\tR\tnamespace\x124\n" +
"\x0eauthentication\x18\x03 \x01(\v2\f.AccountAuthR\x0eauthentication\x12+\n" +
"\x04data\x18\x04 \x01(\v2\x17.google.protobuf.StructR\x04data\">\n" +
"\x04data\x18\x04 \x01(\v2\x17.google.protobuf.StructR\x04data\x123\n" +
"\bmetadata\x18\x05 \x01(\v2\x17.google.protobuf.StructR\bmetadata\">\n" +
"\vAccountAuth\x12%\n" +
"\x05local\x18\a \x01(\v2\n" +
".LocalAuthH\x00R\x05local\x88\x01\x01B\b\n" +
@@ -325,14 +334,15 @@ var file_accounts_proto_goTypes = []any{
var file_accounts_proto_depIdxs = []int32{
1, // 0: Account.authentication:type_name -> AccountAuth
4, // 1: Account.data:type_name -> google.protobuf.Struct
2, // 2: AccountAuth.local:type_name -> LocalAuth
3, // 3: LocalAuth.email_validation:type_name -> Validation
3, // 4: LocalAuth.phone_number_validation:type_name -> Validation
5, // [5:5] is the sub-list for method output_type
5, // [5:5] is the sub-list for method input_type
5, // [5:5] is the sub-list for extension type_name
5, // [5:5] is the sub-list for extension extendee
0, // [0:5] is the sub-list for field type_name
4, // 2: Account.metadata:type_name -> google.protobuf.Struct
2, // 3: AccountAuth.local:type_name -> LocalAuth
3, // 4: LocalAuth.email_validation:type_name -> Validation
3, // 5: LocalAuth.phone_number_validation:type_name -> Validation
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
}
func init() { file_accounts_proto_init() }