Documentation
¶
Index ¶
- Variables
- func RegisterKrkStopsServer(s grpc.ServiceRegistrar, srv KrkStopsServer)
- type Airly
- func (*Airly) Descriptor() ([]byte, []int)deprecated
- func (x *Airly) GetCaqi() int32
- func (x *Airly) GetColor() uint32
- func (x *Airly) GetColorStr() string
- func (x *Airly) GetHumidity() int32
- func (x *Airly) GetTemperature() float32
- func (*Airly) ProtoMessage()
- func (x *Airly) ProtoReflect() protoreflect.Message
- func (x *Airly) Reset()
- func (x *Airly) String() string
- type Departure
- func (*Departure) Descriptor() ([]byte, []int)deprecated
- func (x *Departure) GetColor() uint32
- func (x *Departure) GetDirection() string
- func (x *Departure) GetPatternText() string
- func (x *Departure) GetPlannedTime() string
- func (x *Departure) GetPredicted() bool
- func (x *Departure) GetRelativeTime() int32
- func (x *Departure) GetRelativeTimeParsed() string
- func (x *Departure) GetType() Endpoint
- func (*Departure) ProtoMessage()
- func (x *Departure) ProtoReflect() protoreflect.Message
- func (x *Departure) Reset()
- func (x *Departure) String() string
- type Departures
- type Endpoint
- type Installation
- func (*Installation) Descriptor() ([]byte, []int)deprecated
- func (x *Installation) GetId() int32
- func (x *Installation) GetLatitude() float32
- func (x *Installation) GetLongitude() float32
- func (*Installation) ProtoMessage()
- func (x *Installation) ProtoReflect() protoreflect.Message
- func (x *Installation) Reset()
- func (x *Installation) String() string
- type InstallationLocation
- func (*InstallationLocation) Descriptor() ([]byte, []int)deprecated
- func (x *InstallationLocation) GetLatitude() float32
- func (x *InstallationLocation) GetLongitude() float32
- func (*InstallationLocation) ProtoMessage()
- func (x *InstallationLocation) ProtoReflect() protoreflect.Message
- func (x *InstallationLocation) Reset()
- func (x *InstallationLocation) String() string
- type KrkStopsClient
- type KrkStopsServer
- type PrettyPrint
- type Stop
- func (*Stop) Descriptor() ([]byte, []int)deprecated
- func (x *Stop) GetId() uint32
- func (x *Stop) GetName() string
- func (x *Stop) GetShortName() string
- func (x *Stop) GetType() Endpoint
- func (*Stop) ProtoMessage()
- func (x *Stop) ProtoReflect() protoreflect.Message
- func (x *Stop) Reset()
- func (x *Stop) String() string
- type StopSearch
- type Stops
- type UnimplementedKrkStopsServer
- func (UnimplementedKrkStopsServer) FindNearestAirlyInstallation(context.Context, *InstallationLocation) (*Installation, error)
- func (UnimplementedKrkStopsServer) GetAirly(context.Context, *Installation) (*Airly, error)
- func (UnimplementedKrkStopsServer) GetAirlyInstallation(context.Context, *Installation) (*Installation, error)
- func (UnimplementedKrkStopsServer) GetDepartures2(context.Context, *Stop) (*Departures, error)
- func (UnimplementedKrkStopsServer) SearchStops2(context.Context, *StopSearch) (*Stops, error)
- type UnsafeKrkStopsServer
Constants ¶
This section is empty.
Variables ¶
var ( Endpoint_name = map[int32]string{ 0: "BUS", 1: "TRAM", 2: "ALL", } Endpoint_value = map[string]int32{ "BUS": 0, "TRAM": 1, "ALL": 2, } )
Enum value maps for Endpoint.
var File_pb_krk_stops_proto protoreflect.FileDescriptor
var KrkStops_ServiceDesc = grpc.ServiceDesc{ ServiceName: "KrkStops", HandlerType: (*KrkStopsServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "GetAirly", Handler: _KrkStops_GetAirly_Handler, }, { MethodName: "FindNearestAirlyInstallation", Handler: _KrkStops_FindNearestAirlyInstallation_Handler, }, { MethodName: "GetAirlyInstallation", Handler: _KrkStops_GetAirlyInstallation_Handler, }, { MethodName: "GetDepartures2", Handler: _KrkStops_GetDepartures2_Handler, }, { MethodName: "SearchStops2", Handler: _KrkStops_SearchStops2_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "pb/krk-stops.proto", }
KrkStops_ServiceDesc is the grpc.ServiceDesc for KrkStops service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterKrkStopsServer ¶
func RegisterKrkStopsServer(s grpc.ServiceRegistrar, srv KrkStopsServer)
Types ¶
type Airly ¶
type Airly struct { Caqi int32 `protobuf:"varint,1,opt,name=caqi,proto3" json:"caqi,omitempty"` ColorStr string `protobuf:"bytes,2,opt,name=colorStr,proto3" json:"colorStr,omitempty"` Humidity int32 `protobuf:"varint,3,opt,name=humidity,proto3" json:"humidity,omitempty"` Temperature float32 `protobuf:"fixed32,4,opt,name=temperature,proto3" json:"temperature,omitempty"` Color uint32 `protobuf:"varint,5,opt,name=color,proto3" json:"color,omitempty"` // contains filtered or unexported fields }
func (*Airly) Descriptor
deprecated
func (*Airly) GetColorStr ¶ added in v0.2.0
func (*Airly) GetHumidity ¶
func (*Airly) GetTemperature ¶
func (*Airly) ProtoMessage ¶
func (*Airly) ProtoMessage()
func (*Airly) ProtoReflect ¶
func (x *Airly) ProtoReflect() protoreflect.Message
type Departure ¶
type Departure struct { RelativeTime int32 `protobuf:"varint,1,opt,name=relativeTime,proto3" json:"relativeTime,omitempty"` PlannedTime string `protobuf:"bytes,2,opt,name=plannedTime,proto3" json:"plannedTime,omitempty"` Direction string `protobuf:"bytes,3,opt,name=direction,proto3" json:"direction,omitempty"` PatternText string `protobuf:"bytes,4,opt,name=patternText,proto3" json:"patternText,omitempty"` Color uint32 `protobuf:"varint,5,opt,name=color,proto3" json:"color,omitempty"` RelativeTimeParsed string `protobuf:"bytes,6,opt,name=relativeTimeParsed,proto3" json:"relativeTimeParsed,omitempty"` Predicted bool `protobuf:"varint,7,opt,name=predicted,proto3" json:"predicted,omitempty"` Type Endpoint `protobuf:"varint,8,opt,name=type,proto3,enum=Endpoint" json:"type,omitempty"` // contains filtered or unexported fields }
func (*Departure) Descriptor
deprecated
func (*Departure) GetDirection ¶
func (*Departure) GetPatternText ¶
func (*Departure) GetPlannedTime ¶
func (*Departure) GetPredicted ¶
func (*Departure) GetRelativeTime ¶
func (*Departure) GetRelativeTimeParsed ¶
func (*Departure) ProtoMessage ¶
func (*Departure) ProtoMessage()
func (*Departure) ProtoReflect ¶
func (x *Departure) ProtoReflect() protoreflect.Message
type Departures ¶ added in v0.5.0
type Departures struct { Departures []*Departure `protobuf:"bytes,1,rep,name=departures,proto3" json:"departures,omitempty"` // contains filtered or unexported fields }
func (*Departures) Descriptor
deprecated
added in
v0.5.0
func (*Departures) Descriptor() ([]byte, []int)
Deprecated: Use Departures.ProtoReflect.Descriptor instead.
func (*Departures) GetDepartures ¶ added in v0.5.0
func (x *Departures) GetDepartures() []*Departure
func (*Departures) ProtoMessage ¶ added in v0.5.0
func (*Departures) ProtoMessage()
func (*Departures) ProtoReflect ¶ added in v0.5.0
func (x *Departures) ProtoReflect() protoreflect.Message
func (*Departures) Reset ¶ added in v0.5.0
func (x *Departures) Reset()
func (*Departures) String ¶ added in v0.5.0
func (x *Departures) String() string
type Endpoint ¶ added in v0.3.0
type Endpoint int32
func (Endpoint) Descriptor ¶ added in v0.3.0
func (Endpoint) Descriptor() protoreflect.EnumDescriptor
func (Endpoint) EnumDescriptor
deprecated
added in
v0.3.0
func (Endpoint) Number ¶ added in v0.3.0
func (x Endpoint) Number() protoreflect.EnumNumber
func (Endpoint) Type ¶ added in v0.3.0
func (Endpoint) Type() protoreflect.EnumType
type Installation ¶
type Installation struct { Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` Latitude float32 `protobuf:"fixed32,2,opt,name=latitude,proto3" json:"latitude,omitempty"` Longitude float32 `protobuf:"fixed32,3,opt,name=longitude,proto3" json:"longitude,omitempty"` // contains filtered or unexported fields }
func (*Installation) Descriptor
deprecated
func (*Installation) Descriptor() ([]byte, []int)
Deprecated: Use Installation.ProtoReflect.Descriptor instead.
func (*Installation) GetId ¶
func (x *Installation) GetId() int32
func (*Installation) GetLatitude ¶
func (x *Installation) GetLatitude() float32
func (*Installation) GetLongitude ¶
func (x *Installation) GetLongitude() float32
func (*Installation) ProtoMessage ¶
func (*Installation) ProtoMessage()
func (*Installation) ProtoReflect ¶
func (x *Installation) ProtoReflect() protoreflect.Message
func (*Installation) Reset ¶
func (x *Installation) Reset()
func (*Installation) String ¶
func (x *Installation) String() string
type InstallationLocation ¶
type InstallationLocation struct { Latitude float32 `protobuf:"fixed32,1,opt,name=latitude,proto3" json:"latitude,omitempty"` Longitude float32 `protobuf:"fixed32,2,opt,name=longitude,proto3" json:"longitude,omitempty"` // contains filtered or unexported fields }
func (*InstallationLocation) Descriptor
deprecated
func (*InstallationLocation) Descriptor() ([]byte, []int)
Deprecated: Use InstallationLocation.ProtoReflect.Descriptor instead.
func (*InstallationLocation) GetLatitude ¶
func (x *InstallationLocation) GetLatitude() float32
func (*InstallationLocation) GetLongitude ¶
func (x *InstallationLocation) GetLongitude() float32
func (*InstallationLocation) ProtoMessage ¶
func (*InstallationLocation) ProtoMessage()
func (*InstallationLocation) ProtoReflect ¶
func (x *InstallationLocation) ProtoReflect() protoreflect.Message
func (*InstallationLocation) Reset ¶
func (x *InstallationLocation) Reset()
func (*InstallationLocation) String ¶
func (x *InstallationLocation) String() string
type KrkStopsClient ¶
type KrkStopsClient interface { GetAirly(ctx context.Context, in *Installation, opts ...grpc.CallOption) (*Airly, error) FindNearestAirlyInstallation(ctx context.Context, in *InstallationLocation, opts ...grpc.CallOption) (*Installation, error) GetAirlyInstallation(ctx context.Context, in *Installation, opts ...grpc.CallOption) (*Installation, error) GetDepartures2(ctx context.Context, in *Stop, opts ...grpc.CallOption) (*Departures, error) SearchStops2(ctx context.Context, in *StopSearch, opts ...grpc.CallOption) (*Stops, error) }
KrkStopsClient is the client API for KrkStops 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 NewKrkStopsClient ¶
func NewKrkStopsClient(cc grpc.ClientConnInterface) KrkStopsClient
type KrkStopsServer ¶
type KrkStopsServer interface { GetAirly(context.Context, *Installation) (*Airly, error) FindNearestAirlyInstallation(context.Context, *InstallationLocation) (*Installation, error) GetAirlyInstallation(context.Context, *Installation) (*Installation, error) GetDepartures2(context.Context, *Stop) (*Departures, error) SearchStops2(context.Context, *StopSearch) (*Stops, error) // contains filtered or unexported methods }
KrkStopsServer is the server API for KrkStops service. All implementations must embed UnimplementedKrkStopsServer for forward compatibility
type PrettyPrint ¶ added in v0.3.0
func NewPrettyPrint ¶ added in v0.3.0
func NewPrettyPrint(cmd *cobra.Command) PrettyPrint
func (PrettyPrint) Airly ¶ added in v0.3.0
func (p PrettyPrint) Airly(airly *Airly)
PrettyPrint Airly data
func (*PrettyPrint) Departures ¶ added in v0.3.0
func (p *PrettyPrint) Departures(deps []*Departure)
PrettyPrint departures
func (*PrettyPrint) Stops ¶ added in v0.3.0
func (p *PrettyPrint) Stops(stops []*Stop)
PrettyPrint stops
type Stop ¶
type Stop struct { ShortName string `protobuf:"bytes,1,opt,name=shortName,proto3" json:"shortName,omitempty"` Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` Id uint32 `protobuf:"varint,3,opt,name=id,proto3" json:"id,omitempty"` Type Endpoint `protobuf:"varint,4,opt,name=type,proto3,enum=Endpoint" json:"type,omitempty"` // contains filtered or unexported fields }
func (*Stop) Descriptor
deprecated
func (*Stop) GetShortName ¶
func (*Stop) ProtoMessage ¶
func (*Stop) ProtoMessage()
func (*Stop) ProtoReflect ¶
func (x *Stop) ProtoReflect() protoreflect.Message
type StopSearch ¶
type StopSearch struct { Query string `protobuf:"bytes,1,opt,name=query,proto3" json:"query,omitempty"` // contains filtered or unexported fields }
func (*StopSearch) Descriptor
deprecated
func (*StopSearch) Descriptor() ([]byte, []int)
Deprecated: Use StopSearch.ProtoReflect.Descriptor instead.
func (*StopSearch) GetQuery ¶
func (x *StopSearch) GetQuery() string
func (*StopSearch) ProtoMessage ¶
func (*StopSearch) ProtoMessage()
func (*StopSearch) ProtoReflect ¶
func (x *StopSearch) ProtoReflect() protoreflect.Message
func (*StopSearch) Reset ¶
func (x *StopSearch) Reset()
func (*StopSearch) String ¶
func (x *StopSearch) String() string
type Stops ¶ added in v0.5.0
type Stops struct { Stops []*Stop `protobuf:"bytes,1,rep,name=stops,proto3" json:"stops,omitempty"` // contains filtered or unexported fields }
func (*Stops) Descriptor
deprecated
added in
v0.5.0
func (*Stops) ProtoMessage ¶ added in v0.5.0
func (*Stops) ProtoMessage()
func (*Stops) ProtoReflect ¶ added in v0.5.0
func (x *Stops) ProtoReflect() protoreflect.Message
type UnimplementedKrkStopsServer ¶
type UnimplementedKrkStopsServer struct { }
UnimplementedKrkStopsServer must be embedded to have forward compatible implementations.
func (UnimplementedKrkStopsServer) FindNearestAirlyInstallation ¶
func (UnimplementedKrkStopsServer) FindNearestAirlyInstallation(context.Context, *InstallationLocation) (*Installation, error)
func (UnimplementedKrkStopsServer) GetAirly ¶
func (UnimplementedKrkStopsServer) GetAirly(context.Context, *Installation) (*Airly, error)
func (UnimplementedKrkStopsServer) GetAirlyInstallation ¶
func (UnimplementedKrkStopsServer) GetAirlyInstallation(context.Context, *Installation) (*Installation, error)
func (UnimplementedKrkStopsServer) GetDepartures2 ¶ added in v0.5.0
func (UnimplementedKrkStopsServer) GetDepartures2(context.Context, *Stop) (*Departures, error)
func (UnimplementedKrkStopsServer) SearchStops2 ¶ added in v0.5.0
func (UnimplementedKrkStopsServer) SearchStops2(context.Context, *StopSearch) (*Stops, error)
type UnsafeKrkStopsServer ¶
type UnsafeKrkStopsServer interface {
// contains filtered or unexported methods
}
UnsafeKrkStopsServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to KrkStopsServer will result in compilation errors.