feat(policy): Use int32 to avoid json converting int64->float64 string

This commit is contained in:
Louis Ruch committed 2024-01-16 13:53:44 -08:00
1 parent 360dd616ff
commit 853ce5dcd6
4 files changed
+48 -53

No files matched your search

@@ -267,7 +267,7 @@ type StoragePolicyRetainFor struct {
// days is the number of days for which a session recording will be
// retained. Must be provided.
Days int64 `protobuf:"varint,10,opt,name=days,proto3" json:"days,omitempty" class:"public"` // @gotags: `class:"public"`
Days int32 `protobuf:"varint,10,opt,name=days,proto3" json:"days,omitempty" class:"public"` // @gotags: `class:"public"`
// overridable signals whether this storage policy's retention duration can be
// overridden.
Overridable *wrapperspb.BoolValue `protobuf:"bytes,20,opt,name=overridable,proto3" json:"overridable,omitempty" class:"public"` // @gotags: `class:"public"`
@@ -305,7 +305,7 @@ func (*StoragePolicyRetainFor) Descriptor() ([]byte, []int) {
return file_controller_api_resources_policies_v1_policy_proto_rawDescGZIP(), []int{2}
}
func (x *StoragePolicyRetainFor) GetDays() int64 {
func (x *StoragePolicyRetainFor) GetDays() int32 {
if x != nil {
return x.Days
}
@@ -326,7 +326,7 @@ type StoragePolicyDeleteAfter struct {
// days is the number of days after which a session recording will be
// automatically deleted.
Days int64 `protobuf:"varint,10,opt,name=days,proto3" json:"days,omitempty" class:"public"` // @gotags: `class:"public"`
Days int32 `protobuf:"varint,10,opt,name=days,proto3" json:"days,omitempty" class:"public"` // @gotags: `class:"public"`
// overridable signals whether this storage policy's deletion policy can be
// overridden.
Overridable *wrapperspb.BoolValue `protobuf:"bytes,20,opt,name=overridable,proto3" json:"overridable,omitempty" class:"public"` // @gotags: `class:"public"`
@@ -364,7 +364,7 @@ func (*StoragePolicyDeleteAfter) Descriptor() ([]byte, []int) {
return file_controller_api_resources_policies_v1_policy_proto_rawDescGZIP(), []int{3}
}
func (x *StoragePolicyDeleteAfter) GetDays() int64 {
func (x *StoragePolicyDeleteAfter) GetDays() int32 {
if x != nil {
return x.Days
}
@@ -462,42 +462,41 @@ var file_controller_api_resources_policies_v1_policy_proto_rawDesc = []byte{
0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67,
0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x41, 0x66, 0x74,
0x65, 0x72, 0x42, 0x04, 0xa0, 0xda, 0x29, 0x01, 0x52, 0x0c, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65,
0x5f, 0x61, 0x66, 0x74, 0x65, 0x72, 0x22, 0xe7, 0x01, 0x0a, 0x16, 0x53, 0x74, 0x6f, 0x72, 0x61,
0x5f, 0x61, 0x66, 0x74, 0x65, 0x72, 0x22, 0xde, 0x01, 0x0a, 0x16, 0x53, 0x74, 0x6f, 0x72, 0x61,
0x67, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x65, 0x74, 0x61, 0x69, 0x6e, 0x46, 0x6f,
0x72, 0x12, 0x47, 0x0a, 0x04, 0x64, 0x61, 0x79, 0x73, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x03, 0x42,
0x33, 0xa0, 0xda, 0x29, 0x01, 0xc2, 0xdd, 0x29, 0x2b, 0x0a, 0x1a, 0x61, 0x74, 0x74, 0x72, 0x69,
0x62, 0x75, 0x74, 0x65, 0x73, 0x2e, 0x72, 0x65, 0x74, 0x61, 0x69, 0x6e, 0x5f, 0x66, 0x6f, 0x72,
0x2e, 0x64, 0x61, 0x79, 0x73, 0x12, 0x0d, 0x52, 0x65, 0x74, 0x61, 0x69, 0x6e, 0x46, 0x6f, 0x72,
0x44, 0x61, 0x79, 0x73, 0x52, 0x04, 0x64, 0x61, 0x79, 0x73, 0x12, 0x83, 0x01, 0x0a, 0x0b, 0x6f,
0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x14, 0x20, 0x01, 0x28, 0x0b,
0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62,
0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x45, 0xa0, 0xda,
0x29, 0x01, 0xc2, 0xdd, 0x29, 0x3d, 0x0a, 0x21, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74,
0x65, 0x73, 0x2e, 0x72, 0x65, 0x74, 0x61, 0x69, 0x6e, 0x5f, 0x66, 0x6f, 0x72, 0x2e, 0x6f, 0x76,
0x65, 0x72, 0x72, 0x69, 0x64, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x18, 0x52, 0x65, 0x74, 0x61, 0x69,
0x6e, 0x46, 0x6f, 0x72, 0x44, 0x61, 0x79, 0x73, 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x61,
0x62, 0x6c, 0x65, 0x52, 0x0b, 0x6f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x61, 0x62, 0x6c, 0x65,
0x22, 0xf1, 0x01, 0x0a, 0x18, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x50, 0x6f, 0x6c, 0x69,
0x63, 0x79, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x41, 0x66, 0x74, 0x65, 0x72, 0x12, 0x4b, 0x0a,
0x04, 0x64, 0x61, 0x79, 0x73, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x03, 0x42, 0x37, 0xa0, 0xda, 0x29,
0x01, 0xc2, 0xdd, 0x29, 0x2f, 0x0a, 0x1c, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65,
0x73, 0x2e, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x5f, 0x61, 0x66, 0x74, 0x65, 0x72, 0x2e, 0x64,
0x61, 0x79, 0x73, 0x12, 0x0f, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x41, 0x66, 0x74, 0x65, 0x72,
0x44, 0x61, 0x79, 0x73, 0x52, 0x04, 0x64, 0x61, 0x79, 0x73, 0x12, 0x87, 0x01, 0x0a, 0x0b, 0x6f,
0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x14, 0x20, 0x01, 0x28, 0x0b,
0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62,
0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x49, 0xa0, 0xda,
0x29, 0x01, 0xc2, 0xdd, 0x29, 0x41, 0x0a, 0x23, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74,
0x65, 0x73, 0x2e, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x5f, 0x61, 0x66, 0x74, 0x65, 0x72, 0x2e,
0x6f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x1a, 0x44, 0x65, 0x6c,
0x65, 0x74, 0x65, 0x41, 0x66, 0x74, 0x65, 0x72, 0x44, 0x61, 0x79, 0x73, 0x4f, 0x76, 0x65, 0x72,
0x72, 0x69, 0x64, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x0b, 0x6f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64,
0x61, 0x62, 0x6c, 0x65, 0x42, 0x52, 0x5a, 0x50, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63,
0x6f, 0x6d, 0x2f, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2f, 0x62, 0x6f, 0x75,
0x6e, 0x64, 0x61, 0x72, 0x79, 0x2f, 0x73, 0x64, 0x6b, 0x2f, 0x70, 0x62, 0x73, 0x2f, 0x63, 0x6f,
0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x72, 0x65, 0x73,
0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x2f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x3b,
0x70, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
0x72, 0x12, 0x43, 0x0a, 0x04, 0x64, 0x61, 0x79, 0x73, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x05, 0x42,
0x2f, 0xc2, 0xdd, 0x29, 0x2b, 0x0a, 0x1a, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65,
0x73, 0x2e, 0x72, 0x65, 0x74, 0x61, 0x69, 0x6e, 0x5f, 0x66, 0x6f, 0x72, 0x2e, 0x64, 0x61, 0x79,
0x73, 0x12, 0x0d, 0x52, 0x65, 0x74, 0x61, 0x69, 0x6e, 0x46, 0x6f, 0x72, 0x44, 0x61, 0x79, 0x73,
0x52, 0x04, 0x64, 0x61, 0x79, 0x73, 0x12, 0x7f, 0x0a, 0x0b, 0x6f, 0x76, 0x65, 0x72, 0x72, 0x69,
0x64, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x14, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f,
0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f,
0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x41, 0xc2, 0xdd, 0x29, 0x3d, 0x0a, 0x21, 0x61,
0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x2e, 0x72, 0x65, 0x74, 0x61, 0x69, 0x6e,
0x5f, 0x66, 0x6f, 0x72, 0x2e, 0x6f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x61, 0x62, 0x6c, 0x65,
0x12, 0x18, 0x52, 0x65, 0x74, 0x61, 0x69, 0x6e, 0x46, 0x6f, 0x72, 0x44, 0x61, 0x79, 0x73, 0x4f,
0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x0b, 0x6f, 0x76, 0x65, 0x72,
0x72, 0x69, 0x64, 0x61, 0x62, 0x6c, 0x65, 0x22, 0xe9, 0x01, 0x0a, 0x18, 0x53, 0x74, 0x6f, 0x72,
0x61, 0x67, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x41,
0x66, 0x74, 0x65, 0x72, 0x12, 0x47, 0x0a, 0x04, 0x64, 0x61, 0x79, 0x73, 0x18, 0x0a, 0x20, 0x01,
0x28, 0x05, 0x42, 0x33, 0xc2, 0xdd, 0x29, 0x2f, 0x0a, 0x1c, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62,
0x75, 0x74, 0x65, 0x73, 0x2e, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x5f, 0x61, 0x66, 0x74, 0x65,
0x72, 0x2e, 0x64, 0x61, 0x79, 0x73, 0x12, 0x0f, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x41, 0x66,
0x74, 0x65, 0x72, 0x44, 0x61, 0x79, 0x73, 0x52, 0x04, 0x64, 0x61, 0x79, 0x73, 0x12, 0x83, 0x01,
0x0a, 0x0b, 0x6f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x14, 0x20,
0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42,
0x45, 0xc2, 0xdd, 0x29, 0x41, 0x0a, 0x23, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65,
0x73, 0x2e, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x5f, 0x61, 0x66, 0x74, 0x65, 0x72, 0x2e, 0x6f,
0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x1a, 0x44, 0x65, 0x6c, 0x65,
0x74, 0x65, 0x41, 0x66, 0x74, 0x65, 0x72, 0x44, 0x61, 0x79, 0x73, 0x4f, 0x76, 0x65, 0x72, 0x72,
0x69, 0x64, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x0b, 0x6f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x61,
0x62, 0x6c, 0x65, 0x42, 0x52, 0x5a, 0x50, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f,
0x6d, 0x2f, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2f, 0x62, 0x6f, 0x75, 0x6e,
0x64, 0x61, 0x72, 0x79, 0x2f, 0x73, 0x64, 0x6b, 0x2f, 0x70, 0x62, 0x73, 0x2f, 0x63, 0x6f, 0x6e,
0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x72, 0x65, 0x73, 0x6f,
0x75, 0x72, 0x63, 0x65, 0x73, 0x2f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x3b, 0x70,
0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (