api

package
v0.0.0-...-6d88a91 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_api_hello_proto protoreflect.FileDescriptor

Functions

func RegisterGreeterServer

func RegisterGreeterServer(s *grpc.Server, srv GreeterServer)

Types

type GreeterClient

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

GreeterClient is the client API for Greeter service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewGreeterClient

func NewGreeterClient(cc grpc.ClientConnInterface) GreeterClient

type GreeterServer

type GreeterServer interface {
	// Sends a greeting
	SayHello(context.Context, *HelloRequest) (*HelloReply, error)
	SayMorning(context.Context, *MorningRequest) (*MorningReply, error)
}

GreeterServer is the server API for Greeter service.

type HelloReply

type HelloReply struct {
	Message string                 `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"`
	Now     *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=now,proto3" json:"now,omitempty"`
	// contains filtered or unexported fields
}

The response message containing the greetings

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) GetNow

func (x *HelloReply) GetNow() *timestamppb.Timestamp

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

The request message containing the user's name.

func (*HelloRequest) Descriptor deprecated

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

Deprecated: Use HelloRequest.ProtoReflect.Descriptor instead.

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 MorningReply

type MorningReply struct {
	Message string                 `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"`
	Now     *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=now,proto3" json:"now,omitempty"`
	// contains filtered or unexported fields
}

func (*MorningReply) Descriptor deprecated

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

Deprecated: Use MorningReply.ProtoReflect.Descriptor instead.

func (*MorningReply) GetMessage

func (x *MorningReply) GetMessage() string

func (*MorningReply) GetNow

func (x *MorningReply) GetNow() *timestamppb.Timestamp

func (*MorningReply) ProtoMessage

func (*MorningReply) ProtoMessage()

func (*MorningReply) ProtoReflect

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

func (*MorningReply) Reset

func (x *MorningReply) Reset()

func (*MorningReply) String

func (x *MorningReply) String() string

type MorningRequest

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

func (*MorningRequest) Descriptor deprecated

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

Deprecated: Use MorningRequest.ProtoReflect.Descriptor instead.

func (*MorningRequest) GetName

func (x *MorningRequest) GetName() string

func (*MorningRequest) ProtoMessage

func (*MorningRequest) ProtoMessage()

func (*MorningRequest) ProtoReflect

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

func (*MorningRequest) Reset

func (x *MorningRequest) Reset()

func (*MorningRequest) String

func (x *MorningRequest) String() string

type UnimplementedGreeterServer

type UnimplementedGreeterServer struct {
}

UnimplementedGreeterServer can be embedded to have forward compatible implementations.

func (*UnimplementedGreeterServer) SayHello

func (*UnimplementedGreeterServer) SayMorning

Jump to

Keyboard shortcuts

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