example

package
v0.0.15 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 26, 2024 License: MIT Imports: 17 Imported by: 0

Documentation

Overview

Code generated by protoc-gen-go-json. DO NOT EDIT. source: protoc-gen-gorm/example/example.proto

Index

Constants

This section is empty.

Variables

View Source
var ExampleService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "example.ExampleService",
	HandlerType: (*ExampleServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Create",
			Handler:    _ExampleService_Create_Handler,
		},
		{
			MethodName: "Delete",
			Handler:    _ExampleService_Delete_Handler,
		},
		{
			MethodName: "Update",
			Handler:    _ExampleService_Update_Handler,
		},
		{
			MethodName: "Detail",
			Handler:    _ExampleService_Detail_Handler,
		},
		{
			MethodName: "List",
			Handler:    _ExampleService_List_Handler,
		},
		{
			MethodName: "All",
			Handler:    _ExampleService_All_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "protoc-gen-gorm/example/example.proto",
}

ExampleService_ServiceDesc is the grpc.ServiceDesc for ExampleService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

View Source
var File_protoc_gen_gorm_example_example_proto protoreflect.FileDescriptor

Functions

func RegisterExampleServiceServer

func RegisterExampleServiceServer(s grpc.ServiceRegistrar, srv ExampleServiceServer)

Types

type AllSrvReq

type AllSrvReq struct {
	Req []*Req `protobuf:"bytes,1,rep,name=req,proto3" json:"req,omitempty"`
	// contains filtered or unexported fields
}

func (*AllSrvReq) Descriptor deprecated

func (*AllSrvReq) Descriptor() ([]byte, []int)

Deprecated: Use AllSrvReq.ProtoReflect.Descriptor instead.

func (*AllSrvReq) GetReq

func (x *AllSrvReq) GetReq() []*Req

func (*AllSrvReq) MarshalJSON

func (msg *AllSrvReq) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler

func (*AllSrvReq) ProtoMessage

func (*AllSrvReq) ProtoMessage()

func (*AllSrvReq) ProtoReflect

func (x *AllSrvReq) ProtoReflect() protoreflect.Message

func (*AllSrvReq) Reset

func (x *AllSrvReq) Reset()

func (*AllSrvReq) String

func (x *AllSrvReq) String() string

func (*AllSrvReq) UnmarshalJSON

func (msg *AllSrvReq) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler

type AllSrvRsp

type AllSrvRsp struct {
	Rsp []*Rsp `protobuf:"bytes,1,rep,name=rsp,proto3" json:"rsp,omitempty"`
	// contains filtered or unexported fields
}

func (*AllSrvRsp) Descriptor deprecated

func (*AllSrvRsp) Descriptor() ([]byte, []int)

Deprecated: Use AllSrvRsp.ProtoReflect.Descriptor instead.

func (*AllSrvRsp) GetRsp

func (x *AllSrvRsp) GetRsp() []*Rsp

func (*AllSrvRsp) MarshalJSON

func (msg *AllSrvRsp) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler

func (*AllSrvRsp) ProtoMessage

func (*AllSrvRsp) ProtoMessage()

func (*AllSrvRsp) ProtoReflect

func (x *AllSrvRsp) ProtoReflect() protoreflect.Message

func (*AllSrvRsp) Reset

func (x *AllSrvRsp) Reset()

func (*AllSrvRsp) String

func (x *AllSrvRsp) String() string

func (*AllSrvRsp) UnmarshalJSON

func (msg *AllSrvRsp) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler

type CreateExampleRequest

type CreateExampleRequest struct {
	Name *string `protobuf:"bytes,1,opt,name=name,proto3,oneof" json:"name,omitempty"`
	// contains filtered or unexported fields
}

func (*CreateExampleRequest) Descriptor deprecated

func (*CreateExampleRequest) Descriptor() ([]byte, []int)

Deprecated: Use CreateExampleRequest.ProtoReflect.Descriptor instead.

func (*CreateExampleRequest) GetName

func (x *CreateExampleRequest) GetName() string

func (*CreateExampleRequest) MarshalJSON

func (msg *CreateExampleRequest) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler

func (*CreateExampleRequest) ProtoMessage

func (*CreateExampleRequest) ProtoMessage()

func (*CreateExampleRequest) ProtoReflect

func (x *CreateExampleRequest) ProtoReflect() protoreflect.Message

