topStations

package
Version: v0.0.0-...-5d28778 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2018 License: BSD-3-Clause Imports: 13 Imported by: 0

Documentation

Overview

Package topStations is a generated protocol buffer package.

It is generated from these files:

topStations.proto

It has these top-level messages:

GetTopStationsRequest
GetTopStationsResponse
StationStats

Package topStations is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterTopStationsHandler

func RegisterTopStationsHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

RegisterTopStationsHandler registers the http handlers for service TopStations to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterTopStationsHandlerClient

func RegisterTopStationsHandlerClient(ctx context.Context, mux *runtime.ServeMux, client TopStationsClient) error

RegisterTopStationsHandler registers the http handlers for service TopStations to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "TopStationsClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "TopStationsClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "TopStationsClient" to call the correct interceptors.

func RegisterTopStationsHandlerFromEndpoint

func RegisterTopStationsHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterTopStationsHandlerFromEndpoint is same as RegisterTopStationsHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterTopStationsServer

func RegisterTopStationsServer(s *grpc.Server, srv TopStationsServer)

Types

type GetTopStationsRequest

type GetTopStationsRequest struct {
}

func (*GetTopStationsRequest) Descriptor

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

func (*GetTopStationsRequest) ProtoMessage

func (*GetTopStationsRequest) ProtoMessage()

func (*GetTopStationsRequest) Reset

func (m *GetTopStationsRequest) Reset()

func (*GetTopStationsRequest) String

func (m *GetTopStationsRequest) String() string

type GetTopStationsResponse

type GetTopStationsResponse struct {
	// Station list
	Stations []*StationStats `protobuf:"bytes,1,rep,name=stations" json:"stations,omitempty"`
}

func (*GetTopStationsResponse) Descriptor

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

func (*GetTopStationsResponse) GetStations

func (m *GetTopStationsResponse) GetStations() []*StationStats

func (*GetTopStationsResponse) ProtoMessage

func (*GetTopStationsResponse) ProtoMessage()

func (*GetTopStationsResponse) Reset

func (m *GetTopStationsResponse) Reset()

func (*GetTopStationsResponse) String

func (m *GetTopStationsResponse) String() string

type StationStats

type StationStats struct {
	// The station's ID
	Id int64 `protobuf:"varint,1,opt,name=id" json:"id,omitempty"`
	// The station's ask orders total volume
	AskVolume float64 `protobuf:"fixed64,2,opt,name=ask_volume,json=askVolume" json:"ask_volume,omitempty"`
	// The station's bid orders total volume
	BidVolume float64 `protobuf:"fixed64,3,opt,name=bid_volume,json=bidVolume" json:"bid_volume,omitempty"`
	// The station's orders total volume
	TotalVolume float64 `protobuf:"fixed64,4,opt,name=total_volume,json=totalVolume" json:"total_volume,omitempty"`
	// The station's total number of orders
	TotalOrders float64 `protobuf:"fixed64,5,opt,name=total_orders,json=totalOrders" json:"total_orders,omitempty"`
}

func (*StationStats) Descriptor

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

func (*StationStats) GetAskVolume

func (m *StationStats) GetAskVolume() float64

func (*StationStats) GetBidVolume

func (m *StationStats) GetBidVolume() float64

func (*StationStats) GetId

func (m *StationStats) GetId() int64

func (*StationStats) GetTotalOrders

func (m *StationStats) GetTotalOrders() float64

func (*StationStats) GetTotalVolume

func (m *StationStats) GetTotalVolume() float64

func (*StationStats) ProtoMessage

func (*StationStats) ProtoMessage()

func (*StationStats) Reset

func (m *StationStats) Reset()

func (*StationStats) String

func (m *StationStats) String() string

type TopStationsClient

type TopStationsClient interface {
	GetTopStations(ctx context.Context, in *GetTopStationsRequest, opts ...grpc.CallOption) (*GetTopStationsResponse, error)
}

func NewTopStationsClient

func NewTopStationsClient(cc *grpc.ClientConn) TopStationsClient

type TopStationsServer

type TopStationsServer interface {
	GetTopStations(context.Context, *GetTopStationsRequest) (*GetTopStationsResponse, error)
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL