Documentation ¶
Index ¶
- Variables
- func RegisterTodoServiceServer(s grpc.ServiceRegistrar, srv TodoServiceServer)
- type Reminder
- func (*Reminder) Descriptor() ([]byte, []int)deprecated
- func (x *Reminder) GetRemindTimestamp() *timestamppb.Timestamp
- func (x *Reminder) GetReminderText() string
- func (x *Reminder) GetUserId() int64
- func (*Reminder) ProtoMessage()
- func (x *Reminder) ProtoReflect() protoreflect.Message
- func (x *Reminder) Reset()
- func (x *Reminder) String() string
- type ReminderId
- type TodoServiceClient
- type TodoServiceServer
- type TodoService_GetRemindersByUserIdClient
- type TodoService_GetRemindersByUserIdServer
- type UnimplementedTodoServiceServer
- func (UnimplementedTodoServiceServer) CreateReminder(context.Context, *Reminder) (*ReminderId, error)
- func (UnimplementedTodoServiceServer) GetRemindersByUserId(*UserId, TodoService_GetRemindersByUserIdServer) error
- func (UnimplementedTodoServiceServer) GetUser(context.Context, *UserId) (*User, error)
- func (UnimplementedTodoServiceServer) RemoveReminder(context.Context, *ReminderId) (*emptypb.Empty, error)
- func (UnimplementedTodoServiceServer) SetUser(context.Context, *User) (*emptypb.Empty, error)
- type UnsafeTodoServiceServer
- type User
- func (*User) Descriptor() ([]byte, []int)deprecated
- func (x *User) GetId() int64
- func (x *User) GetLanguageCode() *wrapperspb.StringValue
- func (x *User) GetUtcOffset() *wrapperspb.Int32Value
- func (*User) ProtoMessage()
- func (x *User) ProtoReflect() protoreflect.Message
- func (x *User) Reset()
- func (x *User) String() string
- type UserId
Constants ¶
This section is empty.
Variables ¶
var File_todo_service_proto protoreflect.FileDescriptor
var TodoService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "todoservice.TodoService", HandlerType: (*TodoServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "SetUser", Handler: _TodoService_SetUser_Handler, }, { MethodName: "GetUser", Handler: _TodoService_GetUser_Handler, }, { MethodName: "CreateReminder", Handler: _TodoService_CreateReminder_Handler, }, { MethodName: "RemoveReminder", Handler: _TodoService_RemoveReminder_Handler, }, }, Streams: []grpc.StreamDesc{ { StreamName: "GetRemindersByUserId", Handler: _TodoService_GetRemindersByUserId_Handler, ServerStreams: true, }, }, Metadata: "todo-service.proto", }
TodoService_ServiceDesc is the grpc.ServiceDesc for TodoService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterTodoServiceServer ¶
func RegisterTodoServiceServer(s grpc.ServiceRegistrar, srv TodoServiceServer)
Types ¶
type Reminder ¶
type Reminder struct { UserId int64 `protobuf:"varint,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` ReminderText string `protobuf:"bytes,2,opt,name=reminder_text,json=reminderText,proto3" json:"reminder_text,omitempty"` RemindTimestamp *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=remind_timestamp,json=remindTimestamp,proto3" json:"remind_timestamp,omitempty"` // contains filtered or unexported fields }
func (*Reminder) Descriptor
deprecated
func (*Reminder) GetRemindTimestamp ¶
func (x *Reminder) GetRemindTimestamp() *timestamppb.Timestamp
func (*Reminder) GetReminderText ¶
func (*Reminder) ProtoMessage ¶
func (*Reminder) ProtoMessage()
func (*Reminder) ProtoReflect ¶
func (x *Reminder) ProtoReflect() protoreflect.Message
type ReminderId ¶
type ReminderId struct { Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
func (*ReminderId) Descriptor
deprecated
func (*ReminderId) Descriptor() ([]byte, []int)
Deprecated: Use ReminderId.ProtoReflect.Descriptor instead.
func (*ReminderId) GetId ¶
func (x *ReminderId) GetId() int32
func (*ReminderId) ProtoMessage ¶
func (*ReminderId) ProtoMessage()
func (*ReminderId) ProtoReflect ¶
func (x *ReminderId) ProtoReflect() protoreflect.Message
func (*ReminderId) Reset ¶
func (x *ReminderId) Reset()
func (*ReminderId) String ¶
func (x *ReminderId) String() string
type TodoServiceClient ¶
type TodoServiceClient interface { SetUser(ctx context.Context, in *User, opts ...grpc.CallOption) (*emptypb.Empty, error) GetUser(ctx context.Context, in *UserId, opts ...grpc.CallOption) (*User, error) CreateReminder(ctx context.Context, in *Reminder, opts ...grpc.CallOption) (*ReminderId, error) RemoveReminder(ctx context.Context, in *ReminderId, opts ...grpc.CallOption) (*emptypb.Empty, error) GetRemindersByUserId(ctx context.Context, in *UserId, opts ...grpc.CallOption) (TodoService_GetRemindersByUserIdClient, error) }
TodoServiceClient is the client API for TodoService 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 NewTodoServiceClient ¶
func NewTodoServiceClient(cc grpc.ClientConnInterface) TodoServiceClient
type TodoServiceServer ¶
type TodoServiceServer interface { SetUser(context.Context, *User) (*emptypb.Empty, error) GetUser(context.Context, *UserId) (*User, error) CreateReminder(context.Context, *Reminder) (*ReminderId, error) RemoveReminder(context.Context, *ReminderId) (*emptypb.Empty, error) GetRemindersByUserId(*UserId, TodoService_GetRemindersByUserIdServer) error // contains filtered or unexported methods }
TodoServiceServer is the server API for TodoService service. All implementations must embed UnimplementedTodoServiceServer for forward compatibility
type TodoService_GetRemindersByUserIdClient ¶
type TodoService_GetRemindersByUserIdClient interface { Recv() (*Reminder, error) grpc.ClientStream }
type TodoService_GetRemindersByUserIdServer ¶
type TodoService_GetRemindersByUserIdServer interface { Send(*Reminder) error grpc.ServerStream }
type UnimplementedTodoServiceServer ¶
type UnimplementedTodoServiceServer struct { }
UnimplementedTodoServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedTodoServiceServer) CreateReminder ¶
func (UnimplementedTodoServiceServer) CreateReminder(context.Context, *Reminder) (*ReminderId, error)
func (UnimplementedTodoServiceServer) GetRemindersByUserId ¶
func (UnimplementedTodoServiceServer) GetRemindersByUserId(*UserId, TodoService_GetRemindersByUserIdServer) error
func (UnimplementedTodoServiceServer) RemoveReminder ¶
func (UnimplementedTodoServiceServer) RemoveReminder(context.Context, *ReminderId) (*emptypb.Empty, error)
type UnsafeTodoServiceServer ¶
type UnsafeTodoServiceServer interface {
// contains filtered or unexported methods
}
UnsafeTodoServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to TodoServiceServer will result in compilation errors.
type User ¶
type User struct { Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` LanguageCode *wrapperspb.StringValue `protobuf:"bytes,2,opt,name=language_code,json=languageCode,proto3" json:"language_code,omitempty"` UtcOffset *wrapperspb.Int32Value `protobuf:"bytes,3,opt,name=utc_offset,json=utcOffset,proto3" json:"utc_offset,omitempty"` // contains filtered or unexported fields }
func (*User) Descriptor
deprecated
func (*User) GetLanguageCode ¶
func (x *User) GetLanguageCode() *wrapperspb.StringValue
func (*User) GetUtcOffset ¶
func (x *User) GetUtcOffset() *wrapperspb.Int32Value
func (*User) ProtoMessage ¶
func (*User) ProtoMessage()
func (*User) ProtoReflect ¶
func (x *User) ProtoReflect() protoreflect.Message
type UserId ¶
type UserId struct { Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
func (*UserId) Descriptor
deprecated
func (*UserId) ProtoMessage ¶
func (*UserId) ProtoMessage()
func (*UserId) ProtoReflect ¶
func (x *UserId) ProtoReflect() protoreflect.Message