todo_service

package
v0.0.0-...-1d236d0 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_todo_service_proto protoreflect.FileDescriptor
View Source
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) Descriptor() ([]byte, []int)

Deprecated: Use Reminder.ProtoReflect.Descriptor instead.

func (*Reminder) GetRemindTimestamp

func (x *Reminder) GetRemindTimestamp() *timestamppb.Timestamp

func (*Reminder) GetReminderText

func (x *Reminder) GetReminderText() string

func (*Reminder) GetUserId

func (x *Reminder) GetUserId() int64

func (*Reminder) ProtoMessage

func (*Reminder) ProtoMessage()

func (*Reminder) ProtoReflect

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

func (*Reminder) Reset

func (x *Reminder) Reset()

func (*Reminder) String

func (x *Reminder) String() string

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.

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) GetRemindersByUserId

func (UnimplementedTodoServiceServer) GetUser

func (UnimplementedTodoServiceServer) RemoveReminder

func (UnimplementedTodoServiceServer) SetUser

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) Descriptor() ([]byte, []int)

Deprecated: Use User.ProtoReflect.Descriptor instead.

func (*User) GetId

func (x *User) GetId() int64

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

func (*User) Reset

func (x *User) Reset()

func (*User) String

func (x *User) String() string

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) Descriptor() ([]byte, []int)

Deprecated: Use UserId.ProtoReflect.Descriptor instead.

func (*UserId) GetId

func (x *UserId) GetId() int64

func (*UserId) ProtoMessage

func (*UserId) ProtoMessage()

func (*UserId) ProtoReflect

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

func (*UserId) Reset

func (x *UserId) Reset()

func (*UserId) String

func (x *UserId) String() string

Jump to

Keyboard shortcuts

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