|
|
|
|
@ -38,6 +38,8 @@ type TestUser struct {
|
|
|
|
|
Name string `protobuf:"bytes,4,opt,name=name,proto3" json:"name,omitempty"`
|
|
|
|
|
PhoneNumber string `protobuf:"bytes,5,opt,name=phone_number,json=phoneNumber,proto3" json:"phone_number,omitempty"`
|
|
|
|
|
Email string `protobuf:"bytes,6,opt,name=email,proto3" json:"email,omitempty"`
|
|
|
|
|
// @inject_tag: gorm:"-" json:"-"
|
|
|
|
|
Table string `protobuf:"bytes,7,opt,name=table,proto3" json:"-" gorm:"-"`
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (x *TestUser) Reset() {
|
|
|
|
|
@ -100,6 +102,13 @@ func (x *TestUser) GetEmail() string {
|
|
|
|
|
return ""
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (x *TestUser) GetTable() string {
|
|
|
|
|
if x != nil {
|
|
|
|
|
return x.Table
|
|
|
|
|
}
|
|
|
|
|
return ""
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// TestCar for gorm test car model
|
|
|
|
|
type TestCar struct {
|
|
|
|
|
state protoimpl.MessageState
|
|
|
|
|
@ -110,6 +119,8 @@ type TestCar struct {
|
|
|
|
|
Id uint32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty" gorm:"primary_key"`
|
|
|
|
|
Model string `protobuf:"bytes,4,opt,name=model,proto3" json:"model,omitempty"`
|
|
|
|
|
Mpg int32 `protobuf:"varint,5,opt,name=mpg,proto3" json:"mpg,omitempty"`
|
|
|
|
|
// @inject_tag: gorm:"-" json:"-"
|
|
|
|
|
Table string `protobuf:"bytes,6,opt,name=table,proto3" json:"-" gorm:"-"`
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (x *TestCar) Reset() {
|
|
|
|
|
@ -165,6 +176,13 @@ func (x *TestCar) GetMpg() int32 {
|
|
|
|
|
return 0
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (x *TestCar) GetTable() string {
|
|
|
|
|
if x != nil {
|
|
|
|
|
return x.Table
|
|
|
|
|
}
|
|
|
|
|
return ""
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// TestRental for gorm test rental model
|
|
|
|
|
type TestRental struct {
|
|
|
|
|
state protoimpl.MessageState
|
|
|
|
|
@ -173,6 +191,8 @@ type TestRental struct {
|
|
|
|
|
|
|
|
|
|
UserId uint32 `protobuf:"varint,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
|
|
|
|
|
CarId uint32 `protobuf:"varint,2,opt,name=car_id,json=carId,proto3" json:"car_id,omitempty"`
|
|
|
|
|
// @inject_tag: gorm:"-" json:"-"
|
|
|
|
|
Table string `protobuf:"bytes,3,opt,name=table,proto3" json:"-" gorm:"-"`
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (x *TestRental) Reset() {
|
|
|
|
|
@ -221,6 +241,86 @@ func (x *TestRental) GetCarId() uint32 {
|
|
|
|
|
return 0
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (x *TestRental) GetTable() string {
|
|
|
|
|
if x != nil {
|
|
|
|
|
return x.Table
|
|
|
|
|
}
|
|
|
|
|
return ""
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// TestNonReplayableUser for negative test
|
|
|
|
|
type TestNonReplayableUser struct {
|
|
|
|
|
state protoimpl.MessageState
|
|
|
|
|
sizeCache protoimpl.SizeCache
|
|
|
|
|
unknownFields protoimpl.UnknownFields
|
|
|
|
|
|
|
|
|
|
// @inject_tag: gorm:"primary_key"
|
|
|
|
|
Id uint32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty" gorm:"primary_key"`
|
|
|
|
|
Name string `protobuf:"bytes,4,opt,name=name,proto3" json:"name,omitempty"`
|
|
|
|
|
PhoneNumber string `protobuf:"bytes,5,opt,name=phone_number,json=phoneNumber,proto3" json:"phone_number,omitempty"`
|
|
|
|
|
Email string `protobuf:"bytes,6,opt,name=email,proto3" json:"email,omitempty"`
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (x *TestNonReplayableUser) Reset() {
|
|
|
|
|
*x = TestNonReplayableUser{}
|
|
|
|
|
if protoimpl.UnsafeEnabled {
|
|
|
|
|
mi := &file_internal_oplog_oplog_test_oplog_test_proto_msgTypes[3]
|
|
|
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
|
|
|
ms.StoreMessageInfo(mi)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (x *TestNonReplayableUser) String() string {
|
|
|
|
|
return protoimpl.X.MessageStringOf(x)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (*TestNonReplayableUser) ProtoMessage() {}
|
|
|
|
|
|
|
|
|
|
func (x *TestNonReplayableUser) ProtoReflect() protoreflect.Message {
|
|
|
|
|
mi := &file_internal_oplog_oplog_test_oplog_test_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 TestNonReplayableUser.ProtoReflect.Descriptor instead.
|
|
|
|
|
func (*TestNonReplayableUser) Descriptor() ([]byte, []int) {
|
|
|
|
|
return file_internal_oplog_oplog_test_oplog_test_proto_rawDescGZIP(), []int{3}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (x *TestNonReplayableUser) GetId() uint32 {
|
|
|
|
|
if x != nil {
|
|
|
|
|
return x.Id
|
|
|
|
|
}
|
|
|
|
|
return 0
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (x *TestNonReplayableUser) GetName() string {
|
|
|
|
|
if x != nil {
|
|
|
|
|
return x.Name
|
|
|
|
|
}
|
|
|
|
|
return ""
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (x *TestNonReplayableUser) GetPhoneNumber() string {
|
|
|
|
|
if x != nil {
|
|
|
|
|
return x.PhoneNumber
|
|
|
|
|
}
|
|
|
|
|
return ""
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (x *TestNonReplayableUser) GetEmail() string {
|
|
|
|
|
if x != nil {
|
|
|
|
|
return x.Email
|
|
|
|
|
}
|
|
|
|
|
return ""
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var File_internal_oplog_oplog_test_oplog_test_proto protoreflect.FileDescriptor
|
|
|
|
|
|
|
|
|
|
var file_internal_oplog_oplog_test_oplog_test_proto_rawDesc = []byte{
|
|
|
|
|
@ -229,27 +329,38 @@ var file_internal_oplog_oplog_test_oplog_test_proto_rawDesc = []byte{
|
|
|
|
|
0x67, 0x5f, 0x74, 0x65, 0x73, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x2d, 0x68, 0x61,
|
|
|
|
|
0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x77, 0x61, 0x74, 0x63, 0x68, 0x74, 0x6f, 0x77,
|
|
|
|
|
0x65, 0x72, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x6f, 0x70,
|
|
|
|
|
0x6c, 0x6f, 0x67, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x2e, 0x76, 0x31, 0x22, 0x67, 0x0a, 0x08, 0x54,
|
|
|
|
|
0x6c, 0x6f, 0x67, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x2e, 0x76, 0x31, 0x22, 0x7d, 0x0a, 0x08, 0x54,
|
|
|
|
|
0x65, 0x73, 0x74, 0x55, 0x73, 0x65, 0x72, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20,
|
|
|
|
|
0x01, 0x28, 0x0d, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18,
|
|
|
|
|
0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x70,
|
|
|
|
|
0x68, 0x6f, 0x6e, 0x65, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28,
|
|
|
|
|
0x09, 0x52, 0x0b, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x14,
|
|
|
|
|
0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65,
|
|
|
|
|
0x6d, 0x61, 0x69, 0x6c, 0x22, 0x41, 0x0a, 0x07, 0x54, 0x65, 0x73, 0x74, 0x43, 0x61, 0x72, 0x12,
|
|
|
|
|
0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x02, 0x69, 0x64, 0x12,
|
|
|
|
|
0x14, 0x0a, 0x05, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05,
|
|
|
|
|
0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x12, 0x10, 0x0a, 0x03, 0x6d, 0x70, 0x67, 0x18, 0x05, 0x20, 0x01,
|
|
|
|
|
0x28, 0x05, 0x52, 0x03, 0x6d, 0x70, 0x67, 0x22, 0x3c, 0x0a, 0x0a, 0x54, 0x65, 0x73, 0x74, 0x52,
|
|
|
|
|
0x65, 0x6e, 0x74, 0x61, 0x6c, 0x12, 0x17, 0x0a, 0x07, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64,
|
|
|
|
|
0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x15,
|
|
|
|
|
0x0a, 0x06, 0x63, 0x61, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05,
|
|
|
|
|
0x63, 0x61, 0x72, 0x49, 0x64, 0x42, 0x46, 0x5a, 0x44, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e,
|
|
|
|
|
0x63, 0x6f, 0x6d, 0x2f, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2f, 0x77, 0x61,
|
|
|
|
|
0x74, 0x63, 0x68, 0x74, 0x6f, 0x77, 0x65, 0x72, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61,
|
|
|
|
|
0x6c, 0x2f, 0x6f, 0x70, 0x6c, 0x6f, 0x67, 0x2f, 0x6f, 0x70, 0x6c, 0x6f, 0x67, 0x5f, 0x74, 0x65,
|
|
|
|
|
0x73, 0x74, 0x3b, 0x6f, 0x70, 0x6c, 0x6f, 0x67, 0x5f, 0x74, 0x65, 0x73, 0x74, 0x62, 0x06, 0x70,
|
|
|
|
|
0x72, 0x6f, 0x74, 0x6f, 0x33,
|
|
|
|
|
0x6d, 0x61, 0x69, 0x6c, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x07, 0x20,
|
|
|
|
|
0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x22, 0x57, 0x0a, 0x07, 0x54, 0x65,
|
|
|
|
|
0x73, 0x74, 0x43, 0x61, 0x72, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28,
|
|
|
|
|
0x0d, 0x52, 0x02, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x18, 0x04,
|
|
|
|
|
0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x12, 0x10, 0x0a, 0x03, 0x6d,
|
|
|
|
|
0x70, 0x67, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6d, 0x70, 0x67, 0x12, 0x14, 0x0a,
|
|
|
|
|
0x05, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x61,
|
|
|
|
|
0x62, 0x6c, 0x65, 0x22, 0x52, 0x0a, 0x0a, 0x54, 0x65, 0x73, 0x74, 0x52, 0x65, 0x6e, 0x74, 0x61,
|
|
|
|
|
0x6c, 0x12, 0x17, 0x0a, 0x07, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01,
|
|
|
|
|
0x28, 0x0d, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x15, 0x0a, 0x06, 0x63, 0x61,
|
|
|
|
|
0x72, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x63, 0x61, 0x72, 0x49,
|
|
|
|
|
0x64, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09,
|
|
|
|
|
0x52, 0x05, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x22, 0x74, 0x0a, 0x15, 0x54, 0x65, 0x73, 0x74, 0x4e,
|
|
|
|
|
0x6f, 0x6e, 0x52, 0x65, 0x70, 0x6c, 0x61, 0x79, 0x61, 0x62, 0x6c, 0x65, 0x55, 0x73, 0x65, 0x72,
|
|
|
|
|
0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x02, 0x69, 0x64,
|
|
|
|
|
0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04,
|
|
|
|
|
0x6e, 0x61, 0x6d, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x5f, 0x6e, 0x75,
|
|
|
|
|
0x6d, 0x62, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x70, 0x68, 0x6f, 0x6e,
|
|
|
|
|
0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c,
|
|
|
|
|
0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x42, 0x46, 0x5a,
|
|
|
|
|
0x44, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x68, 0x61, 0x73, 0x68,
|
|
|
|
|
0x69, 0x63, 0x6f, 0x72, 0x70, 0x2f, 0x77, 0x61, 0x74, 0x63, 0x68, 0x74, 0x6f, 0x77, 0x65, 0x72,
|
|
|
|
|
0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x6f, 0x70, 0x6c, 0x6f, 0x67, 0x2f,
|
|
|
|
|
0x6f, 0x70, 0x6c, 0x6f, 0x67, 0x5f, 0x74, 0x65, 0x73, 0x74, 0x3b, 0x6f, 0x70, 0x6c, 0x6f, 0x67,
|
|
|
|
|
0x5f, 0x74, 0x65, 0x73, 0x74, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var (
|
|
|
|
|
@ -264,11 +375,12 @@ func file_internal_oplog_oplog_test_oplog_test_proto_rawDescGZIP() []byte {
|
|
|
|
|
return file_internal_oplog_oplog_test_oplog_test_proto_rawDescData
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var file_internal_oplog_oplog_test_oplog_test_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
|
|
|
|
|
var file_internal_oplog_oplog_test_oplog_test_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
|
|
|
|
|
var file_internal_oplog_oplog_test_oplog_test_proto_goTypes = []interface{}{
|
|
|
|
|
(*TestUser)(nil), // 0: hashicorp.watchtower.controller.oplog.test.v1.TestUser
|
|
|
|
|
(*TestCar)(nil), // 1: hashicorp.watchtower.controller.oplog.test.v1.TestCar
|
|
|
|
|
(*TestRental)(nil), // 2: hashicorp.watchtower.controller.oplog.test.v1.TestRental
|
|
|
|
|
(*TestUser)(nil), // 0: hashicorp.watchtower.controller.oplog.test.v1.TestUser
|
|
|
|
|
(*TestCar)(nil), // 1: hashicorp.watchtower.controller.oplog.test.v1.TestCar
|
|
|
|
|
(*TestRental)(nil), // 2: hashicorp.watchtower.controller.oplog.test.v1.TestRental
|
|
|
|
|
(*TestNonReplayableUser)(nil), // 3: hashicorp.watchtower.controller.oplog.test.v1.TestNonReplayableUser
|
|
|
|
|
}
|
|
|
|
|
var file_internal_oplog_oplog_test_oplog_test_proto_depIdxs = []int32{
|
|
|
|
|
0, // [0:0] is the sub-list for method output_type
|
|
|
|
|
@ -320,6 +432,18 @@ func file_internal_oplog_oplog_test_oplog_test_proto_init() {
|
|
|
|
|
return nil
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
file_internal_oplog_oplog_test_oplog_test_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
|
|
|
|
|
switch v := v.(*TestNonReplayableUser); i {
|
|
|
|
|
case 0:
|
|
|
|
|
return &v.state
|
|
|
|
|
case 1:
|
|
|
|
|
return &v.sizeCache
|
|
|
|
|
case 2:
|
|
|
|
|
return &v.unknownFields
|
|
|
|
|
default:
|
|
|
|
|
return nil
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
type x struct{}
|
|
|
|
|
out := protoimpl.TypeBuilder{
|
|
|
|
|
@ -327,7 +451,7 @@ func file_internal_oplog_oplog_test_oplog_test_proto_init() {
|
|
|
|
|
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
|
|
|
|
RawDescriptor: file_internal_oplog_oplog_test_oplog_test_proto_rawDesc,
|
|
|
|
|
NumEnums: 0,
|
|
|
|
|
NumMessages: 3,
|
|
|
|
|
NumMessages: 4,
|
|
|
|
|
NumExtensions: 0,
|
|
|
|
|
NumServices: 0,
|
|
|
|
|
},
|
|
|
|
|
|