func (*CreateExampleRequest) Reset

func (x *CreateExampleRequest) Reset()

func (*CreateExampleRequest) String

func (x *CreateExampleRequest) String() string

func (*CreateExampleRequest) UnmarshalJSON

func (msg *CreateExampleRequest) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler

type CreateExampleResponse

type CreateExampleResponse struct {
	Name *string `protobuf:"bytes,1,opt,name=name,proto3,oneof" json:"name,omitempty"`
	// contains filtered or unexported fields
}

func (*CreateExampleResponse) Descriptor deprecated

func (*CreateExampleResponse) Descriptor() ([]byte, []int)

Deprecated: Use CreateExampleResponse.ProtoReflect.Descriptor instead.

func (*CreateExampleResponse) GetName

func (x *CreateExampleResponse) GetName() string

func (*CreateExampleResponse) MarshalJSON

func (msg *CreateExampleResponse) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler

func (*CreateExampleResponse) ProtoMessage

func (*CreateExampleResponse) ProtoMessage()

func (*CreateExampleResponse) ProtoReflect

func (x *CreateExampleResponse) ProtoReflect() protoreflect.Message

func (*CreateExampleResponse) Reset

func (x *CreateExampleResponse) Reset()

func (*CreateExampleResponse) String

func (x *CreateExampleResponse) String() string

func (*CreateExampleResponse) UnmarshalJSON

func (msg *CreateExampleResponse) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler

type Example

