Documentation ¶
Index ¶
- Variables
- func NewRouteEndpoints() []*api.Endpoint
- func RegisterRouteHandler(s server.Server, hdlr RouteHandler, opts ...server.HandlerOption) error
- type GetRouteRequest
- func (*GetRouteRequest) Descriptor() ([]byte, []int)deprecated
- func (x *GetRouteRequest) GetVal1() uint32
- func (x *GetRouteRequest) GetVal2() uint32
- func (*GetRouteRequest) ProtoMessage()
- func (x *GetRouteRequest) ProtoReflect() protoreflect.Message
- func (x *GetRouteRequest) Reset()
- func (x *GetRouteRequest) String() string
- type GetRouteResponse
- func (*GetRouteResponse) Descriptor() ([]byte, []int)deprecated
- func (x *GetRouteResponse) GetRes() bool
- func (x *GetRouteResponse) GetSegments() []uint32
- func (x *GetRouteResponse) GetWeight() uint32
- func (*GetRouteResponse) ProtoMessage()
- func (x *GetRouteResponse) ProtoReflect() protoreflect.Message
- func (x *GetRouteResponse) Reset()
- func (x *GetRouteResponse) String() string
- type GetStationListRequest
- func (*GetStationListRequest) Descriptor() ([]byte, []int)deprecated
- func (x *GetStationListRequest) GetVal1() uint32
- func (*GetStationListRequest) ProtoMessage()
- func (x *GetStationListRequest) ProtoReflect() protoreflect.Message
- func (x *GetStationListRequest) Reset()
- func (x *GetStationListRequest) String() string
- type GetStationListResponse
- func (*GetStationListResponse) Descriptor() ([]byte, []int)deprecated
- func (x *GetStationListResponse) GetRes() bool
- func (x *GetStationListResponse) GetStations() []*StationWeight
- func (*GetStationListResponse) ProtoMessage()
- func (x *GetStationListResponse) ProtoReflect() protoreflect.Message
- func (x *GetStationListResponse) Reset()
- func (x *GetStationListResponse) String() string
- type MapFile
- type MapFiles
- type Request
- type Response
- type RouteHandler
- type RouteService
- type StationWeight
- func (*StationWeight) Descriptor() ([]byte, []int)deprecated
- func (x *StationWeight) GetStationID() uint32
- func (x *StationWeight) GetWeight() uint32
- func (*StationWeight) ProtoMessage()
- func (x *StationWeight) ProtoReflect() protoreflect.Message
- func (x *StationWeight) Reset()
- func (x *StationWeight) String() string
- type StationsRequest
- func (*StationsRequest) Descriptor() ([]byte, []int)deprecated
- func (x *StationsRequest) GetStartStn() uint32
- func (x *StationsRequest) GetStations() []uint32
- func (*StationsRequest) ProtoMessage()
- func (x *StationsRequest) ProtoReflect() protoreflect.Message
- func (x *StationsRequest) Reset()
- func (x *StationsRequest) String() string
Constants ¶
This section is empty.
Variables ¶
View Source
var File_proto_route_route_proto protoreflect.FileDescriptor
Functions ¶
func NewRouteEndpoints ¶
func RegisterRouteHandler ¶
func RegisterRouteHandler(s server.Server, hdlr RouteHandler, opts ...server.HandlerOption) error
Types ¶
type GetRouteRequest ¶
type GetRouteRequest struct { Val1 uint32 `protobuf:"varint,1,opt,name=val1,proto3" json:"val1,omitempty"` Val2 uint32 `protobuf:"varint,2,opt,name=val2,proto3" json:"val2,omitempty"` // contains filtered or unexported fields }
func (*GetRouteRequest) Descriptor
deprecated
func (*GetRouteRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetRouteRequest.ProtoReflect.Descriptor instead.
func (*GetRouteRequest) GetVal1 ¶
func (x *GetRouteRequest) GetVal1() uint32
func (*GetRouteRequest) GetVal2 ¶
func (x *GetRouteRequest) GetVal2() uint32
func (*GetRouteRequest) ProtoMessage ¶
func (*GetRouteRequest) ProtoMessage()
func (*GetRouteRequest) ProtoReflect ¶
func (x *GetRouteRequest) ProtoReflect() protoreflect.Message
func (*GetRouteRequest) Reset ¶
func (x *GetRouteRequest) Reset()
func (*GetRouteRequest) String ¶
func (x *GetRouteRequest) String() string
type GetRouteResponse ¶
type GetRouteResponse struct { Res bool `protobuf:"varint,1,opt,name=res,proto3" json:"res,omitempty"` Weight uint32 `protobuf:"varint,2,opt,name=weight,proto3" json:"weight,omitempty"` Segments []uint32 `protobuf:"varint,3,rep,packed,name=segments,proto3" json:"segments,omitempty"` // contains filtered or unexported fields }
func (*GetRouteResponse) Descriptor
deprecated
func (*GetRouteResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetRouteResponse.ProtoReflect.Descriptor instead.
func (*GetRouteResponse) GetRes ¶
func (x *GetRouteResponse) GetRes() bool
func (*GetRouteResponse) GetSegments ¶
func (x *GetRouteResponse) GetSegments() []uint32
func (*GetRouteResponse) GetWeight ¶
func (x *GetRouteResponse) GetWeight() uint32
func (*GetRouteResponse) ProtoMessage ¶
func (*GetRouteResponse) ProtoMessage()
func (*GetRouteResponse) ProtoReflect ¶
func (x *GetRouteResponse) ProtoReflect() protoreflect.Message
func (*GetRouteResponse) Reset ¶
func (x *GetRouteResponse) Reset()
func (*GetRouteResponse) String ¶
func (x *GetRouteResponse) String() string
type GetStationListRequest ¶
type GetStationListRequest struct { Val1 uint32 `protobuf:"varint,1,opt,name=val1,proto3" json:"val1,omitempty"` // contains filtered or unexported fields }
func (*GetStationListRequest) Descriptor
deprecated
func (*GetStationListRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetStationListRequest.ProtoReflect.Descriptor instead.
func (*GetStationListRequest) GetVal1 ¶
func (x *GetStationListRequest) GetVal1() uint32
func (*GetStationListRequest) ProtoMessage ¶
func (*GetStationListRequest) ProtoMessage()
func (*GetStationListRequest) ProtoReflect ¶
func (x *GetStationListRequest) ProtoReflect() protoreflect.Message
func (*GetStationListRequest) Reset ¶
func (x *GetStationListRequest) Reset()
func (*GetStationListRequest) String ¶
func (x *GetStationListRequest) String() string
type GetStationListResponse ¶
type GetStationListResponse struct { Res bool `protobuf:"varint,1,opt,name=res,proto3" json:"res,omitempty"` Stations []*StationWeight `protobuf:"bytes,2,rep,name=stations,proto3" json:"stations,omitempty"` // contains filtered or unexported fields }
func (*GetStationListResponse) Descriptor
deprecated
func (*GetStationListResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetStationListResponse.ProtoReflect.Descriptor instead.
func (*GetStationListResponse) GetRes ¶
func (x *GetStationListResponse) GetRes() bool
func (*GetStationListResponse) GetStations ¶
func (x *GetStationListResponse) GetStations() []*StationWeight
func (*GetStationListResponse) ProtoMessage ¶
func (*GetStationListResponse) ProtoMessage()
func (*GetStationListResponse) ProtoReflect ¶
func (x *GetStationListResponse) ProtoReflect() protoreflect.Message
func (*GetStationListResponse) Reset ¶
func (x *GetStationListResponse) Reset()
func (*GetStationListResponse) String ¶
func (x *GetStationListResponse) String() string
type MapFile ¶
type MapFile struct { FileName string `protobuf:"bytes,1,opt,name=fileName,proto3" json:"fileName,omitempty"` Filebytes []byte `protobuf:"bytes,2,opt,name=filebytes,proto3" json:"filebytes,omitempty"` // contains filtered or unexported fields }
func (*MapFile) Descriptor
deprecated
func (*MapFile) GetFileName ¶
func (*MapFile) GetFilebytes ¶
func (*MapFile) ProtoMessage ¶
func (*MapFile) ProtoMessage()
func (*MapFile) ProtoReflect ¶
func (x *MapFile) ProtoReflect() protoreflect.Message
type MapFiles ¶
type MapFiles struct { Files []*MapFile `protobuf:"bytes,1,rep,name=files,proto3" json:"files,omitempty"` // contains filtered or unexported fields }
func (*MapFiles) Descriptor
deprecated
func (*MapFiles) ProtoMessage ¶
func (*MapFiles) ProtoMessage()
func (*MapFiles) ProtoReflect ¶
func (x *MapFiles) ProtoReflect() protoreflect.Message
type Request ¶
type Request struct {
// contains filtered or unexported fields
}
func (*Request) Descriptor
deprecated
func (*Request) ProtoMessage ¶
func (*Request) ProtoMessage()
func (*Request) ProtoReflect ¶
func (x *Request) ProtoReflect() protoreflect.Message
type Response ¶
type Response struct { Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` // contains filtered or unexported fields }
func (*Response) Descriptor
deprecated
func (*Response) GetMessage ¶
func (*Response) ProtoMessage ¶
func (*Response) ProtoMessage()
func (*Response) ProtoReflect ¶
func (x *Response) ProtoReflect() protoreflect.Message
type RouteHandler ¶
type RouteHandler interface { //接收地图文件// LoadMapFiles(context.Context, *MapFiles, *Response) error //获取站台到站台的路径// GetRouteFromStnToStn(context.Context, *GetRouteRequest, *GetRouteResponse) error //获取站台到所有站台的列表// GetStationListFromStn(context.Context, *GetStationListRequest, *GetStationListResponse) error //对传递过来的起始站台和站台列表进行排序// SortStationList(context.Context, *StationsRequest, *GetStationListResponse) error //显示路径// ShowRoute(context.Context, *GetRouteRequest, *Response) error //隐藏路径// HideRoute(context.Context, *GetRouteRequest, *Response) error }
type RouteService ¶
type RouteService interface { //接收地图文件// LoadMapFiles(ctx context.Context, in *MapFiles, opts ...client.CallOption) (*Response, error) //获取站台到站台的路径// GetRouteFromStnToStn(ctx context.Context, in *GetRouteRequest, opts ...client.CallOption) (*GetRouteResponse, error) //获取站台到所有站台的列表// GetStationListFromStn(ctx context.Context, in *GetStationListRequest, opts ...client.CallOption) (*GetStationListResponse, error) //对传递过来的起始站台和站台列表进行排序// SortStationList(ctx context.Context, in *StationsRequest, opts ...client.CallOption) (*GetStationListResponse, error) //显示路径// ShowRoute(ctx context.Context, in *GetRouteRequest, opts ...client.CallOption) (*Response, error) //隐藏路径// HideRoute(ctx context.Context, in *GetRouteRequest, opts ...client.CallOption) (*Response, error) }
func NewRouteService ¶
func NewRouteService(name string, c client.Client) RouteService
type StationWeight ¶
type StationWeight struct { StationID uint32 `protobuf:"varint,1,opt,name=stationID,proto3" json:"stationID,omitempty"` Weight uint32 `protobuf:"varint,2,opt,name=weight,proto3" json:"weight,omitempty"` // contains filtered or unexported fields }
func (*StationWeight) Descriptor
deprecated
func (*StationWeight) Descriptor() ([]byte, []int)
Deprecated: Use StationWeight.ProtoReflect.Descriptor instead.
func (*StationWeight) GetStationID ¶
func (x *StationWeight) GetStationID() uint32
func (*StationWeight) GetWeight ¶
func (x *StationWeight) GetWeight() uint32
func (*StationWeight) ProtoMessage ¶
func (*StationWeight) ProtoMessage()
func (*StationWeight) ProtoReflect ¶
func (x *StationWeight) ProtoReflect() protoreflect.Message
func (*StationWeight) Reset ¶
func (x *StationWeight) Reset()
func (*StationWeight) String ¶
func (x *StationWeight) String() string
type StationsRequest ¶
type StationsRequest struct { StartStn uint32 `protobuf:"varint,1,opt,name=startStn,proto3" json:"startStn,omitempty"` Stations []uint32 `protobuf:"varint,2,rep,packed,name=stations,proto3" json:"stations,omitempty"` // contains filtered or unexported fields }
func (*StationsRequest) Descriptor
deprecated
func (*StationsRequest) Descriptor() ([]byte, []int)
Deprecated: Use StationsRequest.ProtoReflect.Descriptor instead.
func (*StationsRequest) GetStartStn ¶
func (x *StationsRequest) GetStartStn() uint32
func (*StationsRequest) GetStations ¶
func (x *StationsRequest) GetStations() []uint32
func (*StationsRequest) ProtoMessage ¶
func (*StationsRequest) ProtoMessage()
func (*StationsRequest) ProtoReflect ¶
func (x *StationsRequest) ProtoReflect() protoreflect.Message
func (*StationsRequest) Reset ¶
func (x *StationsRequest) Reset()
func (*StationsRequest) String ¶
func (x *StationsRequest) String() string
Click to show internal directories.
Click to hide internal directories.