Documentation ¶
Overview ¶
Code generated by protoc-gen-entgrpc. DO NOT EDIT.
Index ¶
- Variables
- func RegisterUserServiceServer(s grpc.ServiceRegistrar, srv UserServiceServer)
- type BatchCreateUsersRequest
- func (*BatchCreateUsersRequest) Descriptor() ([]byte, []int)deprecated
- func (x *BatchCreateUsersRequest) GetRequests() []*CreateUserRequest
- func (*BatchCreateUsersRequest) ProtoMessage()
- func (x *BatchCreateUsersRequest) ProtoReflect() protoreflect.Message
- func (x *BatchCreateUsersRequest) Reset()
- func (x *BatchCreateUsersRequest) String() string
- type BatchCreateUsersResponse
- func (*BatchCreateUsersResponse) Descriptor() ([]byte, []int)deprecated
- func (x *BatchCreateUsersResponse) GetUsers() []*User
- func (*BatchCreateUsersResponse) ProtoMessage()
- func (x *BatchCreateUsersResponse) ProtoReflect() protoreflect.Message
- func (x *BatchCreateUsersResponse) Reset()
- func (x *BatchCreateUsersResponse) String() string
- type CreateUserRequest
- type DeleteUserRequest
- type GetUserRequest
- func (*GetUserRequest) Descriptor() ([]byte, []int)deprecated
- func (x *GetUserRequest) GetId() int64
- func (x *GetUserRequest) GetView() GetUserRequest_View
- func (*GetUserRequest) ProtoMessage()
- func (x *GetUserRequest) ProtoReflect() protoreflect.Message
- func (x *GetUserRequest) Reset()
- func (x *GetUserRequest) String() string
- type GetUserRequest_View
- func (GetUserRequest_View) Descriptor() protoreflect.EnumDescriptor
- func (x GetUserRequest_View) Enum() *GetUserRequest_View
- func (GetUserRequest_View) EnumDescriptor() ([]byte, []int)deprecated
- func (x GetUserRequest_View) Number() protoreflect.EnumNumber
- func (x GetUserRequest_View) String() string
- func (GetUserRequest_View) Type() protoreflect.EnumType
- type ListUserRequest
- func (*ListUserRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ListUserRequest) GetPageSize() int32
- func (x *ListUserRequest) GetPageToken() string
- func (x *ListUserRequest) GetView() ListUserRequest_View
- func (*ListUserRequest) ProtoMessage()
- func (x *ListUserRequest) ProtoReflect() protoreflect.Message
- func (x *ListUserRequest) Reset()
- func (x *ListUserRequest) String() string
- type ListUserRequest_View
- func (ListUserRequest_View) Descriptor() protoreflect.EnumDescriptor
- func (x ListUserRequest_View) Enum() *ListUserRequest_View
- func (ListUserRequest_View) EnumDescriptor() ([]byte, []int)deprecated
- func (x ListUserRequest_View) Number() protoreflect.EnumNumber
- func (x ListUserRequest_View) String() string
- func (ListUserRequest_View) Type() protoreflect.EnumType
- type ListUserResponse
- func (*ListUserResponse) Descriptor() ([]byte, []int)deprecated
- func (x *ListUserResponse) GetNextPageToken() string
- func (x *ListUserResponse) GetUserList() []*User
- func (*ListUserResponse) ProtoMessage()
- func (x *ListUserResponse) ProtoReflect() protoreflect.Message
- func (x *ListUserResponse) Reset()
- func (x *ListUserResponse) String() string
- type UnimplementedUserServiceServer
- func (UnimplementedUserServiceServer) BatchCreate(context.Context, *BatchCreateUsersRequest) (*BatchCreateUsersResponse, error)
- func (UnimplementedUserServiceServer) Create(context.Context, *CreateUserRequest) (*User, error)
- func (UnimplementedUserServiceServer) Delete(context.Context, *DeleteUserRequest) (*emptypb.Empty, error)
- func (UnimplementedUserServiceServer) Get(context.Context, *GetUserRequest) (*User, error)
- func (UnimplementedUserServiceServer) List(context.Context, *ListUserRequest) (*ListUserResponse, error)
- func (UnimplementedUserServiceServer) Update(context.Context, *UpdateUserRequest) (*User, error)
- type UnsafeUserServiceServer
- type UpdateUserRequest
- type User
- type UserService
- func (svc *UserService) BatchCreate(ctx context.Context, req *BatchCreateUsersRequest) (*BatchCreateUsersResponse, error)
- func (svc *UserService) Create(ctx context.Context, req *CreateUserRequest) (*User, error)
- func (svc *UserService) Delete(ctx context.Context, req *DeleteUserRequest) (*emptypb.Empty, error)
- func (svc *UserService) Get(ctx context.Context, req *GetUserRequest) (*User, error)
- func (svc *UserService) List(ctx context.Context, req *ListUserRequest) (*ListUserResponse, error)
- func (svc *UserService) Update(ctx context.Context, req *UpdateUserRequest) (*User, error)
- type UserServiceClient
- type UserServiceServer
Constants ¶
This section is empty.
Variables ¶
var ( GetUserRequest_View_name = map[int32]string{ 0: "VIEW_UNSPECIFIED", 1: "BASIC", 2: "WITH_EDGE_IDS", } GetUserRequest_View_value = map[string]int32{ "VIEW_UNSPECIFIED": 0, "BASIC": 1, "WITH_EDGE_IDS": 2, } )
Enum value maps for GetUserRequest_View.
var ( ListUserRequest_View_name = map[int32]string{ 0: "VIEW_UNSPECIFIED", 1: "BASIC", 2: "WITH_EDGE_IDS", } ListUserRequest_View_value = map[string]int32{ "VIEW_UNSPECIFIED": 0, "BASIC": 1, "WITH_EDGE_IDS": 2, } )
Enum value maps for ListUserRequest_View.
var File_entpb_entpb_proto protoreflect.FileDescriptor
var UserService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "entpb.UserService", HandlerType: (*UserServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Create", Handler: _UserService_Create_Handler, }, { MethodName: "Get", Handler: _UserService_Get_Handler, }, { MethodName: "Update", Handler: _UserService_Update_Handler, }, { MethodName: "Delete", Handler: _UserService_Delete_Handler, }, { MethodName: "List", Handler: _UserService_List_Handler, }, { MethodName: "BatchCreate", Handler: _UserService_BatchCreate_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "entpb/entpb.proto", }
UserService_ServiceDesc is the grpc.ServiceDesc for UserService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterUserServiceServer ¶
func RegisterUserServiceServer(s grpc.ServiceRegistrar, srv UserServiceServer)
Types ¶
type BatchCreateUsersRequest ¶
type BatchCreateUsersRequest struct { Requests []*CreateUserRequest `protobuf:"bytes,1,rep,name=requests,proto3" json:"requests,omitempty"` // contains filtered or unexported fields }
func (*BatchCreateUsersRequest) Descriptor
deprecated
func (*BatchCreateUsersRequest) Descriptor() ([]byte, []int)
Deprecated: Use BatchCreateUsersRequest.ProtoReflect.Descriptor instead.
func (*BatchCreateUsersRequest) GetRequests ¶
func (x *BatchCreateUsersRequest) GetRequests() []*CreateUserRequest
func (*BatchCreateUsersRequest) ProtoMessage ¶
func (*BatchCreateUsersRequest) ProtoMessage()
func (*BatchCreateUsersRequest) ProtoReflect ¶
func (x *BatchCreateUsersRequest) ProtoReflect() protoreflect.Message
func (*BatchCreateUsersRequest) Reset ¶
func (x *BatchCreateUsersRequest) Reset()
func (*BatchCreateUsersRequest) String ¶
func (x *BatchCreateUsersRequest) String() string
type BatchCreateUsersResponse ¶
type BatchCreateUsersResponse struct { Users []*User `protobuf:"bytes,1,rep,name=users,proto3" json:"users,omitempty"` // contains filtered or unexported fields }
func (*BatchCreateUsersResponse) Descriptor
deprecated
func (*BatchCreateUsersResponse) Descriptor() ([]byte, []int)
Deprecated: Use BatchCreateUsersResponse.ProtoReflect.Descriptor instead.
func (*BatchCreateUsersResponse) GetUsers ¶
func (x *BatchCreateUsersResponse) GetUsers() []*User
func (*BatchCreateUsersResponse) ProtoMessage ¶
func (*BatchCreateUsersResponse) ProtoMessage()
func (*BatchCreateUsersResponse) ProtoReflect ¶
func (x *BatchCreateUsersResponse) ProtoReflect() protoreflect.Message
func (*BatchCreateUsersResponse) Reset ¶
func (x *BatchCreateUsersResponse) Reset()
func (*BatchCreateUsersResponse) String ¶
func (x *BatchCreateUsersResponse) String() string
type CreateUserRequest ¶
type CreateUserRequest struct { User *User `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"` // contains filtered or unexported fields }
func (*CreateUserRequest) Descriptor
deprecated
func (*CreateUserRequest) Descriptor() ([]byte, []int)
Deprecated: Use CreateUserRequest.ProtoReflect.Descriptor instead.
func (*CreateUserRequest) GetUser ¶
func (x *CreateUserRequest) GetUser() *User
func (*CreateUserRequest) ProtoMessage ¶
func (*CreateUserRequest) ProtoMessage()
func (*CreateUserRequest) ProtoReflect ¶
func (x *CreateUserRequest) ProtoReflect() protoreflect.Message
func (*CreateUserRequest) Reset ¶
func (x *CreateUserRequest) Reset()
func (*CreateUserRequest) String ¶
func (x *CreateUserRequest) String() string
type DeleteUserRequest ¶
type DeleteUserRequest struct { Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
func (*DeleteUserRequest) Descriptor
deprecated
func (*DeleteUserRequest) Descriptor() ([]byte, []int)
Deprecated: Use DeleteUserRequest.ProtoReflect.Descriptor instead.
func (*DeleteUserRequest) GetId ¶
func (x *DeleteUserRequest) GetId() int64
func (*DeleteUserRequest) ProtoMessage ¶
func (*DeleteUserRequest) ProtoMessage()
func (*DeleteUserRequest) ProtoReflect ¶
func (x *DeleteUserRequest) ProtoReflect() protoreflect.Message
func (*DeleteUserRequest) Reset ¶
func (x *DeleteUserRequest) Reset()
func (*DeleteUserRequest) String ¶
func (x *DeleteUserRequest) String() string
type GetUserRequest ¶
type GetUserRequest struct { Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` View GetUserRequest_View `protobuf:"varint,2,opt,name=view,proto3,enum=entpb.GetUserRequest_View" json:"view,omitempty"` // contains filtered or unexported fields }
func (*GetUserRequest) Descriptor
deprecated
func (*GetUserRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetUserRequest.ProtoReflect.Descriptor instead.
func (*GetUserRequest) GetId ¶
func (x *GetUserRequest) GetId() int64
func (*GetUserRequest) GetView ¶
func (x *GetUserRequest) GetView() GetUserRequest_View
func (*GetUserRequest) ProtoMessage ¶
func (*GetUserRequest) ProtoMessage()
func (*GetUserRequest) ProtoReflect ¶
func (x *GetUserRequest) ProtoReflect() protoreflect.Message
func (*GetUserRequest) Reset ¶
func (x *GetUserRequest) Reset()
func (*GetUserRequest) String ¶
func (x *GetUserRequest) String() string
type GetUserRequest_View ¶
type GetUserRequest_View int32
const ( GetUserRequest_VIEW_UNSPECIFIED GetUserRequest_View = 0 GetUserRequest_BASIC GetUserRequest_View = 1 GetUserRequest_WITH_EDGE_IDS GetUserRequest_View = 2 )
func (GetUserRequest_View) Descriptor ¶
func (GetUserRequest_View) Descriptor() protoreflect.EnumDescriptor
func (GetUserRequest_View) Enum ¶
func (x GetUserRequest_View) Enum() *GetUserRequest_View
func (GetUserRequest_View) EnumDescriptor
deprecated
func (GetUserRequest_View) EnumDescriptor() ([]byte, []int)
Deprecated: Use GetUserRequest_View.Descriptor instead.
func (GetUserRequest_View) Number ¶
func (x GetUserRequest_View) Number() protoreflect.EnumNumber
func (GetUserRequest_View) String ¶
func (x GetUserRequest_View) String() string
func (GetUserRequest_View) Type ¶
func (GetUserRequest_View) Type() protoreflect.EnumType
type ListUserRequest ¶
type ListUserRequest struct { PageSize int32 `protobuf:"varint,1,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` PageToken string `protobuf:"bytes,2,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` View ListUserRequest_View `protobuf:"varint,3,opt,name=view,proto3,enum=entpb.ListUserRequest_View" json:"view,omitempty"` // contains filtered or unexported fields }
func (*ListUserRequest) Descriptor
deprecated
func (*ListUserRequest) Descriptor() ([]byte, []int)
Deprecated: Use ListUserRequest.ProtoReflect.Descriptor instead.
func (*ListUserRequest) GetPageSize ¶
func (x *ListUserRequest) GetPageSize() int32
func (*ListUserRequest) GetPageToken ¶
func (x *ListUserRequest) GetPageToken() string
func (*ListUserRequest) GetView ¶
func (x *ListUserRequest) GetView() ListUserRequest_View
func (*ListUserRequest) ProtoMessage ¶
func (*ListUserRequest) ProtoMessage()
func (*ListUserRequest) ProtoReflect ¶
func (x *ListUserRequest) ProtoReflect() protoreflect.Message
func (*ListUserRequest) Reset ¶
func (x *ListUserRequest) Reset()
func (*ListUserRequest) String ¶
func (x *ListUserRequest) String() string
type ListUserRequest_View ¶
type ListUserRequest_View int32
const ( ListUserRequest_VIEW_UNSPECIFIED ListUserRequest_View = 0 ListUserRequest_BASIC ListUserRequest_View = 1 ListUserRequest_WITH_EDGE_IDS ListUserRequest_View = 2 )
func (ListUserRequest_View) Descriptor ¶
func (ListUserRequest_View) Descriptor() protoreflect.EnumDescriptor
func (ListUserRequest_View) Enum ¶
func (x ListUserRequest_View) Enum() *ListUserRequest_View
func (ListUserRequest_View) EnumDescriptor
deprecated
func (ListUserRequest_View) EnumDescriptor() ([]byte, []int)
Deprecated: Use ListUserRequest_View.Descriptor instead.
func (ListUserRequest_View) Number ¶
func (x ListUserRequest_View) Number() protoreflect.EnumNumber
func (ListUserRequest_View) String ¶
func (x ListUserRequest_View) String() string
func (ListUserRequest_View) Type ¶
func (ListUserRequest_View) Type() protoreflect.EnumType
type ListUserResponse ¶
type ListUserResponse struct { UserList []*User `protobuf:"bytes,1,rep,name=user_list,json=userList,proto3" json:"user_list,omitempty"` NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` // contains filtered or unexported fields }
func (*ListUserResponse) Descriptor
deprecated
func (*ListUserResponse) Descriptor() ([]byte, []int)
Deprecated: Use ListUserResponse.ProtoReflect.Descriptor instead.
func (*ListUserResponse) GetNextPageToken ¶
func (x *ListUserResponse) GetNextPageToken() string
func (*ListUserResponse) GetUserList ¶
func (x *ListUserResponse) GetUserList() []*User
func (*ListUserResponse) ProtoMessage ¶
func (*ListUserResponse) ProtoMessage()
func (*ListUserResponse) ProtoReflect ¶
func (x *ListUserResponse) ProtoReflect() protoreflect.Message
func (*ListUserResponse) Reset ¶
func (x *ListUserResponse) Reset()
func (*ListUserResponse) String ¶
func (x *ListUserResponse) String() string
type UnimplementedUserServiceServer ¶
type UnimplementedUserServiceServer struct { }
UnimplementedUserServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedUserServiceServer) BatchCreate ¶
func (UnimplementedUserServiceServer) BatchCreate(context.Context, *BatchCreateUsersRequest) (*BatchCreateUsersResponse, error)
func (UnimplementedUserServiceServer) Create ¶
func (UnimplementedUserServiceServer) Create(context.Context, *CreateUserRequest) (*User, error)
func (UnimplementedUserServiceServer) Delete ¶
func (UnimplementedUserServiceServer) Delete(context.Context, *DeleteUserRequest) (*emptypb.Empty, error)
func (UnimplementedUserServiceServer) Get ¶
func (UnimplementedUserServiceServer) Get(context.Context, *GetUserRequest) (*User, error)
func (UnimplementedUserServiceServer) List ¶
func (UnimplementedUserServiceServer) List(context.Context, *ListUserRequest) (*ListUserResponse, error)
func (UnimplementedUserServiceServer) Update ¶
func (UnimplementedUserServiceServer) Update(context.Context, *UpdateUserRequest) (*User, error)
type UnsafeUserServiceServer ¶
type UnsafeUserServiceServer interface {
// contains filtered or unexported methods
}
UnsafeUserServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to UserServiceServer will result in compilation errors.
type UpdateUserRequest ¶
type UpdateUserRequest struct { User *User `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"` // contains filtered or unexported fields }
func (*UpdateUserRequest) Descriptor
deprecated
func (*UpdateUserRequest) Descriptor() ([]byte, []int)
Deprecated: Use UpdateUserRequest.ProtoReflect.Descriptor instead.
func (*UpdateUserRequest) GetUser ¶
func (x *UpdateUserRequest) GetUser() *User
func (*UpdateUserRequest) ProtoMessage ¶
func (*UpdateUserRequest) ProtoMessage()
func (*UpdateUserRequest) ProtoReflect ¶
func (x *UpdateUserRequest) ProtoReflect() protoreflect.Message
func (*UpdateUserRequest) Reset ¶
func (x *UpdateUserRequest) Reset()
func (*UpdateUserRequest) String ¶
func (x *UpdateUserRequest) String() string
type User ¶
type User struct { Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` // contains filtered or unexported fields }
func (*User) Descriptor
deprecated
func (*User) ProtoMessage ¶
func (*User) ProtoMessage()
func (*User) ProtoReflect ¶
func (x *User) ProtoReflect() protoreflect.Message
type UserService ¶
type UserService struct { UnimplementedUserServiceServer // contains filtered or unexported fields }
UserService implements UserServiceServer
func NewUserService ¶
func NewUserService(client *ent.Client) *UserService
NewUserService returns a new UserService
func (*UserService) BatchCreate ¶
func (svc *UserService) BatchCreate(ctx context.Context, req *BatchCreateUsersRequest) (*BatchCreateUsersResponse, error)
BatchCreate implements UserServiceServer.BatchCreate
func (*UserService) Create ¶
func (svc *UserService) Create(ctx context.Context, req *CreateUserRequest) (*User, error)
Create implements UserServiceServer.Create
func (*UserService) Delete ¶
func (svc *UserService) Delete(ctx context.Context, req *DeleteUserRequest) (*emptypb.Empty, error)
Delete implements UserServiceServer.Delete
func (*UserService) Get ¶
func (svc *UserService) Get(ctx context.Context, req *GetUserRequest) (*User, error)
Get implements UserServiceServer.Get
func (*UserService) List ¶
func (svc *UserService) List(ctx context.Context, req *ListUserRequest) (*ListUserResponse, error)
List implements UserServiceServer.List
func (*UserService) Update ¶
func (svc *UserService) Update(ctx context.Context, req *UpdateUserRequest) (*User, error)
Update implements UserServiceServer.Update
type UserServiceClient ¶
type UserServiceClient interface { Create(ctx context.Context, in *CreateUserRequest, opts ...grpc.CallOption) (*User, error) Get(ctx context.Context, in *GetUserRequest, opts ...grpc.CallOption) (*User, error) Update(ctx context.Context, in *UpdateUserRequest, opts ...grpc.CallOption) (*User, error) Delete(ctx context.Context, in *DeleteUserRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) List(ctx context.Context, in *ListUserRequest, opts ...grpc.CallOption) (*ListUserResponse, error) BatchCreate(ctx context.Context, in *BatchCreateUsersRequest, opts ...grpc.CallOption) (*BatchCreateUsersResponse, error) }
UserServiceClient is the client API for UserService 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.
func NewUserServiceClient ¶
func NewUserServiceClient(cc grpc.ClientConnInterface) UserServiceClient
type UserServiceServer ¶
type UserServiceServer interface { Create(context.Context, *CreateUserRequest) (*User, error) Get(context.Context, *GetUserRequest) (*User, error) Update(context.Context, *UpdateUserRequest) (*User, error) Delete(context.Context, *DeleteUserRequest) (*emptypb.Empty, error) List(context.Context, *ListUserRequest) (*ListUserResponse, error) BatchCreate(context.Context, *BatchCreateUsersRequest) (*BatchCreateUsersResponse, error) // contains filtered or unexported methods }
UserServiceServer is the server API for UserService service. All implementations must embed UnimplementedUserServiceServer for forward compatibility