pb

package
v0.0.0-...-2241f1a Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var TodoService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "TodoService",
	HandlerType: (*TodoServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetTodo",
			Handler:    _TodoService_GetTodo_Handler,
		},
		{
			MethodName: "GetTodos",
			Handler:    _TodoService_GetTodos_Handler,
		},
		{
			MethodName: "CreateTodo",
			Handler:    _TodoService_CreateTodo_Handler,
		},
		{
			MethodName: "DeleteTodo",
			Handler:    _TodoService_DeleteTodo_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "todo.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 CreateTodoRequest

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

Types for CreateTodo

func (*CreateTodoRequest) Descriptor deprecated

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

Deprecated: Use CreateTodoRequest.ProtoReflect.Descriptor instead.

func (*CreateTodoRequest) GetTitle

func (x *CreateTodoRequest) GetTitle() string

func (*CreateTodoRequest) ProtoMessage

func (*CreateTodoRequest) ProtoMessage()

func (*CreateTodoRequest) ProtoReflect

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

func (*CreateTodoRequest) Reset

func (x *CreateTodoRequest) Reset()

func (*CreateTodoRequest) String

func (x *CreateTodoRequest) String() string

type CreateTodoResponse

type CreateTodoResponse struct {
	Todo *Todo `protobuf:"bytes,1,opt,name=todo,proto3" json:"todo,omitempty"`
	// contains filtered or unexported fields
}

func (*CreateTodoResponse) Descriptor deprecated

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

Deprecated: Use CreateTodoResponse.ProtoReflect.Descriptor instead.

func (*CreateTodoResponse) GetTodo

func (x *CreateTodoResponse) GetTodo() *Todo

func (*CreateTodoResponse) ProtoMessage

func (*CreateTodoResponse) ProtoMessage()

func (*CreateTodoResponse) ProtoReflect

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

func (*CreateTodoResponse) Reset

func (x *CreateTodoResponse) Reset()

func (*CreateTodoResponse) String

func (x *CreateTodoResponse) String() string

type DeleteTodoRequest

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

Types for DeleteTodo

func (*DeleteTodoRequest) Descriptor deprecated

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

Deprecated: Use DeleteTodoRequest.ProtoReflect.Descriptor instead.

func (*DeleteTodoRequest) GetId

func (x *DeleteTodoRequest) GetId() string

func (*DeleteTodoRequest) ProtoMessage

func (*DeleteTodoRequest) ProtoMessage()

func (*DeleteTodoRequest) ProtoReflect

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

func (*DeleteTodoRequest) Reset

func (x *DeleteTodoRequest) Reset()

func (*DeleteTodoRequest) String

func (x *DeleteTodoRequest) String() string

type DeleteTodoResponse

type DeleteTodoResponse struct {
	Affected int64 `protobuf:"varint,1,opt,name=affected,proto3" json:"affected,omitempty"`
	// contains filtered or unexported fields
}

func (*DeleteTodoResponse) Descriptor deprecated

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

Deprecated: Use DeleteTodoResponse.ProtoReflect.Descriptor instead.

func (*DeleteTodoResponse) GetAffected

func (x *DeleteTodoResponse) GetAffected() int64

func (*DeleteTodoResponse) ProtoMessage

func (*DeleteTodoResponse) ProtoMessage()

func (*DeleteTodoResponse) ProtoReflect

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

func (*DeleteTodoResponse) Reset

func (x *DeleteTodoResponse) Reset()

func (*DeleteTodoResponse) String

func (x *DeleteTodoResponse) String() string

type Empty

type Empty struct {
	// contains filtered or unexported fields
}

func (*Empty) Descriptor deprecated

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

Deprecated: Use Empty.ProtoReflect.Descriptor instead.

func (*Empty) ProtoMessage

func (*Empty) ProtoMessage()

func (*Empty) ProtoReflect

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

func (*Empty) Reset

func (x *Empty) Reset()

func (*Empty) String

func (x *Empty) String() string

type GetTodoRequest

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

Types for GetTodo

func (*GetTodoRequest) Descriptor deprecated

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

Deprecated: Use GetTodoRequest.ProtoReflect.Descriptor instead.

func (*GetTodoRequest) GetId

func (x *GetTodoRequest) GetId() string

func (*GetTodoRequest) ProtoMessage

func (*GetTodoRequest) ProtoMessage()

func (*GetTodoRequest) ProtoReflect

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

func (*GetTodoRequest) Reset

func (x *GetTodoRequest) Reset()

func (*GetTodoRequest) String

func (x *GetTodoRequest) String() string

type GetTodoResponse

type GetTodoResponse struct {
	Todo *Todo `protobuf:"bytes,1,opt,name=todo,proto3" json:"todo,omitempty"`
	// contains filtered or unexported fields
}

func (*GetTodoResponse) Descriptor deprecated

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

Deprecated: Use GetTodoResponse.ProtoReflect.Descriptor instead.

func (*GetTodoResponse) GetTodo

func (x *GetTodoResponse) GetTodo() *Todo

func (*GetTodoResponse) ProtoMessage

func (*GetTodoResponse) ProtoMessage()

func (*GetTodoResponse) ProtoReflect

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

func (*GetTodoResponse) Reset

func (x *GetTodoResponse) Reset()

func (*GetTodoResponse) String

func (x *GetTodoResponse) String() string

type GetTodosResponse

type GetTodosResponse struct {
	Todos []*Todo `protobuf:"bytes,1,rep,name=todos,proto3" json:"todos,omitempty"`
	// contains filtered or unexported fields
}

Types for GetTodos

func (*GetTodosResponse) Descriptor deprecated

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

Deprecated: Use GetTodosResponse.ProtoReflect.Descriptor instead.

func (*GetTodosResponse) GetTodos

func (x *GetTodosResponse) GetTodos() []*Todo

func (*GetTodosResponse) ProtoMessage

func (*GetTodosResponse) ProtoMessage()

func (*GetTodosResponse) ProtoReflect

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

func (*GetTodosResponse) Reset

func (x *GetTodosResponse) Reset()

func (*GetTodosResponse) String

func (x *GetTodosResponse) String() string

type Todo

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

Custom types

func (*Todo) Descriptor deprecated

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

Deprecated: Use Todo.ProtoReflect.Descriptor instead.

func (*Todo) GetId

func (x *Todo) GetId() string

func (*Todo) GetTitle

func (x *Todo) GetTitle() string

func (*Todo) ProtoMessage

func (*Todo) ProtoMessage()

func (*Todo) ProtoReflect

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

func (*Todo) Reset

func (x *Todo) Reset()

func (*Todo) String

func (x *Todo) String() string

type TodoServiceClient

type TodoServiceClient interface {
	GetTodo(ctx context.Context, in *GetTodoRequest, opts ...grpc.CallOption) (*GetTodoResponse, error)
	GetTodos(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*GetTodosResponse, error)
	CreateTodo(ctx context.Context, in *CreateTodoRequest, opts ...grpc.CallOption) (*CreateTodoResponse, error)
	DeleteTodo(ctx context.Context, in *DeleteTodoRequest, opts ...grpc.CallOption) (*DeleteTodoResponse, 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 {
	GetTodo(context.Context, *GetTodoRequest) (*GetTodoResponse, error)
	GetTodos(context.Context, *Empty) (*GetTodosResponse, error)
	CreateTodo(context.Context, *CreateTodoRequest) (*CreateTodoResponse, error)
	DeleteTodo(context.Context, *DeleteTodoRequest) (*DeleteTodoResponse, error)
	// contains filtered or unexported methods
}

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

type UnimplementedTodoServiceServer

type UnimplementedTodoServiceServer struct {
}

UnimplementedTodoServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedTodoServiceServer) CreateTodo

func (UnimplementedTodoServiceServer) DeleteTodo

func (UnimplementedTodoServiceServer) GetTodo

func (UnimplementedTodoServiceServer) GetTodos

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