todo_v1

package
v0.0.0-...-f77ab3b Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2021 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_packet_todo_v1_resource_proto protoreflect.FileDescriptor
View Source
var File_packet_todo_v1_service_proto protoreflect.FileDescriptor
View Source
var TodoService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "packet.todo.v1.TodoService",
	HandlerType: (*TodoServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "AddTask",
			Handler:    _TodoService_AddTask_Handler,
		},
		{
			MethodName: "GetTask",
			Handler:    _TodoService_GetTask_Handler,
		},
		{
			MethodName: "ListTasks",
			Handler:    _TodoService_ListTasks_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "packet/todo/v1/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 GetTaskRequest

type GetTaskRequest struct {
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// contains filtered or unexported fields
}

func (*GetTaskRequest) Descriptor deprecated

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

Deprecated: Use GetTaskRequest.ProtoReflect.Descriptor instead.

func (*GetTaskRequest) GetId

func (x *GetTaskRequest) GetId() string

func (*GetTaskRequest) ProtoMessage

func (*GetTaskRequest) ProtoMessage()

func (*GetTaskRequest) ProtoReflect

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

func (*GetTaskRequest) Reset

func (x *GetTaskRequest) Reset()

func (*GetTaskRequest) String

func (x *GetTaskRequest) String() string

type ListTaskResponse

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

func (*ListTaskResponse) Descriptor deprecated

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

Deprecated: Use ListTaskResponse.ProtoReflect.Descriptor instead.

func (*ListTaskResponse) GetData

func (x *ListTaskResponse) GetData() []*Task

func (*ListTaskResponse) ProtoMessage

func (*ListTaskResponse) ProtoMessage()

func (*ListTaskResponse) ProtoReflect

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

func (*ListTaskResponse) Reset

func (x *ListTaskResponse) Reset()

func (*ListTaskResponse) String

func (x *ListTaskResponse) String() string

type ListTasksRequest

type ListTasksRequest 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"`
	// contains filtered or unexported fields
}

func (*ListTasksRequest) Descriptor deprecated

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

Deprecated: Use ListTasksRequest.ProtoReflect.Descriptor instead.

func (*ListTasksRequest) GetPageSize

func (x *ListTasksRequest) GetPageSize() int32

func (*ListTasksRequest) GetPageToken

func (x *ListTasksRequest) GetPageToken() string

func (*ListTasksRequest) ProtoMessage

func (*ListTasksRequest) ProtoMessage()

func (*ListTasksRequest) ProtoReflect

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

func (*ListTasksRequest) Reset

func (x *ListTasksRequest) Reset()

func (*ListTasksRequest) String

func (x *ListTasksRequest) String() string

type Task

type Task struct {
	Id          string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Title       string `protobuf:"bytes,2,opt,name=title,proto3" json:"title,omitempty"`
	Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"`
	// contains filtered or unexported fields
}

func (*Task) Descriptor deprecated

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

Deprecated: Use Task.ProtoReflect.Descriptor instead.

func (*Task) GetDescription

func (x *Task) GetDescription() string

func (*Task) GetId

func (x *Task) GetId() string

func (*Task) GetTitle

func (x *Task) GetTitle() string

func (*Task) ProtoMessage

func (*Task) ProtoMessage()

func (*Task) ProtoReflect

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

func (*Task) Reset

func (x *Task) Reset()

func (*Task) String

func (x *Task) String() string

type TodoServiceClient

type TodoServiceClient interface {
	AddTask(ctx context.Context, in *Task, opts ...grpc.CallOption) (*emptypb.Empty, error)
	GetTask(ctx context.Context, in *GetTaskRequest, opts ...grpc.CallOption) (*Task, error)
	ListTasks(ctx context.Context, in *ListTasksRequest, opts ...grpc.CallOption) (*ListTaskResponse, 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 {
	AddTask(context.Context, *Task) (*emptypb.Empty, error)
	GetTask(context.Context, *GetTaskRequest) (*Task, error)
	ListTasks(context.Context, *ListTasksRequest) (*ListTaskResponse, error)
}

TodoServiceServer is the server API for TodoService service. All implementations should embed UnimplementedTodoServiceServer for forward compatibility

type UnimplementedTodoServiceServer

type UnimplementedTodoServiceServer struct {
}

UnimplementedTodoServiceServer should be embedded to have forward compatible implementations.

func (UnimplementedTodoServiceServer) AddTask

func (UnimplementedTodoServiceServer) GetTask

func (UnimplementedTodoServiceServer) ListTasks

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.

Jump to

Keyboard shortcuts

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