type Example struct {
	WithNewTags     string                            `` /* 127-byte string literal not displayed */
	WithNewMultiple string                            `` /* 161-byte string literal not displayed */
	ReplaceDefault  string                            `protobuf:"bytes,3,opt,name=replace_default,json=replaceDefault,proto3" json:"replacePrevious"`
	A               string                            `protobuf:"bytes,5,opt,name=a,proto3" json:"A"`
	BJk             int32                             `protobuf:"varint,6,opt,name=b_jk,json=bJk,proto3" json:"b_Jk"`
	Test_1          []*SecondMessage                  `protobuf:"bytes,10,rep,name=test_1,json=test1,proto3" json:"test_1,omitempty"`
	Test_2          *SecondMessage                    `protobuf:"bytes,11,opt,name=test_2,json=test2,proto3,oneof" json:"test_2,omitempty"`
	Test_61         *SecondMessage                    `protobuf:"bytes,19,opt,name=test_61,json=test61,proto3" json:"test_61,omitempty"`
	Test_31         map[string]*SecondMessage         `` /* 168-byte string literal not displayed */
	Test_5          *timestamppb.Timestamp            `protobuf:"bytes,15,opt,name=test_5,json=test5,proto3" json:"test_5,omitempty"`
	Test_51         []*timestamppb.Timestamp          `protobuf:"bytes,18,rep,name=test_51,json=test51,proto3" json:"test_51,omitempty"`
	Test_17         *timestamppb.Timestamp            `protobuf:"bytes,17,opt,name=test_17,json=test17,proto3,oneof" json:"test_17,omitempty"`
	Test_3          map[string]*timestamppb.Timestamp `` /* 165-byte string literal not displayed */
	ListTest20      []string                          `protobuf:"bytes,20,rep,name=list_test20,json=listTest20,proto3" json:"list_test20,omitempty"`
	ListTest21      map[string]string                 `` /* 180-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*Example) Descriptor deprecated

func (*Example) Descriptor() ([]byte, []int)

Deprecated: Use Example.ProtoReflect.Descriptor instead.

func (*Example) GetA

func (x *Example) GetA() string

func (*Example) GetBJk

func (x *Example) GetBJk() int32

func (*Example) GetListTest20

func (x *Example) GetListTest20() []string

func (*Example) GetListTest21

func (x *Example) GetListTest21() map[string]string

func (*Example) GetReplaceDefault

func (x *Example) GetReplaceDefault() string

func (*Example) GetTest_1

func (x *Example) GetTest_1() []*SecondMessage

func (*Example) GetTest_17

func (x *Example) GetTest_17() *timestamppb.Timestamp

func (*Example) GetTest_2

func (x *Example) GetTest_2() *SecondMessage

func (*Example) GetTest_3

func (x *Example) GetTest_3() map[string]*timestamppb.Timestamp

func (*Example) GetTest_31

func (x *Example) GetTest_31() map[string]*SecondMessage

func (*Example) GetTest_5

func (x *Example) GetTest_5() *timestamppb.Timestamp

func (*Example) GetTest_51

func (x *Example) GetTest_51() []*timestamppb.Timestamp

func (*Example) GetTest_61

func (x *Example) GetTest_61() *SecondMessage

func (*Example) GetWithNewMultiple

func (x *Example) GetWithNewMultiple() string

func (*Example) GetWithNewTags

func (x *Example) GetWithNewTags() string

func (*Example) MarshalJSON

func (msg *Example) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler

func (*Example) ProtoMessage

func (*Example) ProtoMessage()

func (*Example) ProtoReflect

func (x *Example) ProtoReflect() protoreflect.Message

func (*Example) Reset

func (x *Example) Reset()

func (*Example) String

func (x *Example) String() string

func (*Example) ToModel

func (x *Example) ToModel() *ExampleModel

func (*Example) UnmarshalJSON

func (msg *Example) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler

type ExampleCreateModel

type ExampleCreateModel struct{}

type ExampleDetailModel

type ExampleDetailModel struct{}

type ExampleListModel

type ExampleListModel struct{}

type ExampleModel

type ExampleModel struct {
	WithNewTags     string                         `graphql:"withNewTags,optional" json:"with_new_tags"`
	WithNewMultiple string                         `graphql:"withNewTags,optional" json:"with_new_multiple" xml:"multi,omitempty"`
	ReplaceDefault  string                         `json:"replacePrevious"`
	A               string                         `json:"A"`
	BJk             int32                          `json:"b_Jk"`
	Test_1          []*SecondMessageModel          `json:"test_1"`
	Test_2          *SecondMessageModel            `json:"test_2"`
	Test_61         *SecondMessageModel            `json:"test_61"`
	Test_31         map[string]*SecondMessageModel `json:"test_31"`
	Test_5          time.Time                      `json:"test_5"`
	Test_51         []time.Time                    `json:"test_51"`
	Test_17         *time.Time                     `json:"test_17"`
	Test_3          map[string]time.Time           `json:"test_3"`
	ListTest20      []string                       `json:"list_test_20"`
	ListTest21      map[string]string              `json:"list_test_21"`
}

ExampleModel gen from github.com/pubgo/protobuild/pkg/protoc-gen-gorm/example.Example

func (*ExampleModel) TableName

func (m *ExampleModel) TableName() string

func (*ExampleModel) ToProto

func (m *ExampleModel) ToProto() *Example

type ExampleModelSrv

type ExampleModelSrv interface{}

type ExampleServiceClient

ExampleServiceClient is the client API for ExampleService service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

type ExampleServiceGormHandler

type ExampleServiceGormHandler interface {
	Create(ctx context.Context, req *CreateExampleRequest, where ...func(db *gorm.DB) *gorm.DB) error
	Delete(ctx context.Context, req *CreateExampleRequest, where ...func(db *gorm.DB) *gorm.DB) error
	Update(ctx context.Context, req *CreateExampleRequest, where ...func(db *gorm.DB) *gorm.DB) error
	Detail(ctx context.Context, req *CreateExampleRequest, where ...func(db *gorm.DB) *gorm.DB)
	List(ctx context.Context, req *ListExampleRequest, where ...func(db *gorm.DB) *gorm.DB) ([]*ExampleModel, error)
	All(ctx context.Context, req *AllSrvReq, where ...func(db *gorm.DB) *gorm.DB)
}

type ExampleServiceServer

ExampleServiceServer is the server API for ExampleService service. All implementations should embed UnimplementedExampleServiceServer for forward compatibility

func NewExampleServiceGormHandler

func NewExampleServiceGormHandler(db *gorm.DB) ExampleServiceServer

type ExampleUpdateModel

type ExampleUpdateModel struct{}

type ListExampleRequest

type ListExampleRequest struct {
	Any *anypb.Any `protobuf:"bytes,1,opt,name=any,proto3" json:"any,omitempty"`
	// contains filtered or unexported fields
}

func (*ListExampleRequest) Descriptor deprecated

func (*ListExampleRequest) Descriptor() ([]byte, []int)

Deprecated: Use ListExampleRequest.ProtoReflect.Descriptor instead.

func (*ListExampleRequest) GetAny

func (x *ListExampleRequest) GetAny() *anypb.Any

func (*ListExampleRequest) MarshalJSON

func (msg *ListExampleRequest) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler

func (*ListExampleRequest) ProtoMessage

func (*ListExampleRequest) ProtoMessage()

func (*ListExampleRequest) ProtoReflect

func (x *ListExampleRequest) ProtoReflect() protoreflect.Message

func (*ListExampleRequest) Reset

func (x *ListExampleRequest) Reset()

func (*ListExampleRequest) String

func (x *ListExampleRequest) String() string

func (*ListExampleRequest) UnmarshalJSON

func (msg *ListExampleRequest) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler

type ListExampleResponse

type ListExampleResponse struct {
	Data []*Example `protobuf:"bytes,1,rep,name=data,proto3" json:"data,omitempty"`
	// contains filtered or unexported fields
}

func (*ListExampleResponse) Descriptor deprecated

func (*ListExampleResponse) Descriptor() ([]byte, []int)

Deprecated: Use ListExampleResponse.ProtoReflect.Descriptor instead.

func (*ListExampleResponse) GetData

func (x *ListExampleResponse) GetData() []*Example

func (*ListExampleResponse) MarshalJSON

func (msg *ListExampleResponse) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler

func (*ListExampleResponse) ProtoMessage

func (*ListExampleResponse) ProtoMessage()

func (*ListExampleResponse) ProtoReflect

func (x *ListExampleResponse) ProtoReflect() protoreflect.Message

func (*ListExampleResponse) Reset

func (x *ListExampleResponse) Reset()

func (*ListExampleResponse) String

func (x *ListExampleResponse) String() string

func (*ListExampleResponse) UnmarshalJSON

func (msg *ListExampleResponse) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler

type Req

type Req struct {

	// Types that are assignable to Req:
	//	*Req_Req1
	//	*Req_Req2
	Req isReq_Req `protobuf_oneof:"req"`
	// contains filtered or unexported fields
}

func (*Req) Descriptor deprecated

func (*Req) Descriptor() ([]byte, []int)

Deprecated: Use Req.ProtoReflect.Descriptor instead.

func (*Req) GetReq

func (m *Req) GetReq() isReq_Req

func (*Req) GetReq1

func (x *Req) GetReq1() *CreateExampleRequest

func (*Req) GetReq2

func (x *Req) GetReq2() *ListExampleRequest

func (*Req) MarshalJSON

func (msg *Req) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler

func (*Req) ProtoMessage

func (*Req) ProtoMessage()

func (*Req) ProtoReflect

func (x *Req) ProtoReflect() protoreflect.Message

func (*Req) Reset

func (x *Req) Reset()

func (*Req) String

func (x *Req) String() string

func (*Req) UnmarshalJSON

func (msg *Req) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler

type Req_Req1

type Req_Req1 struct {
	Req1 *CreateExampleRequest `protobuf:"bytes,1,opt,name=req1,proto3,oneof"`
}

type Req_Req2

type Req_Req2 struct {
	Req2 *ListExampleRequest `protobuf:"bytes,2,opt,name=req2,proto3,oneof"`
}

type Rsp

type Rsp struct {

	// Types that are assignable to Rsp:
	//	*Rsp_Rsq1
	//	*Rsp_Rsq2
	Rsp isRsp_Rsp `protobuf_oneof:"rsp"`
	// contains filtered or unexported fields
}

func (*Rsp) Descriptor deprecated

func (*Rsp) Descriptor() ([]byte, []int)

Deprecated: Use Rsp.ProtoReflect.Descriptor instead.

func (*Rsp) GetRsp

func (m *Rsp) GetRsp() isRsp_Rsp

func (*Rsp) GetRsq1

func (x *Rsp) GetRsq1() *CreateExampleResponse

func (*Rsp) GetRsq2

func (x *Rsp) GetRsq2() *ListExampleResponse

func (*Rsp) MarshalJSON

func (msg *Rsp) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler

func (*Rsp) ProtoMessage

func (*Rsp) ProtoMessage()

func (*Rsp) ProtoReflect

func (x *Rsp) ProtoReflect() protoreflect.Message

func (*Rsp) Reset

func (x *Rsp) Reset()

func (*Rsp) String

func (x *Rsp) String() string

func (*Rsp) UnmarshalJSON

func (msg *Rsp) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler

type Rsp_Rsq1

type Rsp_Rsq1 struct {
	Rsq1 *CreateExampleResponse `protobuf:"bytes,1,opt,name=rsq1,proto3,oneof"`
}

type Rsp_Rsq2

type Rsp_Rsq2 struct {
	Rsq2 *ListExampleResponse `protobuf:"bytes,2,opt,name=rsq2,proto3,oneof"`
}

type SecondMessage

type SecondMessage struct {
	WithNewTags     string `` /* 127-byte string literal not displayed */
	WithNewMultiple string `` /* 161-byte string literal not displayed */
	ReplaceDefault  string `protobuf:"bytes,3,opt,name=replace_default,json=replaceDefault,proto3" json:"replacePrevious"`
	// contains filtered or unexported fields
}

