Documentation ¶
Index ¶
- Variables
- func NewSegmentEndpoints() []*api.Endpoint
- func RegisterSegmentHandler(s server.Server, hdlr SegmentHandler, opts ...server.HandlerOption) error
- type IdRequest
- type Query
- type SegmentHandler
- type SegmentResponse
- func (*SegmentResponse) Descriptor() ([]byte, []int)deprecated
- func (x *SegmentResponse) GetAddWeight() uint32
- func (x *SegmentResponse) GetCarrierTypes() uint32
- func (x *SegmentResponse) GetDirection() int32
- func (x *SegmentResponse) GetEndPoint() uint32
- func (x *SegmentResponse) GetEndsAsEndPoint() uint32
- func (x *SegmentResponse) GetLength() uint32
- func (x *SegmentResponse) GetPlcBits() uint32
- func (x *SegmentResponse) GetPlcWord() uint32
- func (x *SegmentResponse) GetPlcWord2() uint32
- func (x *SegmentResponse) GetRemark() string
- func (x *SegmentResponse) GetSegmentID() uint32
- func (x *SegmentResponse) GetSegmentTemplate() string
- func (x *SegmentResponse) GetStartPoint() uint32
- func (x *SegmentResponse) GetStartsAsStartPoint() uint32
- func (x *SegmentResponse) GetTravelTime() uint32
- func (x *SegmentResponse) GetVehicle() string
- func (*SegmentResponse) ProtoMessage()
- func (x *SegmentResponse) ProtoReflect() protoreflect.Message
- func (x *SegmentResponse) Reset()
- func (x *SegmentResponse) String() string
- type SegmentService
- type SegmentsResponse
- func (*SegmentsResponse) Descriptor() ([]byte, []int)deprecated
- func (x *SegmentsResponse) GetSegments() []*SegmentResponse
- func (x *SegmentsResponse) GetTotalNumber() uint32
- func (x *SegmentsResponse) GetTotalpages() uint32
- func (*SegmentsResponse) ProtoMessage()
- func (x *SegmentsResponse) ProtoReflect() protoreflect.Message
- func (x *SegmentsResponse) Reset()
- func (x *SegmentsResponse) String() string
Constants ¶
This section is empty.
Variables ¶
View Source
var File_proto_segment_segment_proto protoreflect.FileDescriptor
Functions ¶
func NewSegmentEndpoints ¶
func RegisterSegmentHandler ¶
func RegisterSegmentHandler(s server.Server, hdlr SegmentHandler, opts ...server.HandlerOption) error
Types ¶
type IdRequest ¶
type IdRequest struct { Id uint32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
func (*IdRequest) Descriptor
deprecated
func (*IdRequest) ProtoMessage ¶
func (*IdRequest) ProtoMessage()
func (*IdRequest) ProtoReflect ¶
func (x *IdRequest) ProtoReflect() protoreflect.Message
type Query ¶
type Query struct { Page uint32 `protobuf:"varint,1,opt,name=page,proto3" json:"page,omitempty"` PerPage uint32 `protobuf:"varint,2,opt,name=perPage,proto3" json:"perPage,omitempty"` // contains filtered or unexported fields }
func (*Query) Descriptor
deprecated
func (*Query) GetPerPage ¶
func (*Query) ProtoMessage ¶
func (*Query) ProtoMessage()
func (*Query) ProtoReflect ¶
func (x *Query) ProtoReflect() protoreflect.Message
type SegmentHandler ¶
type SegmentHandler interface { //Get segment message according to segment id GetSegmentByID(context.Context, *IdRequest, *SegmentResponse) error //Get all segments message GetSegments(context.Context, *Query, *SegmentsResponse) error }
type SegmentResponse ¶
type SegmentResponse struct { SegmentID uint32 `protobuf:"varint,1,opt,name=segmentID,proto3" json:"segmentID,omitempty"` StartPoint uint32 `protobuf:"varint,2,opt,name=startPoint,proto3" json:"startPoint,omitempty"` EndPoint uint32 `protobuf:"varint,3,opt,name=endPoint,proto3" json:"endPoint,omitempty"` SegmentTemplate string `protobuf:"bytes,4,opt,name=segmentTemplate,proto3" json:"segmentTemplate,omitempty"` Vehicle string `protobuf:"bytes,5,opt,name=vehicle,proto3" json:"vehicle,omitempty"` TravelTime uint32 `protobuf:"varint,6,opt,name=travelTime,proto3" json:"travelTime,omitempty"` StartsAsStartPoint uint32 `protobuf:"varint,7,opt,name=startsAsStartPoint,proto3" json:"startsAsStartPoint,omitempty"` EndsAsEndPoint uint32 `protobuf:"varint,8,opt,name=endsAsEndPoint,proto3" json:"endsAsEndPoint,omitempty"` Direction int32 `protobuf:"zigzag32,9,opt,name=direction,proto3" json:"direction,omitempty"` PlcBits uint32 `protobuf:"varint,10,opt,name=plcBits,proto3" json:"plcBits,omitempty"` PlcWord uint32 `protobuf:"varint,11,opt,name=plcWord,proto3" json:"plcWord,omitempty"` PlcWord2 uint32 `protobuf:"varint,12,opt,name=plcWord2,proto3" json:"plcWord2,omitempty"` AddWeight uint32 `protobuf:"varint,13,opt,name=addWeight,proto3" json:"addWeight,omitempty"` Length uint32 `protobuf:"varint,14,opt,name=length,proto3" json:"length,omitempty"` CarrierTypes uint32 `protobuf:"varint,15,opt,name=carrierTypes,proto3" json:"carrierTypes,omitempty"` Remark string `protobuf:"bytes,16,opt,name=remark,proto3" json:"remark,omitempty"` // contains filtered or unexported fields }
func (*SegmentResponse) Descriptor
deprecated
func (*SegmentResponse) Descriptor() ([]byte, []int)
Deprecated: Use SegmentResponse.ProtoReflect.Descriptor instead.
func (*SegmentResponse) GetAddWeight ¶
func (x *SegmentResponse) GetAddWeight() uint32
func (*SegmentResponse) GetCarrierTypes ¶
func (x *SegmentResponse) GetCarrierTypes() uint32
func (*SegmentResponse) GetDirection ¶
func (x *SegmentResponse) GetDirection() int32
func (*SegmentResponse) GetEndPoint ¶
func (x *SegmentResponse) GetEndPoint() uint32
func (*SegmentResponse) GetEndsAsEndPoint ¶
func (x *SegmentResponse) GetEndsAsEndPoint() uint32
func (*SegmentResponse) GetLength ¶
func (x *SegmentResponse) GetLength() uint32
func (*SegmentResponse) GetPlcBits ¶
func (x *SegmentResponse) GetPlcBits() uint32
func (*SegmentResponse) GetPlcWord ¶
func (x *SegmentResponse) GetPlcWord() uint32
func (*SegmentResponse) GetPlcWord2 ¶
func (x *SegmentResponse) GetPlcWord2() uint32
func (*SegmentResponse) GetRemark ¶
func (x *SegmentResponse) GetRemark() string
func (*SegmentResponse) GetSegmentID ¶
func (x *SegmentResponse) GetSegmentID() uint32
func (*SegmentResponse) GetSegmentTemplate ¶
func (x *SegmentResponse) GetSegmentTemplate() string
func (*SegmentResponse) GetStartPoint ¶
func (x *SegmentResponse) GetStartPoint() uint32
func (*SegmentResponse) GetStartsAsStartPoint ¶
func (x *SegmentResponse) GetStartsAsStartPoint() uint32
func (*SegmentResponse) GetTravelTime ¶
func (x *SegmentResponse) GetTravelTime() uint32
func (*SegmentResponse) GetVehicle ¶
func (x *SegmentResponse) GetVehicle() string
func (*SegmentResponse) ProtoMessage ¶
func (*SegmentResponse) ProtoMessage()
func (*SegmentResponse) ProtoReflect ¶
func (x *SegmentResponse) ProtoReflect() protoreflect.Message
func (*SegmentResponse) Reset ¶
func (x *SegmentResponse) Reset()
func (*SegmentResponse) String ¶
func (x *SegmentResponse) String() string
type SegmentService ¶
type SegmentService interface { //Get segment message according to segment id GetSegmentByID(ctx context.Context, in *IdRequest, opts ...client.CallOption) (*SegmentResponse, error) //Get all segments message GetSegments(ctx context.Context, in *Query, opts ...client.CallOption) (*SegmentsResponse, error) }
func NewSegmentService ¶
func NewSegmentService(name string, c client.Client) SegmentService
type SegmentsResponse ¶
type SegmentsResponse struct { Segments []*SegmentResponse `protobuf:"bytes,1,rep,name=segments,proto3" json:"segments,omitempty"` Totalpages uint32 `protobuf:"varint,2,opt,name=totalpages,proto3" json:"totalpages,omitempty"` TotalNumber uint32 `protobuf:"varint,3,opt,name=totalNumber,proto3" json:"totalNumber,omitempty"` // contains filtered or unexported fields }
func (*SegmentsResponse) Descriptor
deprecated
func (*SegmentsResponse) Descriptor() ([]byte, []int)
Deprecated: Use SegmentsResponse.ProtoReflect.Descriptor instead.
func (*SegmentsResponse) GetSegments ¶
func (x *SegmentsResponse) GetSegments() []*SegmentResponse
func (*SegmentsResponse) GetTotalNumber ¶
func (x *SegmentsResponse) GetTotalNumber() uint32
func (*SegmentsResponse) GetTotalpages ¶
func (x *SegmentsResponse) GetTotalpages() uint32
func (*SegmentsResponse) ProtoMessage ¶
func (*SegmentsResponse) ProtoMessage()
func (*SegmentsResponse) ProtoReflect ¶
func (x *SegmentsResponse) ProtoReflect() protoreflect.Message
func (*SegmentsResponse) Reset ¶
func (x *SegmentsResponse) Reset()
func (*SegmentsResponse) String ¶
func (x *SegmentsResponse) String() string
Click to show internal directories.
Click to hide internal directories.