greet

package
v0.0.0-...-f0ab668 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Greeting_KnownName_name = map[int32]string{
		0: "UNKNOWN",
		1: "ALICE",
		2: "BOB",
	}
	Greeting_KnownName_value = map[string]int32{
		"UNKNOWN": 0,
		"ALICE":   1,
		"BOB":     2,
	}
)

Enum value maps for Greeting_KnownName.

View Source
var File_greet_proto protoreflect.FileDescriptor
View Source
var GreetService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "greet.GreetService",
	HandlerType: (*GreetServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Greet",
			Handler:    _GreetService_Greet_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "greet.proto",
}

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

Functions

func RegisterGreetServiceServer

func RegisterGreetServiceServer(s grpc.ServiceRegistrar, srv GreetServiceServer)

Types

type GreetServiceClient

type GreetServiceClient interface {
	// Greets a particular person.
	Greet(ctx context.Context, in *GreetingRequest, opts ...grpc.CallOption) (*GreetingResponse, error)
}

GreetServiceClient is the client API for GreetService 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 GreetServiceServer

type GreetServiceServer interface {
	// Greets a particular person.
	Greet(context.Context, *GreetingRequest) (*GreetingResponse, error)
	// contains filtered or unexported methods
}

GreetServiceServer is the server API for GreetService service. All implementations must embed UnimplementedGreetServiceServer for forward compatibility

type Greeting

type Greeting struct {

	// A name that can be used to greet a person.
	//
	// Types that are assignable to Name:
	//
	//	*Greeting_Nickname
	//	*Greeting_FullName_
	//	*Greeting_KnownName_
	Name isGreeting_Name `protobuf_oneof:"name"`
	// contains filtered or unexported fields
}

A greeting to a particular person.

func (*Greeting) Descriptor deprecated

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

Deprecated: Use Greeting.ProtoReflect.Descriptor instead.

func (*Greeting) GetFullName

func (x *Greeting) GetFullName() *Greeting_FullName

func (*Greeting) GetKnownName

func (x *Greeting) GetKnownName() Greeting_KnownName

func (*Greeting) GetName

func (m *Greeting) GetName() isGreeting_Name

func (*Greeting) GetNickname

func (x *Greeting) GetNickname() string

func (*Greeting) ProtoMessage

func (*Greeting) ProtoMessage()

func (*Greeting) ProtoReflect

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

func (*Greeting) Reset

func (x *Greeting) Reset()

func (*Greeting) String

func (x *Greeting) String() string

type GreetingRequest

type GreetingRequest struct {

	// The greeting to perform.
	Greeting *Greeting `protobuf:"bytes,1,opt,name=greeting,proto3" json:"greeting,omitempty"`
	// contains filtered or unexported fields
}

A request to perform a greeting.

func (*GreetingRequest) Descriptor deprecated

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

Deprecated: Use GreetingRequest.ProtoReflect.Descriptor instead.

func (*GreetingRequest) GetGreeting

func (x *GreetingRequest) GetGreeting() *Greeting

func (*GreetingRequest) ProtoMessage

func (*GreetingRequest) ProtoMessage()

func (*GreetingRequest) ProtoReflect

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

func (*GreetingRequest) Reset

func (x *GreetingRequest) Reset()

func (*GreetingRequest) String

func (x *GreetingRequest) String() string

type GreetingResponse

type GreetingResponse struct {

	// The result of the greeting.
	Result string `protobuf:"bytes,1,opt,name=result,proto3" json:"result,omitempty"`
	// contains filtered or unexported fields
}

A response to a greeting.

func (*GreetingResponse) Descriptor deprecated

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

Deprecated: Use GreetingResponse.ProtoReflect.Descriptor instead.

func (*GreetingResponse) GetResult

func (x *GreetingResponse) GetResult() string

func (*GreetingResponse) ProtoMessage

func (*GreetingResponse) ProtoMessage()

func (*GreetingResponse) ProtoReflect

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

func (*GreetingResponse) Reset

func (x *GreetingResponse) Reset()

func (*GreetingResponse) String

func (x *GreetingResponse) String() string

type Greeting_FullName

type Greeting_FullName struct {

	// The first name.
	FirstName string `protobuf:"bytes,1,opt,name=first_name,json=firstName,proto3" json:"first_name,omitempty"`
	// The last name.
	LastName string `protobuf:"bytes,2,opt,name=last_name,json=lastName,proto3" json:"last_name,omitempty"`
	// contains filtered or unexported fields
}

A full name of a person.

func (*Greeting_FullName) Descriptor deprecated

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

Deprecated: Use Greeting_FullName.ProtoReflect.Descriptor instead.

func (*Greeting_FullName) GetFirstName

func (x *Greeting_FullName) GetFirstName() string

func (*Greeting_FullName) GetLastName

func (x *Greeting_FullName) GetLastName() string

func (*Greeting_FullName) ProtoMessage

func (*Greeting_FullName) ProtoMessage()

func (*Greeting_FullName) ProtoReflect

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

func (*Greeting_FullName) Reset

func (x *Greeting_FullName) Reset()

func (*Greeting_FullName) String

func (x *Greeting_FullName) String() string

type Greeting_FullName_

type Greeting_FullName_ struct {
	// A full name.
	FullName *Greeting_FullName `protobuf:"bytes,2,opt,name=full_name,json=fullName,proto3,oneof"`
}

type Greeting_KnownName

type Greeting_KnownName int32

A name that is known so we can transmit it more efficiently.

const (
	// An unknown known name. Wait, what does that mean?
	Greeting_UNKNOWN Greeting_KnownName = 0
	// Alice's name.
	Greeting_ALICE Greeting_KnownName = 1
	// Bob's name
	Greeting_BOB Greeting_KnownName = 2
)

func (Greeting_KnownName) Descriptor

func (Greeting_KnownName) Enum

func (Greeting_KnownName) EnumDescriptor deprecated

func (Greeting_KnownName) EnumDescriptor() ([]byte, []int)

Deprecated: Use Greeting_KnownName.Descriptor instead.

func (Greeting_KnownName) Number

func (Greeting_KnownName) String

func (x Greeting_KnownName) String() string

func (Greeting_KnownName) Type

type Greeting_KnownName_

type Greeting_KnownName_ struct {
	// A well known name.
	KnownName Greeting_KnownName `protobuf:"varint,3,opt,name=known_name,json=knownName,proto3,enum=greet.Greeting_KnownName,oneof"`
}

type Greeting_Nickname

type Greeting_Nickname struct {
	// A simple nickname.
	Nickname string `protobuf:"bytes,1,opt,name=nickname,proto3,oneof"`
}

type UnimplementedGreetServiceServer

type UnimplementedGreetServiceServer struct {
}

UnimplementedGreetServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedGreetServiceServer) Greet

type UnsafeGreetServiceServer

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

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

Jump to

Keyboard shortcuts

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