pb

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: May 22, 2023 License: Apache-2.0, MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CandyStore_Buy_FullMethodName             = "/candystore.CandyStore/Buy"
	CandyStore_StreamCandyTo_FullMethodName   = "/candystore.CandyStore/StreamCandyTo"
	CandyStore_StreamCandyFrom_FullMethodName = "/candystore.CandyStore/StreamCandyFrom"
)

Variables

View Source
var CandyStore_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "candystore.CandyStore",
	HandlerType: (*CandyStoreServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Buy",
			Handler:    _CandyStore_Buy_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "StreamCandyTo",
			Handler:       _CandyStore_StreamCandyTo_Handler,
			ClientStreams: true,
		},
		{
			StreamName:    "StreamCandyFrom",
			Handler:       _CandyStore_StreamCandyFrom_Handler,
			ServerStreams: true,
		},
	},
	Metadata: "candystore.proto",
}

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

View Source
var File_candystore_proto protoreflect.FileDescriptor

Functions

func RegisterCandyStoreServer

func RegisterCandyStoreServer(s grpc.ServiceRegistrar, srv CandyStoreServer)

Types

type BuyRequest

type BuyRequest struct {
	Hops int64 `protobuf:"varint,1,opt,name=hops,proto3" json:"hops,omitempty"`
	// contains filtered or unexported fields
}

func (*BuyRequest) Descriptor deprecated

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

Deprecated: Use BuyRequest.ProtoReflect.Descriptor instead.

func (*BuyRequest) GetHops

func (x *BuyRequest) GetHops() int64

func (*BuyRequest) ProtoMessage

func (*BuyRequest) ProtoMessage()

func (*BuyRequest) ProtoReflect

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

func (*BuyRequest) Reset

func (x *BuyRequest) Reset()

func (*BuyRequest) String

func (x *BuyRequest) String() string

type Candy

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

func (*Candy) Descriptor deprecated

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

Deprecated: Use Candy.ProtoReflect.Descriptor instead.

func (*Candy) GetName

func (x *Candy) GetName() string

func (*Candy) ProtoMessage

func (*Candy) ProtoMessage()

func (*Candy) ProtoReflect

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

func (*Candy) Reset

func (x *Candy) Reset()

func (*Candy) String

func (x *Candy) String() string

type CandyStoreClient

type CandyStoreClient interface {
	Buy(ctx context.Context, in *BuyRequest, opts ...grpc.CallOption) (*Candy, error)
	StreamCandyTo(ctx context.Context, opts ...grpc.CallOption) (CandyStore_StreamCandyToClient, error)
	StreamCandyFrom(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (CandyStore_StreamCandyFromClient, error)
}

CandyStoreClient is the client API for CandyStore 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 NewCandyStoreClient

func NewCandyStoreClient(cc grpc.ClientConnInterface) CandyStoreClient

type CandyStoreServer

type CandyStoreServer interface {
	Buy(context.Context, *BuyRequest) (*Candy, error)
	StreamCandyTo(CandyStore_StreamCandyToServer) error
	StreamCandyFrom(*emptypb.Empty, CandyStore_StreamCandyFromServer) error
	// contains filtered or unexported methods
}

CandyStoreServer is the server API for CandyStore service. All implementations must embed UnimplementedCandyStoreServer for forward compatibility

type CandyStore_StreamCandyFromClient

type CandyStore_StreamCandyFromClient interface {
	Recv() (*Candy, error)
	grpc.ClientStream
}

type CandyStore_StreamCandyFromServer

type CandyStore_StreamCandyFromServer interface {
	Send(*Candy) error
	grpc.ServerStream
}

type CandyStore_StreamCandyToClient

type CandyStore_StreamCandyToClient interface {
	Send(*Candy) error
	CloseAndRecv() (*emptypb.Empty, error)
	grpc.ClientStream
}

type CandyStore_StreamCandyToServer

type CandyStore_StreamCandyToServer interface {
	SendAndClose(*emptypb.Empty) error
	Recv() (*Candy, error)
	grpc.ServerStream
}

type UnimplementedCandyStoreServer

type UnimplementedCandyStoreServer struct {
}

UnimplementedCandyStoreServer must be embedded to have forward compatible implementations.

func (UnimplementedCandyStoreServer) Buy

func (UnimplementedCandyStoreServer) StreamCandyFrom

func (UnimplementedCandyStoreServer) StreamCandyTo

type UnsafeCandyStoreServer

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

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

Jump to

Keyboard shortcuts

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