foo

package
v0.0.0-...-c3b3def Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2023 License: MIT Imports: 8 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_foo_foo_proto protoreflect.FileDescriptor
View Source
var Foo_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "foo.Foo",
	HandlerType: (*FooServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "DoFoo",
			Handler:    _Foo_DoFoo_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "foo/foo.proto",
}

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

Functions

func RegisterFooServer

func RegisterFooServer(s grpc.ServiceRegistrar, srv FooServer)

Types

type FooClient

type FooClient interface {
	DoFoo(ctx context.Context, in *FooReq, opts ...grpc.CallOption) (*FooResp, error)
}

FooClient is the client API for Foo 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 NewFooClient

func NewFooClient(cc grpc.ClientConnInterface) FooClient

type FooReq

type FooReq struct {
	User int64  `protobuf:"varint,1,opt,name=user,proto3" json:"user,omitempty"`
	Text string `protobuf:"bytes,2,opt,name=text,proto3" json:"text,omitempty"`
	// contains filtered or unexported fields
}

func (*FooReq) Descriptor deprecated

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

Deprecated: Use FooReq.ProtoReflect.Descriptor instead.

func (*FooReq) GetText

func (x *FooReq) GetText() string

func (*FooReq) GetUser

func (x *FooReq) GetUser() int64

func (*FooReq) ProtoMessage

func (*FooReq) ProtoMessage()

func (*FooReq) ProtoReflect

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

func (*FooReq) Reset

func (x *FooReq) Reset()

func (*FooReq) String

func (x *FooReq) String() string

type FooResp

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

func (*FooResp) Descriptor deprecated

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

Deprecated: Use FooResp.ProtoReflect.Descriptor instead.

func (*FooResp) GetUser

func (x *FooResp) GetUser() int64

func (*FooResp) ProtoMessage

func (*FooResp) ProtoMessage()

func (*FooResp) ProtoReflect

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

func (*FooResp) Reset

func (x *FooResp) Reset()

func (*FooResp) String

func (x *FooResp) String() string

type FooServer

type FooServer interface {
	DoFoo(context.Context, *FooReq) (*FooResp, error)
	// contains filtered or unexported methods
}

FooServer is the server API for Foo service. All implementations must embed UnimplementedFooServer for forward compatibility

type UnimplementedFooServer

type UnimplementedFooServer struct {
}

UnimplementedFooServer must be embedded to have forward compatible implementations.

func (UnimplementedFooServer) DoFoo

type UnsafeFooServer

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

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

Jump to

Keyboard shortcuts

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