Documentation ¶
Overview ¶
Code generated by protoc-gen-entgrpc. DO NOT EDIT.
Code generated by protoc-gen-entgrpc. DO NOT EDIT.
Index ¶
- Variables
- func RegisterAttachmentServiceServer(s grpc.ServiceRegistrar, srv AttachmentServiceServer)
- func RegisterUserServiceServer(s grpc.ServiceRegistrar, srv UserServiceServer)
- type Attachment
- func (*Attachment) Descriptor() ([]byte, []int)deprecated
- func (x *Attachment) GetId() []byte
- func (x *Attachment) GetRecipients() []*User
- func (x *Attachment) GetUser() *User
- func (*Attachment) ProtoMessage()
- func (x *Attachment) ProtoReflect() protoreflect.Message
- func (x *Attachment) Reset()
- func (x *Attachment) String() string
- type AttachmentService
- func (svc *AttachmentService) Create(ctx context.Context, req *CreateAttachmentRequest) (*Attachment, error)
- func (svc *AttachmentService) Delete(ctx context.Context, req *DeleteAttachmentRequest) (*emptypb.Empty, error)
- func (svc *AttachmentService) Get(ctx context.Context, req *GetAttachmentRequest) (*Attachment, error)
- func (svc *AttachmentService) Update(ctx context.Context, req *UpdateAttachmentRequest) (*Attachment, error)
- type AttachmentServiceClient
- type AttachmentServiceServer
- type CreateAttachmentRequest
- func (*CreateAttachmentRequest) Descriptor() ([]byte, []int)deprecated
- func (x *CreateAttachmentRequest) GetAttachment() *Attachment
- func (*CreateAttachmentRequest) ProtoMessage()
- func (x *CreateAttachmentRequest) ProtoReflect() protoreflect.Message
- func (x *CreateAttachmentRequest) Reset()
- func (x *CreateAttachmentRequest) String() string
- type CreateUserRequest
- type DeleteAttachmentRequest
- func (*DeleteAttachmentRequest) Descriptor() ([]byte, []int)deprecated
- func (x *DeleteAttachmentRequest) GetId() []byte
- func (*DeleteAttachmentRequest) ProtoMessage()
- func (x *DeleteAttachmentRequest) ProtoReflect() protoreflect.Message
- func (x *DeleteAttachmentRequest) Reset()
- func (x *DeleteAttachmentRequest) String() string
- type DeleteUserRequest
- type GetAttachmentRequest
- func (*GetAttachmentRequest) Descriptor() ([]byte, []int)deprecated
- func (x *GetAttachmentRequest) GetId() []byte
- func (x *GetAttachmentRequest) GetView() GetAttachmentRequest_View
- func (*GetAttachmentRequest) ProtoMessage()
- func (x *GetAttachmentRequest) ProtoReflect() protoreflect.Message
- func (x *GetAttachmentRequest) Reset()
- func (x *GetAttachmentRequest) String() string
- type GetAttachmentRequest_View
- func (GetAttachmentRequest_View) Descriptor() protoreflect.EnumDescriptor
- func (x GetAttachmentRequest_View) Enum() *GetAttachmentRequest_View
- func (GetAttachmentRequest_View) EnumDescriptor() ([]byte, []int)deprecated
- func (x GetAttachmentRequest_View) Number() protoreflect.EnumNumber
- func (x GetAttachmentRequest_View) String() string
- func (GetAttachmentRequest_View) Type() protoreflect.EnumType
- type GetUserRequest
- func (*GetUserRequest) Descriptor() ([]byte, []int)deprecated
- func (x *GetUserRequest) GetId() int32
- 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 Group
- type Todo
- func (*Todo) Descriptor() ([]byte, []int)deprecated
- func (x *Todo) GetId() int32
- func (x *Todo) GetStatus() Todo_Status
- func (x *Todo) GetTask() string
- func (x *Todo) GetUser() *User
- func (*Todo) ProtoMessage()
- func (x *Todo) ProtoReflect() protoreflect.Message
- func (x *Todo) Reset()
- func (x *Todo) String() string
- type Todo_Status
- func (Todo_Status) Descriptor() protoreflect.EnumDescriptor
- func (x Todo_Status) Enum() *Todo_Status
- func (Todo_Status) EnumDescriptor() ([]byte, []int)deprecated
- func (x Todo_Status) Number() protoreflect.EnumNumber
- func (x Todo_Status) String() string
- func (Todo_Status) Type() protoreflect.EnumType
- type UnimplementedAttachmentServiceServer
- func (UnimplementedAttachmentServiceServer) Create(context.Context, *CreateAttachmentRequest) (*Attachment, error)
- func (UnimplementedAttachmentServiceServer) Delete(context.Context, *DeleteAttachmentRequest) (*emptypb.Empty, error)
- func (UnimplementedAttachmentServiceServer) Get(context.Context, *GetAttachmentRequest) (*Attachment, error)
- func (UnimplementedAttachmentServiceServer) Update(context.Context, *UpdateAttachmentRequest) (*Attachment, error)
- type UnimplementedUserServiceServer
- 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) Update(context.Context, *UpdateUserRequest) (*User, error)
- type UnsafeAttachmentServiceServer
- type UnsafeUserServiceServer
- type UpdateAttachmentRequest
- func (*UpdateAttachmentRequest) Descriptor() ([]byte, []int)deprecated
- func (x *UpdateAttachmentRequest) GetAttachment() *Attachment
- func (*UpdateAttachmentRequest) ProtoMessage()
- func (x *UpdateAttachmentRequest) ProtoReflect() protoreflect.Message
- func (x *UpdateAttachmentRequest) Reset()
- func (x *UpdateAttachmentRequest) String() string
- type UpdateUserRequest
- type User
- func (*User) Descriptor() ([]byte, []int)deprecated
- func (x *User) GetAttachment() *Attachment
- func (x *User) GetBanned() bool
- func (x *User) GetCrmId() []byte
- func (x *User) GetCustomPb() uint64
- func (x *User) GetExp() uint64
- func (x *User) GetExternalId() int32
- func (x *User) GetGroup() *Group
- func (x *User) GetId() int32
- func (x *User) GetJoined() *timestamppb.Timestamp
- func (x *User) GetOptBool() *wrapperspb.BoolValue
- func (x *User) GetOptNum() *wrapperspb.Int32Value
- func (x *User) GetOptStr() *wrapperspb.StringValue
- func (x *User) GetPoints() uint32
- func (x *User) GetReceived() []*Attachment
- func (x *User) GetStatus() User_Status
- func (x *User) GetUserName() string
- func (*User) ProtoMessage()
- func (x *User) ProtoReflect() protoreflect.Message
- func (x *User) Reset()
- func (x *User) String() string
- type UserService
- 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) Update(ctx context.Context, req *UpdateUserRequest) (*User, error)
- type UserServiceClient
- type UserServiceServer
- type User_Status
- func (User_Status) Descriptor() protoreflect.EnumDescriptor
- func (x User_Status) Enum() *User_Status
- func (User_Status) EnumDescriptor() ([]byte, []int)deprecated
- func (x User_Status) Number() protoreflect.EnumNumber
- func (x User_Status) String() string
- func (User_Status) Type() protoreflect.EnumType
Constants ¶
This section is empty.
Variables ¶
var ( GetAttachmentRequest_View_name = map[int32]string{ 0: "VIEW_UNSPECIFIED", 1: "BASIC", 2: "WITH_EDGE_IDS", } GetAttachmentRequest_View_value = map[string]int32{ "VIEW_UNSPECIFIED": 0, "BASIC": 1, "WITH_EDGE_IDS": 2, } )
Enum value maps for GetAttachmentRequest_View.
var ( Todo_Status_name = map[int32]string{ 0: "PENDING", 1: "IN_PROGRESS", 2: "DONE", } Todo_Status_value = map[string]int32{ "PENDING": 0, "IN_PROGRESS": 1, "DONE": 2, } )
Enum value maps for Todo_Status.
var ( User_Status_name = map[int32]string{ 0: "STATUS_UNSPECIFIED", 1: "PENDING", 2: "ACTIVE", } User_Status_value = map[string]int32{ "STATUS_UNSPECIFIED": 0, "PENDING": 1, "ACTIVE": 2, } )
Enum value maps for User_Status.
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 AttachmentService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "entpb.AttachmentService", HandlerType: (*AttachmentServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Create", Handler: _AttachmentService_Create_Handler, }, { MethodName: "Get", Handler: _AttachmentService_Get_Handler, }, { MethodName: "Update", Handler: _AttachmentService_Update_Handler, }, { MethodName: "Delete", Handler: _AttachmentService_Delete_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "entpb/entpb.proto", }
AttachmentService_ServiceDesc is the grpc.ServiceDesc for AttachmentService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
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, }, }, 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 RegisterAttachmentServiceServer ¶
func RegisterAttachmentServiceServer(s grpc.ServiceRegistrar, srv AttachmentServiceServer)
func RegisterUserServiceServer ¶
func RegisterUserServiceServer(s grpc.ServiceRegistrar, srv UserServiceServer)
Types ¶
type Attachment ¶
type Attachment struct { Id []byte `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` User *User `protobuf:"bytes,2,opt,name=user,proto3" json:"user,omitempty"` Recipients []*User `protobuf:"bytes,3,rep,name=recipients,proto3" json:"recipients,omitempty"` // contains filtered or unexported fields }
func (*Attachment) Descriptor
deprecated
func (*Attachment) Descriptor() ([]byte, []int)
Deprecated: Use Attachment.ProtoReflect.Descriptor instead.
func (*Attachment) GetId ¶
func (x *Attachment) GetId() []byte
func (*Attachment) GetRecipients ¶
func (x *Attachment) GetRecipients() []*User
func (*Attachment) GetUser ¶
func (x *Attachment) GetUser() *User
func (*Attachment) ProtoMessage ¶
func (*Attachment) ProtoMessage()
func (*Attachment) ProtoReflect ¶
func (x *Attachment) ProtoReflect() protoreflect.Message
func (*Attachment) Reset ¶
func (x *Attachment) Reset()
func (*Attachment) String ¶
func (x *Attachment) String() string
type AttachmentService ¶
type AttachmentService struct { UnimplementedAttachmentServiceServer // contains filtered or unexported fields }
AttachmentService implements AttachmentServiceServer
func NewAttachmentService ¶
func NewAttachmentService(client *ent.Client) *AttachmentService
NewAttachmentService returns a new AttachmentService
func (*AttachmentService) Create ¶
func (svc *AttachmentService) Create(ctx context.Context, req *CreateAttachmentRequest) (*Attachment, error)
Create implements AttachmentServiceServer.Create
func (*AttachmentService) Delete ¶
func (svc *AttachmentService) Delete(ctx context.Context, req *DeleteAttachmentRequest) (*emptypb.Empty, error)
Delete implements AttachmentServiceServer.Delete
func (*AttachmentService) Get ¶
func (svc *AttachmentService) Get(ctx context.Context, req *GetAttachmentRequest) (*Attachment, error)
Get implements AttachmentServiceServer.Get
func (*AttachmentService) Update ¶
func (svc *AttachmentService) Update(ctx context.Context, req *UpdateAttachmentRequest) (*Attachment, error)
Update implements AttachmentServiceServer.Update
type AttachmentServiceClient ¶
type AttachmentServiceClient interface { Create(ctx context.Context, in *CreateAttachmentRequest, opts ...grpc.CallOption) (*Attachment, error) Get(ctx context.Context, in *GetAttachmentRequest, opts ...grpc.CallOption) (*Attachment, error) Update(ctx context.Context, in *UpdateAttachmentRequest, opts ...grpc.CallOption) (*Attachment, error) Delete(ctx context.Context, in *DeleteAttachmentRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) }
AttachmentServiceClient is the client API for AttachmentService 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 NewAttachmentServiceClient ¶
func NewAttachmentServiceClient(cc grpc.ClientConnInterface) AttachmentServiceClient
type AttachmentServiceServer ¶
type AttachmentServiceServer interface { Create(context.Context, *CreateAttachmentRequest) (*Attachment, error) Get(context.Context, *GetAttachmentRequest) (*Attachment, error) Update(context.Context, *UpdateAttachmentRequest) (*Attachment, error) Delete(context.Context, *DeleteAttachmentRequest) (*emptypb.Empty, error) // contains filtered or unexported methods }
AttachmentServiceServer is the server API for AttachmentService service. All implementations must embed UnimplementedAttachmentServiceServer for forward compatibility
type CreateAttachmentRequest ¶
type CreateAttachmentRequest struct { Attachment *Attachment `protobuf:"bytes,1,opt,name=attachment,proto3" json:"attachment,omitempty"` // contains filtered or unexported fields }
func (*CreateAttachmentRequest) Descriptor
deprecated
func (*CreateAttachmentRequest) Descriptor() ([]byte, []int)
Deprecated: Use CreateAttachmentRequest.ProtoReflect.Descriptor instead.
func (*CreateAttachmentRequest) GetAttachment ¶
func (x *CreateAttachmentRequest) GetAttachment() *Attachment
func (*CreateAttachmentRequest) ProtoMessage ¶
func (*CreateAttachmentRequest) ProtoMessage()
func (*CreateAttachmentRequest) ProtoReflect ¶
func (x *CreateAttachmentRequest) ProtoReflect() protoreflect.Message
func (*CreateAttachmentRequest) Reset ¶
func (x *CreateAttachmentRequest) Reset()
func (*CreateAttachmentRequest) String ¶
func (x *CreateAttachmentRequest) 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 DeleteAttachmentRequest ¶
type DeleteAttachmentRequest struct { Id []byte `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
func (*DeleteAttachmentRequest) Descriptor
deprecated
func (*DeleteAttachmentRequest) Descriptor() ([]byte, []int)
Deprecated: Use DeleteAttachmentRequest.ProtoReflect.Descriptor instead.
func (*DeleteAttachmentRequest) GetId ¶
func (x *DeleteAttachmentRequest) GetId() []byte
func (*DeleteAttachmentRequest) ProtoMessage ¶
func (*DeleteAttachmentRequest) ProtoMessage()
func (*DeleteAttachmentRequest) ProtoReflect ¶
func (x *DeleteAttachmentRequest) ProtoReflect() protoreflect.Message
func (*DeleteAttachmentRequest) Reset ¶
func (x *DeleteAttachmentRequest) Reset()
func (*DeleteAttachmentRequest) String ¶
func (x *DeleteAttachmentRequest) String() string
type DeleteUserRequest ¶
type DeleteUserRequest struct { Id int32 `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() int32
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 GetAttachmentRequest ¶
type GetAttachmentRequest struct { Id []byte `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` View GetAttachmentRequest_View `protobuf:"varint,2,opt,name=view,proto3,enum=entpb.GetAttachmentRequest_View" json:"view,omitempty"` // contains filtered or unexported fields }
func (*GetAttachmentRequest) Descriptor
deprecated
func (*GetAttachmentRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetAttachmentRequest.ProtoReflect.Descriptor instead.
func (*GetAttachmentRequest) GetId ¶
func (x *GetAttachmentRequest) GetId() []byte
func (*GetAttachmentRequest) GetView ¶
func (x *GetAttachmentRequest) GetView() GetAttachmentRequest_View
func (*GetAttachmentRequest) ProtoMessage ¶
func (*GetAttachmentRequest) ProtoMessage()
func (*GetAttachmentRequest) ProtoReflect ¶
func (x *GetAttachmentRequest) ProtoReflect() protoreflect.Message
func (*GetAttachmentRequest) Reset ¶
func (x *GetAttachmentRequest) Reset()
func (*GetAttachmentRequest) String ¶
func (x *GetAttachmentRequest) String() string
type GetAttachmentRequest_View ¶
type GetAttachmentRequest_View int32
const ( GetAttachmentRequest_VIEW_UNSPECIFIED GetAttachmentRequest_View = 0 GetAttachmentRequest_BASIC GetAttachmentRequest_View = 1 GetAttachmentRequest_WITH_EDGE_IDS GetAttachmentRequest_View = 2 )
func (GetAttachmentRequest_View) Descriptor ¶
func (GetAttachmentRequest_View) Descriptor() protoreflect.EnumDescriptor
func (GetAttachmentRequest_View) Enum ¶
func (x GetAttachmentRequest_View) Enum() *GetAttachmentRequest_View
func (GetAttachmentRequest_View) EnumDescriptor
deprecated
func (GetAttachmentRequest_View) EnumDescriptor() ([]byte, []int)
Deprecated: Use GetAttachmentRequest_View.Descriptor instead.
func (GetAttachmentRequest_View) Number ¶
func (x GetAttachmentRequest_View) Number() protoreflect.EnumNumber
func (GetAttachmentRequest_View) String ¶
func (x GetAttachmentRequest_View) String() string
func (GetAttachmentRequest_View) Type ¶
func (GetAttachmentRequest_View) Type() protoreflect.EnumType
type GetUserRequest ¶
type GetUserRequest struct { Id int32 `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() int32
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 Group ¶
type Group struct { Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` Users []*User `protobuf:"bytes,3,rep,name=users,proto3" json:"users,omitempty"` // contains filtered or unexported fields }
func (*Group) Descriptor
deprecated
func (*Group) ProtoMessage ¶
func (*Group) ProtoMessage()
func (*Group) ProtoReflect ¶
func (x *Group) ProtoReflect() protoreflect.Message
type Todo ¶
type Todo struct { Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` Task string `protobuf:"bytes,2,opt,name=task,proto3" json:"task,omitempty"` Status Todo_Status `protobuf:"varint,3,opt,name=status,proto3,enum=entpb.Todo_Status" json:"status,omitempty"` User *User `protobuf:"bytes,4,opt,name=user,proto3" json:"user,omitempty"` // contains filtered or unexported fields }
func (*Todo) Descriptor
deprecated
func (*Todo) GetStatus ¶
func (x *Todo) GetStatus() Todo_Status
func (*Todo) ProtoMessage ¶
func (*Todo) ProtoMessage()
func (*Todo) ProtoReflect ¶
func (x *Todo) ProtoReflect() protoreflect.Message
type Todo_Status ¶
type Todo_Status int32
const ( Todo_PENDING Todo_Status = 0 Todo_IN_PROGRESS Todo_Status = 1 Todo_DONE Todo_Status = 2 )
func (Todo_Status) Descriptor ¶
func (Todo_Status) Descriptor() protoreflect.EnumDescriptor
func (Todo_Status) Enum ¶
func (x Todo_Status) Enum() *Todo_Status
func (Todo_Status) EnumDescriptor
deprecated
func (Todo_Status) EnumDescriptor() ([]byte, []int)
Deprecated: Use Todo_Status.Descriptor instead.
func (Todo_Status) Number ¶
func (x Todo_Status) Number() protoreflect.EnumNumber
func (Todo_Status) String ¶
func (x Todo_Status) String() string
func (Todo_Status) Type ¶
func (Todo_Status) Type() protoreflect.EnumType
type UnimplementedAttachmentServiceServer ¶
type UnimplementedAttachmentServiceServer struct { }
UnimplementedAttachmentServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedAttachmentServiceServer) Create ¶
func (UnimplementedAttachmentServiceServer) Create(context.Context, *CreateAttachmentRequest) (*Attachment, error)
func (UnimplementedAttachmentServiceServer) Delete ¶
func (UnimplementedAttachmentServiceServer) Delete(context.Context, *DeleteAttachmentRequest) (*emptypb.Empty, error)
func (UnimplementedAttachmentServiceServer) Get ¶
func (UnimplementedAttachmentServiceServer) Get(context.Context, *GetAttachmentRequest) (*Attachment, error)
func (UnimplementedAttachmentServiceServer) Update ¶
func (UnimplementedAttachmentServiceServer) Update(context.Context, *UpdateAttachmentRequest) (*Attachment, error)
type UnimplementedUserServiceServer ¶
type UnimplementedUserServiceServer struct { }
UnimplementedUserServiceServer must be embedded to have forward compatible implementations.
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) Update ¶
func (UnimplementedUserServiceServer) Update(context.Context, *UpdateUserRequest) (*User, error)
type UnsafeAttachmentServiceServer ¶
type UnsafeAttachmentServiceServer interface {
// contains filtered or unexported methods
}
UnsafeAttachmentServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to AttachmentServiceServer will result in compilation errors.
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 UpdateAttachmentRequest ¶
type UpdateAttachmentRequest struct { Attachment *Attachment `protobuf:"bytes,1,opt,name=attachment,proto3" json:"attachment,omitempty"` // contains filtered or unexported fields }
func (*UpdateAttachmentRequest) Descriptor
deprecated
func (*UpdateAttachmentRequest) Descriptor() ([]byte, []int)
Deprecated: Use UpdateAttachmentRequest.ProtoReflect.Descriptor instead.
func (*UpdateAttachmentRequest) GetAttachment ¶
func (x *UpdateAttachmentRequest) GetAttachment() *Attachment
func (*UpdateAttachmentRequest) ProtoMessage ¶
func (*UpdateAttachmentRequest) ProtoMessage()
func (*UpdateAttachmentRequest) ProtoReflect ¶
func (x *UpdateAttachmentRequest) ProtoReflect() protoreflect.Message
func (*UpdateAttachmentRequest) Reset ¶
func (x *UpdateAttachmentRequest) Reset()
func (*UpdateAttachmentRequest) String ¶
func (x *UpdateAttachmentRequest) String() string
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 int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` UserName string `protobuf:"bytes,2,opt,name=user_name,json=userName,proto3" json:"user_name,omitempty"` Joined *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=joined,proto3" json:"joined,omitempty"` Points uint32 `protobuf:"varint,4,opt,name=points,proto3" json:"points,omitempty"` Exp uint64 `protobuf:"varint,5,opt,name=exp,proto3" json:"exp,omitempty"` Status User_Status `protobuf:"varint,6,opt,name=status,proto3,enum=entpb.User_Status" json:"status,omitempty"` ExternalId int32 `protobuf:"varint,8,opt,name=external_id,json=externalId,proto3" json:"external_id,omitempty"` CrmId []byte `protobuf:"bytes,9,opt,name=crm_id,json=crmId,proto3" json:"crm_id,omitempty"` Banned bool `protobuf:"varint,10,opt,name=banned,proto3" json:"banned,omitempty"` CustomPb uint64 `protobuf:"varint,12,opt,name=custom_pb,json=customPb,proto3" json:"custom_pb,omitempty"` OptNum *wrapperspb.Int32Value `protobuf:"bytes,13,opt,name=opt_num,json=optNum,proto3" json:"opt_num,omitempty"` OptStr *wrapperspb.StringValue `protobuf:"bytes,14,opt,name=opt_str,json=optStr,proto3" json:"opt_str,omitempty"` OptBool *wrapperspb.BoolValue `protobuf:"bytes,15,opt,name=opt_bool,json=optBool,proto3" json:"opt_bool,omitempty"` Group *Group `protobuf:"bytes,7,opt,name=group,proto3" json:"group,omitempty"` Attachment *Attachment `protobuf:"bytes,11,opt,name=attachment,proto3" json:"attachment,omitempty"` Received []*Attachment `protobuf:"bytes,16,rep,name=received,proto3" json:"received,omitempty"` // contains filtered or unexported fields }
func (*User) Descriptor
deprecated
func (*User) GetAttachment ¶
func (x *User) GetAttachment() *Attachment
func (*User) GetCustomPb ¶
func (*User) GetExternalId ¶
func (*User) GetJoined ¶
func (x *User) GetJoined() *timestamppb.Timestamp
func (*User) GetOptBool ¶
func (x *User) GetOptBool() *wrapperspb.BoolValue
func (*User) GetOptNum ¶
func (x *User) GetOptNum() *wrapperspb.Int32Value
func (*User) GetOptStr ¶
func (x *User) GetOptStr() *wrapperspb.StringValue
func (*User) GetReceived ¶
func (x *User) GetReceived() []*Attachment
func (*User) GetStatus ¶
func (x *User) GetStatus() User_Status
func (*User) GetUserName ¶
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) 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) 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) }
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) // contains filtered or unexported methods }
UserServiceServer is the server API for UserService service. All implementations must embed UnimplementedUserServiceServer for forward compatibility
type User_Status ¶
type User_Status int32
const ( User_STATUS_UNSPECIFIED User_Status = 0 User_PENDING User_Status = 1 User_ACTIVE User_Status = 2 )
func (User_Status) Descriptor ¶
func (User_Status) Descriptor() protoreflect.EnumDescriptor
func (User_Status) Enum ¶
func (x User_Status) Enum() *User_Status
func (User_Status) EnumDescriptor
deprecated
func (User_Status) EnumDescriptor() ([]byte, []int)
Deprecated: Use User_Status.Descriptor instead.
func (User_Status) Number ¶
func (x User_Status) Number() protoreflect.EnumNumber
func (User_Status) String ¶
func (x User_Status) String() string
func (User_Status) Type ¶
func (User_Status) Type() protoreflect.EnumType