schema

package
v0.0.0-...-f5d76d0 Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2024 License: Unlicense Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Todo_CreateTodo_FullMethodName = "/schema.Todo/CreateTodo"
	Todo_GetTodo_FullMethodName    = "/schema.Todo/GetTodo"
)

Variables

View Source
var File_cmd_todo_schema_todo_proto protoreflect.FileDescriptor
View Source
var Todo_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "schema.Todo",
	HandlerType: (*TodoServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "CreateTodo",
			Handler:    _Todo_CreateTodo_Handler,
		},
		{
			MethodName: "GetTodo",
			Handler:    _Todo_GetTodo_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "cmd/todo/schema/todo.proto",
}

Todo_ServiceDesc is the grpc.ServiceDesc for Todo service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterTodoServer

func RegisterTodoServer(s grpc.ServiceRegistrar, srv TodoServer)

Types

type CreateTodoRequest

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

func (*CreateTodoRequest) Descriptor deprecated

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

Deprecated: Use CreateTodoRequest.ProtoReflect.Descriptor instead.

func (*CreateTodoRequest) GetDescription

func (x *CreateTodoRequest) GetDescription() 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 GetTodoRequest

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

func (*GetTodoRequest) Descriptor deprecated

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

Deprecated: Use GetTodoRequest.ProtoReflect.Descriptor instead.

func (*GetTodoRequest) GetId

func (x *GetTodoRequest) GetId() uint32

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 {
	Id          uint32                 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	Description string                 `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"`
	CreatedOn   *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=created_on,json=createdOn,proto3" json:"created_on,omitempty"`
	ModifiedOn  *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=modified_on,json=modifiedOn,proto3" json:"modified_on,omitempty"`
	// contains filtered or unexported fields
}

func (*GetTodoResponse) Descriptor deprecated

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

Deprecated: Use GetTodoResponse.ProtoReflect.Descriptor instead.

func (*GetTodoResponse) GetCreatedOn

func (x *GetTodoResponse) GetCreatedOn() *timestamppb.Timestamp

func (*GetTodoResponse) GetDescription

func (x *GetTodoResponse) GetDescription() string

func (*GetTodoResponse) GetId

func (x *GetTodoResponse) GetId() uint32

func (*GetTodoResponse) GetModifiedOn

func (x *GetTodoResponse) GetModifiedOn() *timestamppb.Timestamp

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 TodoClient

type TodoClient interface {
	CreateTodo(ctx context.Context, in *CreateTodoRequest, opts ...grpc.CallOption) (*GetTodoResponse, error)
	GetTodo(ctx context.Context, in *GetTodoRequest, opts ...grpc.CallOption) (*GetTodoResponse, error)
}

TodoClient is the client API for Todo 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 NewTodoClient

func NewTodoClient(cc grpc.ClientConnInterface) TodoClient

type TodoServer

type TodoServer interface {
	CreateTodo(context.Context, *CreateTodoRequest) (*GetTodoResponse, error)
	GetTodo(context.Context, *GetTodoRequest) (*GetTodoResponse, error)
	// contains filtered or unexported methods
}

TodoServer is the server API for Todo service. All implementations must embed UnimplementedTodoServer for forward compatibility

type UnimplementedTodoServer

type UnimplementedTodoServer struct {
}

UnimplementedTodoServer must be embedded to have forward compatible implementations.

func (UnimplementedTodoServer) CreateTodo

func (UnimplementedTodoServer) GetTodo

type UnsafeTodoServer

type UnsafeTodoServer interface {
	// contains filtered or unexported methods
}

UnsafeTodoServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to TodoServer will result in compilation errors.

Jump to

Keyboard shortcuts

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