func (*SecondMessage) Descriptor deprecated

func (*SecondMessage) Descriptor() ([]byte, []int)

Deprecated: Use SecondMessage.ProtoReflect.Descriptor instead.

func (*SecondMessage) GetReplaceDefault

func (x *SecondMessage) GetReplaceDefault() string

func (*SecondMessage) GetWithNewMultiple

func (x *SecondMessage) GetWithNewMultiple() string

func (*SecondMessage) GetWithNewTags

func (x *SecondMessage) GetWithNewTags() string

func (*SecondMessage) MarshalJSON

func (msg *SecondMessage) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler

func (*SecondMessage) ProtoMessage

func (*SecondMessage) ProtoMessage()

func (*SecondMessage) ProtoReflect

func (x *SecondMessage) ProtoReflect() protoreflect.Message

func (*SecondMessage) Reset

func (x *SecondMessage) Reset()

func (*SecondMessage) String

func (x *SecondMessage) String() string

func (*SecondMessage) ToModel

func (x *SecondMessage) ToModel() *SecondMessageModel

func (*SecondMessage) UnmarshalJSON

func (msg *SecondMessage) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler

type SecondMessageCreateModel

type SecondMessageCreateModel struct{}

type SecondMessageDetailModel

type SecondMessageDetailModel struct{}

