test

package
v0.0.20 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MyGreeter_SayHello_FullMethodName = "/MyGreeter/SayHello"
)

Variables

View Source
var MyGreeter_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "MyGreeter",
	HandlerType: (*MyGreeterServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "SayHello",
			Handler:    _MyGreeter_SayHello_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "api.proto",
}

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

Functions

func RegisterMyGreeterServer

func RegisterMyGreeterServer(s grpc.ServiceRegistrar, srv MyGreeterServer)

Types

type Address

type Address struct {
	City    string `protobuf:"bytes,1,opt,name=city,proto3" json:"city,omitempty"`        // The city name
	State   string `protobuf:"bytes,2,opt,name=state,proto3" json:"state,omitempty"`      // The state name
	Zipcode int32  `protobuf:"varint,3,opt,name=zipcode,proto3" json:"zipcode,omitempty"` // The zip code
	Street  string `protobuf:"bytes,4,opt,name=street,proto3" json:"street,omitempty"`    // The street name
	// contains filtered or unexported fields
}

func (*Address) Descriptor deprecated

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

Deprecated: Use Address.ProtoReflect.Descriptor instead.

func (*Address) GetCity

func (x *Address) GetCity() string

func (*Address) GetState

func (x *Address) GetState() string

func (*Address) GetStreet

func (x *Address) GetStreet() string

func (*Address) GetZipcode

func (x *Address) GetZipcode() int32

func (*Address) ProtoMessage

func (*Address) ProtoMessage()

func (*Address) ProtoReflect

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

func (*Address) Reset

func (x *Address) Reset()

func (*Address) String

func (x *Address) String() string

type HelloReply

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

func (*HelloReply) Descriptor deprecated

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

Deprecated: Use HelloReply.ProtoReflect.Descriptor instead.

func (*HelloReply) GetMessage

func (x *HelloReply) GetMessage() string

func (*HelloReply) ProtoMessage

func (*HelloReply) ProtoMessage()

func (*HelloReply) ProtoReflect

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

func (*HelloReply) Reset

func (x *HelloReply) Reset()

func (*HelloReply) String

func (x *HelloReply) String() string

type HelloRequest

type HelloRequest struct {
	Name    string   `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Age     int32    `protobuf:"varint,2,opt,name=age,proto3" json:"age,omitempty"`
	Email   string   `protobuf:"bytes,3,opt,name=email,proto3" json:"email,omitempty"`
	Address *Address `protobuf:"bytes,4,opt,name=address,proto3,oneof" json:"address,omitempty"`
	// contains filtered or unexported fields
}

func (*HelloRequest) Descriptor deprecated

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

Deprecated: Use HelloRequest.ProtoReflect.Descriptor instead.

func (*HelloRequest) GetAddress

func (x *HelloRequest) GetAddress() *Address

func (*HelloRequest) GetAge

func (x *HelloRequest) GetAge() int32

func (*HelloRequest) GetEmail

func (x *HelloRequest) GetEmail() string

func (*HelloRequest) GetName

func (x *HelloRequest) GetName() string

func (*HelloRequest) ProtoMessage

func (*HelloRequest) ProtoMessage()

func (*HelloRequest) ProtoReflect

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

func (*HelloRequest) Reset

func (x *HelloRequest) Reset()

func (*HelloRequest) String

func (x *HelloRequest) String() string

type MyGreeterClient

type MyGreeterClient interface {
	// Sends a greeting
	SayHello(ctx context.Context, in *HelloRequest, opts ...grpc.CallOption) (*HelloReply, error)
}

MyGreeterClient is the client API for MyGreeter 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 NewMyGreeterClient

func NewMyGreeterClient(cc grpc.ClientConnInterface) MyGreeterClient

type MyGreeterServer

type MyGreeterServer interface {
	// Sends a greeting
	SayHello(context.Context, *HelloRequest) (*HelloReply, error)
	// contains filtered or unexported methods
}

MyGreeterServer is the server API for MyGreeter service. All implementations must embed UnimplementedMyGreeterServer for forward compatibility

type UnimplementedMyGreeterServer

type UnimplementedMyGreeterServer struct {
}

UnimplementedMyGreeterServer must be embedded to have forward compatible implementations.

func (UnimplementedMyGreeterServer) SayHello

type UnsafeMyGreeterServer

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

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

Jump to

Keyboard shortcuts

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