krkstops

package module
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2021 License: GPL-3.0 Imports: 18 Imported by: 0

README

Krkstops

Krkstops is golang backend for KrkStops web and mobile application. Enjoy!

Documentation

Index

Constants

View Source
const (
	TO_SCORE = "to.score"
	BUS      = "bus"
	TRAM     = "tram"
	NAMES    = "names"
	SUG      = "sug"
	SCORES   = "scores"
)

Variables

View Source
var ENDPOINT = "krkstops.germanywestcentral.cloudapp.azure.com:8080"

Functions

This section is empty.

Types

type Cache added in v0.5.0

type Cache struct {
	// contains filtered or unexported fields
}

func NewCache added in v0.5.0

func NewCache(redisURI, sugKey string) (*Cache, error)

func (*Cache) Score added in v0.5.0

func (c *Cache) Score(ctx context.Context, cancel <-chan os.Signal, cli pb.KrkStopsClient, sleep time.Duration) error

func (*Cache) Search added in v0.5.0

func (c *Cache) Search(ctx context.Context, phrase string) ([]*pb.Stop, error)

func (*Cache) Update added in v0.5.0

func (c *Cache) Update() error

type KrkStopsServer added in v0.3.0

type KrkStopsServer struct {
	pb.UnimplementedKrkStopsServer

	Airly airly.Endpoint
	Ttss  []ttss.Endpointer
	// contains filtered or unexported fields
}

func NewServer added in v0.5.0

func NewServer(redisURI string) (*KrkStopsServer, error)

func (*KrkStopsServer) FindNearestAirlyInstallation added in v0.3.0

func (s *KrkStopsServer) FindNearestAirlyInstallation(ctx context.Context, location *pb.InstallationLocation) (*pb.Installation, error)

func (*KrkStopsServer) GetAirly added in v0.3.0

func (s *KrkStopsServer) GetAirly(ctx context.Context, installation *pb.Installation) (*pb.Airly, error)

func (*KrkStopsServer) GetAirlyInstallation added in v0.3.0

func (s *KrkStopsServer) GetAirlyInstallation(ctx context.Context, installation *pb.Installation) (*pb.Installation, error)

func (*KrkStopsServer) GetDepartures2 added in v0.5.0

func (s *KrkStopsServer) GetDepartures2(ctx context.Context, stop *pb.Stop) (*pb.Departures, error)

func (*KrkStopsServer) SearchStops2 added in v0.5.0

func (s *KrkStopsServer) SearchStops2(ctx context.Context, search *pb.StopSearch) (*pb.Stops, error)

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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