proto

package
v0.0.0-...-1c4ad33 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AuctionService_Bid_FullMethodName              = "/proto.AuctionService/Bid"
	AuctionService_Result_FullMethodName           = "/proto.AuctionService/Result"
	AuctionService_ConnectionStream_FullMethodName = "/proto.AuctionService/connectionStream"
)

Variables

View Source
var AuctionService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "proto.AuctionService",
	HandlerType: (*AuctionServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Bid",
			Handler:    _AuctionService_Bid_Handler,
		},
		{
			MethodName: "Result",
			Handler:    _AuctionService_Result_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "connectionStream",
			Handler:       _AuctionService_ConnectionStream_Handler,
			ServerStreams: true,
			ClientStreams: true,
		},
	},
	Metadata: "proto/auction.proto",
}

AuctionService_ServiceDesc is the grpc.ServiceDesc for AuctionService 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_proto_auction_proto protoreflect.FileDescriptor

Functions

func RegisterAuctionServiceServer

func RegisterAuctionServiceServer(s grpc.ServiceRegistrar, srv AuctionServiceServer)

Types

type Ack

type Ack struct {
	Message  string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"`
	ClientID int32  `protobuf:"varint,2,opt,name=clientID,proto3" json:"clientID,omitempty"`
	// contains filtered or unexported fields
}

func (*Ack) Descriptor deprecated

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

Deprecated: Use Ack.ProtoReflect.Descriptor instead.

func (*Ack) GetClientID

func (x *Ack) GetClientID() int32

func (*Ack) GetMessage

func (x *Ack) GetMessage() string

func (*Ack) ProtoMessage

func (*Ack) ProtoMessage()

func (*Ack) ProtoReflect

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

func (*Ack) Reset

func (x *Ack) Reset()

func (*Ack) String

func (x *Ack) String() string

type AuctionServiceClient

type AuctionServiceClient interface {
	Bid(ctx context.Context, in *BidAmount, opts ...grpc.CallOption) (*Ack, error)
	Result(ctx context.Context, in *Void, opts ...grpc.CallOption) (*Outcome, error)
	ConnectionStream(ctx context.Context, opts ...grpc.CallOption) (AuctionService_ConnectionStreamClient, error)
}

AuctionServiceClient is the client API for AuctionService 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 AuctionServiceServer

type AuctionServiceServer interface {
	Bid(context.Context, *BidAmount) (*Ack, error)
	Result(context.Context, *Void) (*Outcome, error)
	ConnectionStream(AuctionService_ConnectionStreamServer) error
	// contains filtered or unexported methods
}

AuctionServiceServer is the server API for AuctionService service. All implementations must embed UnimplementedAuctionServiceServer for forward compatibility

type AuctionService_ConnectionStreamClient

type AuctionService_ConnectionStreamClient interface {
	Send(*BackupStream) error
	Recv() (*BackupStream, error)
	grpc.ClientStream
}

type AuctionService_ConnectionStreamServer

type AuctionService_ConnectionStreamServer interface {
	Send(*BackupStream) error
	Recv() (*BackupStream, error)
	grpc.ServerStream
}

type BackupStream

type BackupStream struct {
	Backup  map[int32]float32 `` /* 156-byte string literal not displayed */
	Message string            `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
	// contains filtered or unexported fields
}

func (*BackupStream) Descriptor deprecated

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

Deprecated: Use BackupStream.ProtoReflect.Descriptor instead.

func (*BackupStream) GetBackup

func (x *BackupStream) GetBackup() map[int32]float32

func (*BackupStream) GetMessage

func (x *BackupStream) GetMessage() string

func (*BackupStream) ProtoMessage

func (*BackupStream) ProtoMessage()

func (*BackupStream) ProtoReflect

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

func (*BackupStream) Reset

func (x *BackupStream) Reset()

func (*BackupStream) String

func (x *BackupStream) String() string

type BidAmount

type BidAmount struct {
	ClientID   int32   `protobuf:"varint,1,opt,name=clientID,proto3" json:"clientID,omitempty"`
	ClientName string  `protobuf:"bytes,2,opt,name=clientName,proto3" json:"clientName,omitempty"`
	Amount     float32 `protobuf:"fixed32,3,opt,name=amount,proto3" json:"amount,omitempty"`
	// contains filtered or unexported fields
}

func (*BidAmount) Descriptor deprecated

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

Deprecated: Use BidAmount.ProtoReflect.Descriptor instead.

func (*BidAmount) GetAmount

func (x *BidAmount) GetAmount() float32

func (*BidAmount) GetClientID

func (x *BidAmount) GetClientID() int32

func (*BidAmount) GetClientName

func (x *BidAmount) GetClientName() string

func (*BidAmount) ProtoMessage

func (*BidAmount) ProtoMessage()

func (*BidAmount) ProtoReflect

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

func (*BidAmount) Reset

func (x *BidAmount) Reset()

func (*BidAmount) String

func (x *BidAmount) String() string

type Outcome

type Outcome struct {
	Amount     float32 `protobuf:"fixed32,1,opt,name=amount,proto3" json:"amount,omitempty"`
	ClientName string  `protobuf:"bytes,2,opt,name=clientName,proto3" json:"clientName,omitempty"`
	BidDone    bool    `protobuf:"varint,3,opt,name=BidDone,proto3" json:"BidDone,omitempty"`
	// contains filtered or unexported fields
}

func (*Outcome) Descriptor deprecated

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

Deprecated: Use Outcome.ProtoReflect.Descriptor instead.

func (*Outcome) GetAmount

func (x *Outcome) GetAmount() float32

func (*Outcome) GetBidDone

func (x *Outcome) GetBidDone() bool

func (*Outcome) GetClientName

func (x *Outcome) GetClientName() string

func (*Outcome) ProtoMessage

func (*Outcome) ProtoMessage()

func (*Outcome) ProtoReflect

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

func (*Outcome) Reset

func (x *Outcome) Reset()

func (*Outcome) String

func (x *Outcome) String() string

type UnimplementedAuctionServiceServer

type UnimplementedAuctionServiceServer struct {
}

UnimplementedAuctionServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedAuctionServiceServer) Bid

func (UnimplementedAuctionServiceServer) ConnectionStream

func (UnimplementedAuctionServiceServer) Result

type UnsafeAuctionServiceServer

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

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

type Void

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

func (*Void) Descriptor deprecated

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

Deprecated: Use Void.ProtoReflect.Descriptor instead.

func (*Void) ProtoMessage

func (*Void) ProtoMessage()

func (*Void) ProtoReflect

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

func (*Void) Reset

func (x *Void) Reset()

func (*Void) String

func (x *Void) String() string

Jump to

Keyboard shortcuts

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