refactor: remove unused field from

This commit is contained in:
Prad Nukala 2024-09-30 19:44:28 -04:00
parent aa830517f3
commit 6f3fa0ec38

View File

@ -1002,7 +1002,6 @@ var (
fd_Schema_jwk protoreflect.FieldDescriptor fd_Schema_jwk protoreflect.FieldDescriptor
fd_Schema_grant protoreflect.FieldDescriptor fd_Schema_grant protoreflect.FieldDescriptor
fd_Schema_keyshare protoreflect.FieldDescriptor fd_Schema_keyshare protoreflect.FieldDescriptor
fd_Schema_publicKey protoreflect.FieldDescriptor
fd_Schema_profile protoreflect.FieldDescriptor fd_Schema_profile protoreflect.FieldDescriptor
) )
@ -1017,7 +1016,6 @@ func init() {
fd_Schema_jwk = md_Schema.Fields().ByName("jwk") fd_Schema_jwk = md_Schema.Fields().ByName("jwk")
fd_Schema_grant = md_Schema.Fields().ByName("grant") fd_Schema_grant = md_Schema.Fields().ByName("grant")
fd_Schema_keyshare = md_Schema.Fields().ByName("keyshare") fd_Schema_keyshare = md_Schema.Fields().ByName("keyshare")
fd_Schema_publicKey = md_Schema.Fields().ByName("publicKey")
fd_Schema_profile = md_Schema.Fields().ByName("profile") fd_Schema_profile = md_Schema.Fields().ByName("profile")
} }
@ -1134,12 +1132,6 @@ func (x *fastReflection_Schema) Range(f func(protoreflect.FieldDescriptor, proto
return return
} }
} }
if x.PublicKey != "" {
value := protoreflect.ValueOfString(x.PublicKey)
if !f(fd_Schema_publicKey, value) {
return
}
}
if x.Profile != "" { if x.Profile != "" {
value := protoreflect.ValueOfString(x.Profile) value := protoreflect.ValueOfString(x.Profile)
if !f(fd_Schema_profile, value) { if !f(fd_Schema_profile, value) {
@ -1177,8 +1169,6 @@ func (x *fastReflection_Schema) Has(fd protoreflect.FieldDescriptor) bool {
return x.Grant != "" return x.Grant != ""
case "vault.v1.Schema.keyshare": case "vault.v1.Schema.keyshare":
return x.Keyshare != "" return x.Keyshare != ""
case "vault.v1.Schema.publicKey":
return x.PublicKey != ""
case "vault.v1.Schema.profile": case "vault.v1.Schema.profile":
return x.Profile != "" return x.Profile != ""
default: default:
@ -1213,8 +1203,6 @@ func (x *fastReflection_Schema) Clear(fd protoreflect.FieldDescriptor) {
x.Grant = "" x.Grant = ""
case "vault.v1.Schema.keyshare": case "vault.v1.Schema.keyshare":
x.Keyshare = "" x.Keyshare = ""
case "vault.v1.Schema.publicKey":
x.PublicKey = ""
case "vault.v1.Schema.profile": case "vault.v1.Schema.profile":
x.Profile = "" x.Profile = ""
default: default:
@ -1257,9 +1245,6 @@ func (x *fastReflection_Schema) Get(descriptor protoreflect.FieldDescriptor) pro
case "vault.v1.Schema.keyshare": case "vault.v1.Schema.keyshare":
value := x.Keyshare value := x.Keyshare
return protoreflect.ValueOfString(value) return protoreflect.ValueOfString(value)
case "vault.v1.Schema.publicKey":
value := x.PublicKey
return protoreflect.ValueOfString(value)
case "vault.v1.Schema.profile": case "vault.v1.Schema.profile":
value := x.Profile value := x.Profile
return protoreflect.ValueOfString(value) return protoreflect.ValueOfString(value)
@ -1299,8 +1284,6 @@ func (x *fastReflection_Schema) Set(fd protoreflect.FieldDescriptor, value proto
x.Grant = value.Interface().(string) x.Grant = value.Interface().(string)
case "vault.v1.Schema.keyshare": case "vault.v1.Schema.keyshare":
x.Keyshare = value.Interface().(string) x.Keyshare = value.Interface().(string)
case "vault.v1.Schema.publicKey":
x.PublicKey = value.Interface().(string)
case "vault.v1.Schema.profile": case "vault.v1.Schema.profile":
x.Profile = value.Interface().(string) x.Profile = value.Interface().(string)
default: default:
@ -1339,8 +1322,6 @@ func (x *fastReflection_Schema) Mutable(fd protoreflect.FieldDescriptor) protore
panic(fmt.Errorf("field grant of message vault.v1.Schema is not mutable")) panic(fmt.Errorf("field grant of message vault.v1.Schema is not mutable"))
case "vault.v1.Schema.keyshare": case "vault.v1.Schema.keyshare":
panic(fmt.Errorf("field keyshare of message vault.v1.Schema is not mutable")) panic(fmt.Errorf("field keyshare of message vault.v1.Schema is not mutable"))
case "vault.v1.Schema.publicKey":
panic(fmt.Errorf("field publicKey of message vault.v1.Schema is not mutable"))
case "vault.v1.Schema.profile": case "vault.v1.Schema.profile":
panic(fmt.Errorf("field profile of message vault.v1.Schema is not mutable")) panic(fmt.Errorf("field profile of message vault.v1.Schema is not mutable"))
default: default:
@ -1372,8 +1353,6 @@ func (x *fastReflection_Schema) NewField(fd protoreflect.FieldDescriptor) protor
return protoreflect.ValueOfString("") return protoreflect.ValueOfString("")
case "vault.v1.Schema.keyshare": case "vault.v1.Schema.keyshare":
return protoreflect.ValueOfString("") return protoreflect.ValueOfString("")
case "vault.v1.Schema.publicKey":
return protoreflect.ValueOfString("")
case "vault.v1.Schema.profile": case "vault.v1.Schema.profile":
return protoreflect.ValueOfString("") return protoreflect.ValueOfString("")
default: default:
@ -1476,10 +1455,6 @@ func (x *fastReflection_Schema) ProtoMethods() *protoiface.Methods {
if l > 0 { if l > 0 {
n += 1 + l + runtime.Sov(uint64(l)) n += 1 + l + runtime.Sov(uint64(l))
} }
l = len(x.PublicKey)
if l > 0 {
n += 1 + l + runtime.Sov(uint64(l))
}
l = len(x.Profile) l = len(x.Profile)
if l > 0 { if l > 0 {
n += 1 + l + runtime.Sov(uint64(l)) n += 1 + l + runtime.Sov(uint64(l))
@ -1518,13 +1493,6 @@ func (x *fastReflection_Schema) ProtoMethods() *protoiface.Methods {
copy(dAtA[i:], x.Profile) copy(dAtA[i:], x.Profile)
i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Profile))) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Profile)))
i-- i--
dAtA[i] = 0x52
}
if len(x.PublicKey) > 0 {
i -= len(x.PublicKey)
copy(dAtA[i:], x.PublicKey)
i = runtime.EncodeVarint(dAtA, i, uint64(len(x.PublicKey)))
i--
dAtA[i] = 0x4a dAtA[i] = 0x4a
} }
if len(x.Keyshare) > 0 { if len(x.Keyshare) > 0 {
@ -1874,38 +1842,6 @@ func (x *fastReflection_Schema) ProtoMethods() *protoiface.Methods {
x.Keyshare = string(dAtA[iNdEx:postIndex]) x.Keyshare = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex iNdEx = postIndex
case 9: case 9:
if wireType != 2 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field PublicKey", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow
}
if iNdEx >= l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
}
if postIndex > l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
x.PublicKey = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 10:
if wireType != 2 { if wireType != 2 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Profile", wireType) return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Profile", wireType)
} }
@ -2087,8 +2023,7 @@ type Schema struct {
Jwk string `protobuf:"bytes,6,opt,name=jwk,proto3" json:"jwk,omitempty"` Jwk string `protobuf:"bytes,6,opt,name=jwk,proto3" json:"jwk,omitempty"`
Grant string `protobuf:"bytes,7,opt,name=grant,proto3" json:"grant,omitempty"` Grant string `protobuf:"bytes,7,opt,name=grant,proto3" json:"grant,omitempty"`
Keyshare string `protobuf:"bytes,8,opt,name=keyshare,proto3" json:"keyshare,omitempty"` Keyshare string `protobuf:"bytes,8,opt,name=keyshare,proto3" json:"keyshare,omitempty"`
PublicKey string `protobuf:"bytes,9,opt,name=publicKey,proto3" json:"publicKey,omitempty"` Profile string `protobuf:"bytes,9,opt,name=profile,proto3" json:"profile,omitempty"`
Profile string `protobuf:"bytes,10,opt,name=profile,proto3" json:"profile,omitempty"`
} }
func (x *Schema) Reset() { func (x *Schema) Reset() {
@ -2167,13 +2102,6 @@ func (x *Schema) GetKeyshare() string {
return "" return ""
} }
func (x *Schema) GetPublicKey() string {
if x != nil {
return x.PublicKey
}
return ""
}
func (x *Schema) GetProfile() string { func (x *Schema) GetProfile() string {
if x != nil { if x != nil {
return x.Profile return x.Profile
@ -2203,7 +2131,7 @@ var file_vault_v1_genesis_proto_rawDesc = []byte{
0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x2e, 0x76, 0x31, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x2e, 0x76, 0x31,
0x2e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x3a, 0x2e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x3a,
0x19, 0x98, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x01, 0x8a, 0xe7, 0xb0, 0x2a, 0x0c, 0x76, 0x61, 0x19, 0x98, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x01, 0x8a, 0xe7, 0xb0, 0x2a, 0x0c, 0x76, 0x61,
0x75, 0x6c, 0x74, 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x84, 0x02, 0x0a, 0x06, 0x53, 0x75, 0x6c, 0x74, 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0xe6, 0x01, 0x0a, 0x06, 0x53,
0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e,
0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12,
0x18, 0x0a, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x18, 0x0a, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,
@ -2216,20 +2144,18 @@ var file_vault_v1_genesis_proto_rawDesc = []byte{
0x28, 0x09, 0x52, 0x03, 0x6a, 0x77, 0x6b, 0x12, 0x14, 0x0a, 0x05, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x28, 0x09, 0x52, 0x03, 0x6a, 0x77, 0x6b, 0x12, 0x14, 0x0a, 0x05, 0x67, 0x72, 0x61, 0x6e, 0x74,
0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x12, 0x1a, 0x0a, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x12, 0x1a, 0x0a,
0x08, 0x6b, 0x65, 0x79, 0x73, 0x68, 0x61, 0x72, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x68, 0x61, 0x72, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52,
0x08, 0x6b, 0x65, 0x79, 0x73, 0x68, 0x61, 0x72, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x70, 0x75, 0x62, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x68, 0x61, 0x72, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x72, 0x6f,
0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x75, 0x66, 0x69, 0x6c, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x72, 0x6f, 0x66,
0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x69, 0x6c, 0x65, 0x42, 0x8a, 0x01, 0x0a, 0x0c, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x61, 0x75, 0x6c,
0x6c, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x74, 0x2e, 0x76, 0x31, 0x42, 0x0c, 0x47, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x50, 0x72, 0x6f,
0x65, 0x42, 0x8a, 0x01, 0x0a, 0x0c, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x2e, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d,
0x76, 0x31, 0x42, 0x0c, 0x47, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x6f, 0x6e, 0x73, 0x6f, 0x6e, 0x72, 0x2f, 0x73, 0x6f, 0x6e, 0x72, 0x2f, 0x61, 0x70, 0x69,
0x50, 0x01, 0x5a, 0x2b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x2f, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x2f, 0x76, 0x31, 0x3b, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x76,
0x6e, 0x73, 0x6f, 0x6e, 0x72, 0x2f, 0x73, 0x6f, 0x6e, 0x72, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x56, 0x58, 0x58, 0xaa, 0x02, 0x08, 0x56, 0x61, 0x75, 0x6c, 0x74, 0x2e,
0x61, 0x75, 0x6c, 0x74, 0x2f, 0x76, 0x31, 0x3b, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x76, 0x31, 0xa2, 0x56, 0x31, 0xca, 0x02, 0x08, 0x56, 0x61, 0x75, 0x6c, 0x74, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x14,
0x02, 0x03, 0x56, 0x58, 0x58, 0xaa, 0x02, 0x08, 0x56, 0x61, 0x75, 0x6c, 0x74, 0x2e, 0x56, 0x31, 0x56, 0x61, 0x75, 0x6c, 0x74, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61,
0xca, 0x02, 0x08, 0x56, 0x61, 0x75, 0x6c, 0x74, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x14, 0x56, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x09, 0x56, 0x61, 0x75, 0x6c, 0x74, 0x3a, 0x3a, 0x56, 0x31,
0x75, 0x6c, 0x74, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
0x74, 0x61, 0xea, 0x02, 0x09, 0x56, 0x61, 0x75, 0x6c, 0x74, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
} }
var ( var (