type SecondMessageListModel

type SecondMessageListModel struct{}

type SecondMessageModel

type SecondMessageModel struct {
	WithNewTags     string `graphql:"withNewTags,optional" json:"with_new_tags"`
	WithNewMultiple string `graphql:"withNewTags,optional" json:"with_new_multiple" xml:"multi,omitempty"`
	ReplaceDefault  string `json:"replacePrevious"`
}

SecondMessageModel gen from github.com/pubgo/protobuild/pkg/protoc-gen-gorm/example.SecondMessage

func (*SecondMessageModel) TableName

func (m *SecondMessageModel) TableName() string

func (*SecondMessageModel) ToProto

func (m *SecondMessageModel) ToProto() *SecondMessage

type SecondMessageModelSrv

type SecondMessageModelSrv interface{}

type SecondMessageUpdateModel

type SecondMessageUpdateModel struct{}

type ThirdExample

type ThirdExample struct {
	Test *string `protobuf:"bytes,2,opt,name=test,proto3,oneof" json:"test,omitempty"`
	// contains filtered or unexported fields
}

func (*ThirdExample) Descriptor deprecated

func (*ThirdExample) Descriptor() ([]byte, []int)

Deprecated: Use ThirdExample.ProtoReflect.Descriptor instead.

func (*ThirdExample) GetTest

func (x *ThirdExample) GetTest() string

func (*ThirdExample) MarshalJSON

func (msg *ThirdExample) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler

func (*ThirdExample) ProtoMessage

func (*ThirdExample) ProtoMessage()

func (*ThirdExample) ProtoReflect

func (x *ThirdExample) ProtoReflect() protoreflect.Message

func (*ThirdExample) Reset

func (x *ThirdExample) Reset()

func (*ThirdExample) String

func (x *ThirdExample) String() string

func (*ThirdExample) ToModel

func (x *ThirdExample) ToModel() *ThirdExampleModel

func (*ThirdExample) UnmarshalJSON

func (msg *ThirdExample) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler

type ThirdExampleCreateModel

type ThirdExampleCreateModel struct{}

type ThirdExampleDetailModel

type ThirdExampleDetailModel struct{}

type ThirdExampleListModel

type ThirdExampleListModel struct{}

type ThirdExampleModel

type ThirdExampleModel struct {
	Test *string `json:"test"`
}

