quickpizza

package
v0.11.1 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_EvaluatePizza_FullMethodName = "/quickpizza.GRPC/EvaluatePizza"
)

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: "EvaluatePizza",
			Handler:    _GRPC_EvaluatePizza_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)
	EvaluatePizza(ctx context.Context, in *PizzaEvaluationRequest, opts ...grpc.CallOption) (*PizzaEvaluationResponse, 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)
	EvaluatePizza(context.Context, *PizzaEvaluationRequest) (*PizzaEvaluationResponse, error)
	// contains filtered or unexported methods
}

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

type PizzaEvaluationRequest

type PizzaEvaluationRequest 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 (*PizzaEvaluationRequest) Descriptor deprecated

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

Deprecated: Use PizzaEvaluationRequest.ProtoReflect.Descriptor instead.

func (*PizzaEvaluationRequest) GetDough

func (x *PizzaEvaluationRequest) GetDough() string

func (*PizzaEvaluationRequest) GetIngredients

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

func (*PizzaEvaluationRequest) ProtoMessage

func (*PizzaEvaluationRequest) ProtoMessage()

func (*PizzaEvaluationRequest) ProtoReflect

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

func (*PizzaEvaluationRequest) Reset

func (x *PizzaEvaluationRequest) Reset()

func (*PizzaEvaluationRequest) String

func (x *PizzaEvaluationRequest) String() string

type PizzaEvaluationResponse

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

func (*PizzaEvaluationResponse) Descriptor deprecated

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

Deprecated: Use PizzaEvaluationResponse.ProtoReflect.Descriptor instead.

func (*PizzaEvaluationResponse) GetStarsRating

func (x *PizzaEvaluationResponse) GetStarsRating() int32

func (*PizzaEvaluationResponse) ProtoMessage

func (*PizzaEvaluationResponse) ProtoMessage()

func (*PizzaEvaluationResponse) ProtoReflect

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

func (*PizzaEvaluationResponse) Reset

func (x *PizzaEvaluationResponse) Reset()

func (*PizzaEvaluationResponse) String

func (x *PizzaEvaluationResponse) 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) EvaluatePizza

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