quickpizza

package
v0.11.4 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	GRPC_Status_FullMethodName    = "/quickpizza.GRPC/Status"
	GRPC_RatePizza_FullMethodName = "/quickpizza.GRPC/RatePizza"
)

Variables

View Source
var File_proto_quickpizza_proto protoreflect.FileDescriptor
View Source
var GRPC_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "quickpizza.GRPC",
	HandlerType: (*GRPCServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Status",
			Handler:    _GRPC_Status_Handler,
		},
		{
			MethodName: "RatePizza",
			Handler:    _GRPC_RatePizza_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "proto/quickpizza.proto",
}

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

Functions

func RegisterGRPCServer

func RegisterGRPCServer(s grpc.ServiceRegistrar, srv GRPCServer)

Types

type GRPCClient

type GRPCClient interface {
	Status(ctx context.Context, in *StatusRequest, opts ...grpc.CallOption) (*StatusResponse, error)
	RatePizza(ctx context.Context, in *PizzaRatingRequest, opts ...grpc.CallOption) (*PizzaRatingResponse, error)
}

GRPCClient is the client API for GRPC 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 NewGRPCClient

func NewGRPCClient(cc grpc.ClientConnInterface) GRPCClient

type GRPCServer

type GRPCServer interface {
	Status(context.Context, *StatusRequest) (*StatusResponse, error)
	RatePizza(context.Context, *PizzaRatingRequest) (*PizzaRatingResponse, error)
	// contains filtered or unexported methods
}

GRPCServer is the server API for GRPC service. All implementations must embed UnimplementedGRPCServer for forward compatibility.

type PizzaRatingRequest added in v0.11.4

type PizzaRatingRequest struct {
	Ingredients []string `protobuf:"bytes,1,rep,name=ingredients,proto3" json:"ingredients,omitempty"`
	Dough       string   `protobuf:"bytes,2,opt,name=dough,proto3" json:"dough,omitempty"`
	// contains filtered or unexported fields
}

func (*PizzaRatingRequest) Descriptor deprecated added in v0.11.4

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

Deprecated: Use PizzaRatingRequest.ProtoReflect.Descriptor instead.

func (*PizzaRatingRequest) GetDough added in v0.11.4

func (x *PizzaRatingRequest) GetDough() string

func (*PizzaRatingRequest) GetIngredients added in v0.11.4

func (x *PizzaRatingRequest) GetIngredients() []string

func (*PizzaRatingRequest) ProtoMessage added in v0.11.4

func (*PizzaRatingRequest) ProtoMessage()

func (*PizzaRatingRequest) ProtoReflect added in v0.11.4

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

func (*PizzaRatingRequest) Reset added in v0.11.4

func (x *PizzaRatingRequest) Reset()

func (*PizzaRatingRequest) String added in v0.11.4

func (x *PizzaRatingRequest) String() string

type PizzaRatingResponse added in v0.11.4

type PizzaRatingResponse struct {
	StarsRating int32 `protobuf:"varint,1,opt,name=stars_rating,json=starsRating,proto3" json:"stars_rating,omitempty"`
	// contains filtered or unexported fields
}

func (*PizzaRatingResponse) Descriptor deprecated added in v0.11.4

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

Deprecated: Use PizzaRatingResponse.ProtoReflect.Descriptor instead.

func (*PizzaRatingResponse) GetStarsRating added in v0.11.4

func (x *PizzaRatingResponse) GetStarsRating() int32

func (*PizzaRatingResponse) ProtoMessage added in v0.11.4

func (*PizzaRatingResponse) ProtoMessage()

func (*PizzaRatingResponse) ProtoReflect added in v0.11.4

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

func (*PizzaRatingResponse) Reset added in v0.11.4

func (x *PizzaRatingResponse) Reset()

func (*PizzaRatingResponse) String added in v0.11.4

func (x *PizzaRatingResponse) String() string

type StatusRequest

type StatusRequest struct {
	// contains filtered or unexported fields
}

func (*StatusRequest) Descriptor deprecated

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

Deprecated: Use StatusRequest.ProtoReflect.Descriptor instead.

func (*StatusRequest) ProtoMessage

func (*StatusRequest) ProtoMessage()

func (*StatusRequest) ProtoReflect

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

func (*StatusRequest) Reset

func (x *StatusRequest) Reset()

func (*StatusRequest) String

func (x *StatusRequest) String() string

type StatusResponse

type StatusResponse struct {
	Ready bool `protobuf:"varint,1,opt,name=ready,proto3" json:"ready,omitempty"`
	// contains filtered or unexported fields
}

func (*StatusResponse) Descriptor deprecated

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

Deprecated: Use StatusResponse.ProtoReflect.Descriptor instead.

func (*StatusResponse) GetReady

func (x *StatusResponse) GetReady() bool

func (*StatusResponse) ProtoMessage

func (*StatusResponse) ProtoMessage()

func (*StatusResponse) ProtoReflect

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

func (*StatusResponse) Reset

func (x *StatusResponse) Reset()

func (*StatusResponse) String

func (x *StatusResponse) String() string

type UnimplementedGRPCServer

type UnimplementedGRPCServer struct{}

UnimplementedGRPCServer must be embedded to have forward compatible implementations.

NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.

func (UnimplementedGRPCServer) RatePizza added in v0.11.4

func (UnimplementedGRPCServer) Status

type UnsafeGRPCServer

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

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

Jump to

Keyboard shortcuts

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