proto

package
v0.0.0-...-5be9a72 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_proto_proto_proto protoreflect.FileDescriptor
View Source
var Frontend_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "proto.Frontend",
	HandlerType: (*FrontendServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Bid",
			Handler:    _Frontend_Bid_Handler,
		},
		{
			MethodName: "Result",
			Handler:    _Frontend_Result_Handler,
		},
		{
			MethodName: "StartAuction",
			Handler:    _Frontend_StartAuction_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "proto/proto.proto",
}

Frontend_ServiceDesc is the grpc.ServiceDesc for Frontend 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 Server_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "proto.Server",
	HandlerType: (*ServerServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "UpdateHighestBid",
			Handler:    _Server_UpdateHighestBid_Handler,
		},
		{
			MethodName: "GetHighestBid",
			Handler:    _Server_GetHighestBid_Handler,
		},
		{
			MethodName: "StartAuction",
			Handler:    _Server_StartAuction_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "proto/proto.proto",
}

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

Functions

func RegisterFrontendServer

func RegisterFrontendServer(s grpc.ServiceRegistrar, srv FrontendServer)

func RegisterServerServer

func RegisterServerServer(s grpc.ServiceRegistrar, srv ServerServer)

Types

type Ack

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

func (*Ack) Descriptor deprecated

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

Deprecated: Use Ack.ProtoReflect.Descriptor instead.

func (*Ack) GetAck

func (x *Ack) GetAck() 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 BidRequest

type BidRequest struct {
	Amount    int32  `protobuf:"varint,1,opt,name=amount,proto3" json:"amount,omitempty"`
	Name      string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	ProcessID int32  `protobuf:"varint,3,opt,name=processID,proto3" json:"processID,omitempty"`
	// contains filtered or unexported fields
}

func (*BidRequest) Descriptor deprecated

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

Deprecated: Use BidRequest.ProtoReflect.Descriptor instead.

func (*BidRequest) GetAmount

func (x *BidRequest) GetAmount() int32

func (*BidRequest) GetName

func (x *BidRequest) GetName() string

func (*BidRequest) GetProcessID

func (x *BidRequest) GetProcessID() int32

func (*BidRequest) ProtoMessage

func (*BidRequest) ProtoMessage()

func (*BidRequest) ProtoReflect

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

func (*BidRequest) Reset

func (x *BidRequest) Reset()

func (*BidRequest) String

func (x *BidRequest) String() string

type BidResult

type BidResult struct {
	Amount        int32  `protobuf:"varint,1,opt,name=amount,proto3" json:"amount,omitempty"`
	Name          string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	AuctionStatus string `protobuf:"bytes,3,opt,name=auctionStatus,proto3" json:"auctionStatus,omitempty"`
	// contains filtered or unexported fields
}

func (*BidResult) Descriptor deprecated

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

Deprecated: Use BidResult.ProtoReflect.Descriptor instead.

func (*BidResult) GetAmount

func (x *BidResult) GetAmount() int32

func (*BidResult) GetAuctionStatus

func (x *BidResult) GetAuctionStatus() string

func (*BidResult) GetName

func (x *BidResult) GetName() string

func (*BidResult) ProtoMessage

func (*BidResult) ProtoMessage()

func (*BidResult) ProtoReflect

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

func (*BidResult) Reset

func (x *BidResult) Reset()

func (*BidResult) String

func (x *BidResult) String() string

type FrontendClient

type FrontendClient interface {
	Bid(ctx context.Context, in *BidRequest, opts ...grpc.CallOption) (*Ack, error)
	Result(ctx context.Context, in *Void, opts ...grpc.CallOption) (*BidResult, error)
	StartAuction(ctx context.Context, in *Void, opts ...grpc.CallOption) (*Ack, error)
}

FrontendClient is the client API for Frontend 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 NewFrontendClient

func NewFrontendClient(cc grpc.ClientConnInterface) FrontendClient

type FrontendServer

type FrontendServer interface {
	Bid(context.Context, *BidRequest) (*Ack, error)
	Result(context.Context, *Void) (*BidResult, error)
	StartAuction(context.Context, *Void) (*Ack, error)
	// contains filtered or unexported methods
}

FrontendServer is the server API for Frontend service. All implementations must embed UnimplementedFrontendServer for forward compatibility

type ServerClient

type ServerClient interface {
	UpdateHighestBid(ctx context.Context, in *BidRequest, opts ...grpc.CallOption) (*Ack, error)
	GetHighestBid(ctx context.Context, in *Void, opts ...grpc.CallOption) (*BidResult, error)
	StartAuction(ctx context.Context, in *Void, opts ...grpc.CallOption) (*Ack, error)
}

ServerClient is the client API for Server 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 NewServerClient

func NewServerClient(cc grpc.ClientConnInterface) ServerClient

type ServerServer

type ServerServer interface {
	UpdateHighestBid(context.Context, *BidRequest) (*Ack, error)
	GetHighestBid(context.Context, *Void) (*BidResult, error)
	StartAuction(context.Context, *Void) (*Ack, error)
	// contains filtered or unexported methods
}

ServerServer is the server API for Server service. All implementations must embed UnimplementedServerServer for forward compatibility

type UnimplementedFrontendServer

type UnimplementedFrontendServer struct {
}

UnimplementedFrontendServer must be embedded to have forward compatible implementations.

func (UnimplementedFrontendServer) Bid

func (UnimplementedFrontendServer) Result

func (UnimplementedFrontendServer) StartAuction

type UnimplementedServerServer

type UnimplementedServerServer struct {
}

UnimplementedServerServer must be embedded to have forward compatible implementations.

func (UnimplementedServerServer) GetHighestBid

func (UnimplementedServerServer) StartAuction

func (UnimplementedServerServer) StartAuction(context.Context, *Void) (*Ack, error)

func (UnimplementedServerServer) UpdateHighestBid

func (UnimplementedServerServer) UpdateHighestBid(context.Context, *BidRequest) (*Ack, error)

type UnsafeFrontendServer

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

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

type UnsafeServerServer

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

UnsafeServerServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ServerServer 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