go_micro_srv_station

package
v2.3.3 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2021 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_proto_station_station_proto protoreflect.FileDescriptor

Functions

func NewStationEndpoints

func NewStationEndpoints() []*api.Endpoint

func RegisterStationHandler

func RegisterStationHandler(s server.Server, hdlr StationHandler, opts ...server.HandlerOption) error

Types

type GraphqlQuery

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

func (*GraphqlQuery) Descriptor deprecated

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

Deprecated: Use GraphqlQuery.ProtoReflect.Descriptor instead.

func (*GraphqlQuery) GetQuery

func (x *GraphqlQuery) GetQuery() string

func (*GraphqlQuery) ProtoMessage

func (*GraphqlQuery) ProtoMessage()

func (*GraphqlQuery) ProtoReflect

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

func (*GraphqlQuery) Reset

func (x *GraphqlQuery) Reset()

func (*GraphqlQuery) String

func (x *GraphqlQuery) String() string

type GraphqlStations

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

func (*GraphqlStations) Descriptor deprecated

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

Deprecated: Use GraphqlStations.ProtoReflect.Descriptor instead.

func (*GraphqlStations) GetResponse

func (x *GraphqlStations) GetResponse() string

func (*GraphqlStations) ProtoMessage

func (*GraphqlStations) ProtoMessage()

func (*GraphqlStations) ProtoReflect

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

func (*GraphqlStations) Reset

func (x *GraphqlStations) Reset()

func (*GraphqlStations) String

func (x *GraphqlStations) String() string

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) Descriptor() ([]byte, []int)

Deprecated: Use IdRequest.ProtoReflect.Descriptor instead.

func (*IdRequest) GetId

func (x *IdRequest) GetId() uint32

func (*IdRequest) ProtoMessage

func (*IdRequest) ProtoMessage()

func (*IdRequest) ProtoReflect

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

func (*IdRequest) Reset

func (x *IdRequest) Reset()

func (*IdRequest) String

func (x *IdRequest) String() string

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) Descriptor() ([]byte, []int)

Deprecated: Use Query.ProtoReflect.Descriptor instead.

func (*Query) GetPage

func (x *Query) GetPage() uint32

func (*Query) GetPerPage

func (x *Query) GetPerPage() uint32

func (*Query) ProtoMessage

func (*Query) ProtoMessage()

func (*Query) ProtoReflect

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

func (*Query) Reset

func (x *Query) Reset()

func (*Query) String

func (x *Query) String() string

type StationHandler

type StationHandler interface {
	//Get station message according to station id
	GetStationByID(context.Context, *IdRequest, *StationResponse) error
	//Get all stations message
	GetStations(context.Context, *Query, *StationsResponse) error
}

type StationResponse

type StationResponse struct {
	StationID    uint32 `protobuf:"varint,1,opt,name=stationID,proto3" json:"stationID,omitempty"`
	PointID      uint32 `protobuf:"varint,2,opt,name=pointID,proto3" json:"pointID,omitempty"`
	Type         string `protobuf:"bytes,3,opt,name=type,proto3" json:"type,omitempty"`
	SysModes     uint32 `protobuf:"varint,4,opt,name=sysModes,proto3" json:"sysModes,omitempty"`
	CarrierTypes uint32 `protobuf:"varint,5,opt,name=carrierTypes,proto3" json:"carrierTypes,omitempty"`
	Remark       string `protobuf:"bytes,6,opt,name=remark,proto3" json:"remark,omitempty"`
	StationName  string `protobuf:"bytes,7,opt,name=stationName,proto3" json:"stationName,omitempty"`
	X            uint32 `protobuf:"varint,8,opt,name=x,proto3" json:"x,omitempty"`
	Y            uint32 `protobuf:"varint,9,opt,name=y,proto3" json:"y,omitempty"`
	Angle        uint32 `protobuf:"varint,10,opt,name=angle,proto3" json:"angle,omitempty"`
	// contains filtered or unexported fields
}

func (*StationResponse) Descriptor deprecated

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

Deprecated: Use StationResponse.ProtoReflect.Descriptor instead.

func (*StationResponse) GetAngle

func (x *StationResponse) GetAngle() uint32

func (*StationResponse) GetCarrierTypes

func (x *StationResponse) GetCarrierTypes() uint32

func (*StationResponse) GetPointID

func (x *StationResponse) GetPointID() uint32

func (*StationResponse) GetRemark

func (x *StationResponse) GetRemark() string

func (*StationResponse) GetStationID

func (x *StationResponse) GetStationID() uint32

func (*StationResponse) GetStationName

func (x *StationResponse) GetStationName() string

func (*StationResponse) GetSysModes

func (x *StationResponse) GetSysModes() uint32

func (*StationResponse) GetType

func (x *StationResponse) GetType() string

func (*StationResponse) GetX

func (x *StationResponse) GetX() uint32

func (*StationResponse) GetY

func (x *StationResponse) GetY() uint32

func (*StationResponse) ProtoMessage

func (*StationResponse) ProtoMessage()

func (*StationResponse) ProtoReflect

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

func (*StationResponse) Reset

func (x *StationResponse) Reset()

func (*StationResponse) String

func (x *StationResponse) String() string

type StationService

type StationService interface {
	//Get station message according to station id
	GetStationByID(ctx context.Context, in *IdRequest, opts ...client.CallOption) (*StationResponse, error)
	//Get all stations message
	GetStations(ctx context.Context, in *Query, opts ...client.CallOption) (*StationsResponse, error)
}

func NewStationService

func NewStationService(name string, c client.Client) StationService

type StationsResponse

type StationsResponse struct {
	Stations    []*StationResponse `protobuf:"bytes,1,rep,name=stations,proto3" json:"stations,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 (*StationsResponse) Descriptor deprecated

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

Deprecated: Use StationsResponse.ProtoReflect.Descriptor instead.

func (*StationsResponse) GetStations

func (x *StationsResponse) GetStations() []*StationResponse

func (*StationsResponse) GetTotalNumber

func (x *StationsResponse) GetTotalNumber() uint32

func (*StationsResponse) GetTotalpages

func (x *StationsResponse) GetTotalpages() uint32

func (*StationsResponse) ProtoMessage

func (*StationsResponse) ProtoMessage()

func (*StationsResponse) ProtoReflect

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

func (*StationsResponse) Reset

func (x *StationsResponse) Reset()

func (*StationsResponse) String

func (x *StationsResponse) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL