proto

package module
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2022 License: MIT Imports: 9 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_todos_proto protoreflect.FileDescriptor
View Source
var TodoService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "experiment.TodoService",
	HandlerType: (*TodoServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Create",
			Handler:    _TodoService_Create_Handler,
		},
		{
			MethodName: "Get",
			Handler:    _TodoService_Get_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "todos.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 Todo

type Todo struct {
	Id            string                 `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Task          string                 `protobuf:"bytes,2,opt,name=task,proto3" json:"task,omitempty"`
	CreatedAt     *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
	CustomField   string                 `protobuf:"bytes,4,opt,name=custom_field,json=customField,proto3" json:"custom_field,omitempty"`
	NewField      string                 `protobuf:"bytes,5,opt,name=new_field,json=newField,proto3" json:"new_field,omitempty"`
	AnotherField  string                 `protobuf:"bytes,6,opt,name=another_field,json=anotherField,proto3" json:"another_field,omitempty"`
	AnotherField2 string                 `protobuf:"bytes,7,opt,name=another_field2,json=anotherField2,proto3" json:"another_field2,omitempty"`
	AnotherField3 string                 `protobuf:"bytes,8,opt,name=another_field3,json=anotherField3,proto3" json:"another_field3,omitempty"`
	// contains filtered or unexported fields
}

func (*Todo) Descriptor deprecated

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

Deprecated: Use Todo.ProtoReflect.Descriptor instead.

func (*Todo) GetAnotherField added in v0.0.3

func (x *Todo) GetAnotherField() string

func (*Todo) GetAnotherField2 added in v0.0.3

func (x *Todo) GetAnotherField2() string

func (*Todo) GetAnotherField3 added in v0.0.4

func (x *Todo) GetAnotherField3() string

func (*Todo) GetCreatedAt

func (x *Todo) GetCreatedAt() *timestamppb.Timestamp

func (*Todo) GetCustomField added in v0.0.2

func (x *Todo) GetCustomField() string

func (*Todo) GetId

func (x *Todo) GetId() string

func (*Todo) GetNewField added in v0.0.2

func (x *Todo) GetNewField() string

func (*Todo) GetTask

func (x *Todo) GetTask() 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 {
	Create(ctx context.Context, in *Todo, opts ...grpc.CallOption) (*Todo, error)
	Get(ctx context.Context, in *Todo, opts ...grpc.CallOption) (*Todo, 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 {
	Create(context.Context, *Todo) (*Todo, error)
	Get(context.Context, *Todo) (*Todo, 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) Create

func (UnimplementedTodoServiceServer) Get

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