pb

package
v0.15.6 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2023 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
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.

View Source
var File_pb_krk_stops_proto protoreflect.FileDescriptor
View Source
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) Descriptor() ([]byte, []int)

Deprecated: Use Airly.ProtoReflect.Descriptor instead.

func (*Airly) GetCaqi

func (x *Airly) GetCaqi() int32

func (*Airly) GetColor

func (x *Airly) GetColor() uint32

func (*Airly) GetColorStr added in v0.2.0

func (x *Airly) GetColorStr() string

func (*Airly) GetHumidity

func (x *Airly) GetHumidity() int32

func (*Airly) GetTemperature

func (x *Airly) GetTemperature() float32

func (*Airly) ProtoMessage

func (*Airly) ProtoMessage()

func (*Airly) ProtoReflect

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

func (*Airly) Reset

func (x *Airly) Reset()

func (*Airly) String

func (x *Airly) String() string

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

Deprecated: Use Departure.ProtoReflect.Descriptor instead.

func (*Departure) GetColor

func (x *Departure) GetColor() uint32

func (*Departure) GetDirection

func (x *Departure) GetDirection() string

func (*Departure) GetPatternText

func (x *Departure) GetPatternText() string

func (*Departure) GetPlannedTime

func (x *Departure) GetPlannedTime() string

func (*Departure) GetPredicted

func (x *Departure) GetPredicted() bool

func (*Departure) GetRelativeTime

func (x *Departure) GetRelativeTime() int32

func (*Departure) GetRelativeTimeParsed

func (x *Departure) GetRelativeTimeParsed() string

func (*Departure) GetType added in v0.3.0

func (x *Departure) GetType() Endpoint

func (*Departure) ProtoMessage

func (*Departure) ProtoMessage()

func (*Departure) ProtoReflect

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

func (*Departure) Reset

func (x *Departure) Reset()

func (*Departure) String

func (x *Departure) String() string

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
const (
	Endpoint_BUS  Endpoint = 0
	Endpoint_TRAM Endpoint = 1
	Endpoint_ALL  Endpoint = 2
)

func (Endpoint) Descriptor added in v0.3.0

func (Endpoint) Descriptor() protoreflect.EnumDescriptor

func (Endpoint) Enum added in v0.3.0

func (x Endpoint) Enum() *Endpoint

func (Endpoint) EnumDescriptor deprecated added in v0.3.0

func (Endpoint) EnumDescriptor() ([]byte, []int)

Deprecated: Use Endpoint.Descriptor instead.

func (Endpoint) Number added in v0.3.0

func (x Endpoint) Number() protoreflect.EnumNumber

func (Endpoint) String added in v0.3.0

func (x Endpoint) String() string

func (Endpoint) Type added in v0.3.0

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

type PrettyPrint struct {
	*tabwriter.Writer
}

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

Deprecated: Use Stop.ProtoReflect.Descriptor instead.

func (*Stop) GetId added in v0.2.0

func (x *Stop) GetId() uint32

func (*Stop) GetName

func (x *Stop) GetName() string

func (*Stop) GetShortName

func (x *Stop) GetShortName() string

func (*Stop) GetType added in v0.3.0

func (x *Stop) GetType() Endpoint

func (*Stop) ProtoMessage

func (*Stop) ProtoMessage()

func (*Stop) ProtoReflect

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

func (*Stop) Reset

func (x *Stop) Reset()

func (*Stop) String

func (x *Stop) String() string

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

Deprecated: Use Stops.ProtoReflect.Descriptor instead.

func (*Stops) GetStops added in v0.5.0

func (x *Stops) GetStops() []*Stop

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

func (*Stops) Reset added in v0.5.0

func (x *Stops) Reset()

func (*Stops) String added in v0.5.0

func (x *Stops) String() string

type UnimplementedKrkStopsServer

type UnimplementedKrkStopsServer struct {
}

UnimplementedKrkStopsServer must be embedded to have forward compatible implementations.

func (UnimplementedKrkStopsServer) FindNearestAirlyInstallation

func (UnimplementedKrkStopsServer) GetAirly

func (UnimplementedKrkStopsServer) GetAirlyInstallation

func (UnimplementedKrkStopsServer) GetDepartures2 added in v0.5.0

func (UnimplementedKrkStopsServer) SearchStops2 added in v0.5.0

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.

Jump to

Keyboard shortcuts

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