ThirdExampleModel gen from github.com/pubgo/protobuild/pkg/protoc-gen-gorm/example.ThirdExample

func (*ThirdExampleModel) TableName

func (m *ThirdExampleModel) TableName() string

func (*ThirdExampleModel) ToProto

func (m *ThirdExampleModel) ToProto() *ThirdExample

type ThirdExampleModelSrv

type ThirdExampleModelSrv interface{}

type ThirdExampleUpdateModel

type ThirdExampleUpdateModel struct{}

type UnimplementedExampleServiceServer

type UnimplementedExampleServiceServer struct {
}

UnimplementedExampleServiceServer should be embedded to have forward compatible implementations.

func (UnimplementedExampleServiceServer) All

func (UnimplementedExampleServiceServer) Create

func (UnimplementedExampleServiceServer) Delete

func (UnimplementedExampleServiceServer) Detail

func (UnimplementedExampleServiceServer) List

func (UnimplementedExampleServiceServer) Update

type UnsafeExampleServiceServer

type UnsafeExampleServiceServer interface {
	// contains filtered or unexported methods
}

UnsafeExampleServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ExampleServiceServer will result in compilation errors.

type User

type User struct {
	Id        uint64                 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	CreatedAt *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
	UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"`
	Birthday  *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=birthday,proto3" json:"birthday,omitempty"`
	Num       uint32                 `protobuf:"varint,6,opt,name=num,proto3" json:"num,omitempty"`
	// contains filtered or unexported fields
}

func (*User) Descriptor deprecated

func (*User) Descriptor() ([]byte, []int)

Deprecated: Use User.ProtoReflect.Descriptor instead.

func (*User) GetBirthday

func (x *User) GetBirthday() *timestamppb.Timestamp

func (*User) GetCreatedAt

func (x *User) GetCreatedAt() *timestamppb.Timestamp

func (*User) GetId

func (x *User) GetId() uint64

func (*User) GetNum

func (x *User) GetNum() uint32

func (*User) GetUpdatedAt

func (x *User) GetUpdatedAt() *timestamppb.Timestamp

func (*User) MarshalJSON

func (msg *User) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler

func (*User) ProtoMessage

func (*User) ProtoMessage()

func (*User) ProtoReflect

func (x *User) ProtoReflect() protoreflect.Message

func (*User) Reset

func (x *User) Reset()

func (*User) String

func (x *User) String() string

func (*User) ToModel

func (x *User) ToModel() *UserModel

func (*User) UnmarshalJSON

func (msg *User) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler

type UserCreateModel

type UserCreateModel struct {
	Birthday time.Time `json:"birthday"`
	Num      uint32    `json:"num"`
}

type UserDetailModel

type UserDetailModel struct {
	Id        uint64    `json:"id"`
	CreatedAt time.Time `json:"created_at"`
	UpdatedAt time.Time `json:"updated_at"`
	Birthday  time.Time `json:"birthday"`
	Num       uint32    `json:"num"`
}

type UserListModel

type UserListModel struct {
	Id        uint64    `json:"id"`
	CreatedAt time.Time `json:"created_at"`
	UpdatedAt time.Time `json:"updated_at"`
	Birthday  time.Time `json:"birthday"`
	Num       uint32    `json:"num"`
}

type UserModel

type UserModel struct {
	Id        uint64    `json:"id"`
	CreatedAt time.Time `json:"created_at"`
	UpdatedAt time.Time `json:"updated_at"`
	Birthday  time.Time `json:"birthday"`
	Num       uint32    `json:"num"`
}

UserModel gen from github.com/pubgo/protobuild/pkg/protoc-gen-gorm/example.User

func (*UserModel) TableName

func (m *UserModel) TableName() string

func (*UserModel) ToProto

func (m *UserModel) ToProto() *User

type UserModelSrv

type UserModelSrv interface {
	PkName() string
	PkType() uint64
	CreateByPk(db *gorm.DB, x *User) (*User, error)
	DeleteByPk(db *gorm.DB, id uint64) (uint64, error)
	UpdateByPk(db *gorm.DB, x *User) (int64, error)
	GetByPk(db *gorm.DB, id uint64) (*User, error)
	ListByPk(db *gorm.DB) ([]*User, error)
}

type UserUpdateModel

type UserUpdateModel struct {
	Id       uint64    `json:"id"`
	Birthday time.Time `json:"birthday"`
	Num      uint32    `json:"num"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL