Documentation ¶
Index ¶
Constants ¶
const ( Auctionservice_TryBid_FullMethodName = "/Auction_service.Auctionservice/tryBid" Auctionservice_JoinAuction_FullMethodName = "/Auction_service.Auctionservice/JoinAuction" )
Variables ¶
var Auctionservice_ServiceDesc = grpc.ServiceDesc{ ServiceName: "Auction_service.Auctionservice", HandlerType: (*AuctionserviceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "tryBid", Handler: _Auctionservice_TryBid_Handler, }, { MethodName: "JoinAuction", Handler: _Auctionservice_JoinAuction_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "Api/h5.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)
var File_Api_h5_proto protoreflect.FileDescriptor
Functions ¶
func RegisterAuctionserviceServer ¶
func RegisterAuctionserviceServer(s grpc.ServiceRegistrar, srv AuctionserviceServer)
Types ¶
type AuctionResult ¶
type AuctionResult struct { Status string `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"` // contains filtered or unexported fields }
func (*AuctionResult) Descriptor
deprecated
func (*AuctionResult) Descriptor() ([]byte, []int)
Deprecated: Use AuctionResult.ProtoReflect.Descriptor instead.
func (*AuctionResult) GetStatus ¶
func (x *AuctionResult) GetStatus() string
func (*AuctionResult) ProtoMessage ¶
func (*AuctionResult) ProtoMessage()
func (*AuctionResult) ProtoReflect ¶
func (x *AuctionResult) ProtoReflect() protoreflect.Message
func (*AuctionResult) Reset ¶
func (x *AuctionResult) Reset()
func (*AuctionResult) String ¶
func (x *AuctionResult) String() string
type AuctionserviceClient ¶
type AuctionserviceClient interface { TryBid(ctx context.Context, in *Bid, opts ...grpc.CallOption) (*BidAck, error) JoinAuction(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*AuctionResult, 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.
func NewAuctionserviceClient ¶
func NewAuctionserviceClient(cc grpc.ClientConnInterface) AuctionserviceClient
type AuctionserviceServer ¶
type AuctionserviceServer interface { TryBid(context.Context, *Bid) (*BidAck, error) JoinAuction(context.Context, *Empty) (*AuctionResult, error) // contains filtered or unexported methods }
AuctionserviceServer is the server API for Auctionservice service. All implementations must embed UnimplementedAuctionserviceServer for forward compatibility.
type Bid ¶
type Bid struct { Bidder string `protobuf:"bytes,1,opt,name=Bidder,proto3" json:"Bidder,omitempty"` Bid int64 `protobuf:"varint,2,opt,name=bid,proto3" json:"bid,omitempty"` Timestamp int64 `protobuf:"varint,3,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // contains filtered or unexported fields }
func (*Bid) Descriptor
deprecated
func (*Bid) GetTimestamp ¶
func (*Bid) ProtoMessage ¶
func (*Bid) ProtoMessage()
func (*Bid) ProtoReflect ¶
func (x *Bid) ProtoReflect() protoreflect.Message
type BidAck ¶
type BidAck struct { Ack string `protobuf:"bytes,1,opt,name=ack,proto3" json:"ack,omitempty"` Timestamp int64 `protobuf:"varint,2,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // contains filtered or unexported fields }
func (*BidAck) Descriptor
deprecated
func (*BidAck) GetTimestamp ¶
func (*BidAck) ProtoMessage ¶
func (*BidAck) ProtoMessage()
func (*BidAck) ProtoReflect ¶
func (x *BidAck) ProtoReflect() protoreflect.Message
type Empty ¶
type Empty struct {
// contains filtered or unexported fields
}
func (*Empty) Descriptor
deprecated
func (*Empty) ProtoMessage ¶
func (*Empty) ProtoMessage()
func (*Empty) ProtoReflect ¶
func (x *Empty) ProtoReflect() protoreflect.Message
type UnimplementedAuctionserviceServer ¶
type UnimplementedAuctionserviceServer struct{}
UnimplementedAuctionserviceServer 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 (UnimplementedAuctionserviceServer) JoinAuction ¶
func (UnimplementedAuctionserviceServer) JoinAuction(context.Context, *Empty) (*AuctionResult, error)
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.