servicemaps

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Package servicemaps contains all of the logic for Transiter's service maps features.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ListConfigsInSystem

func ListConfigsInSystem(ctx context.Context, querier db.Querier, logger *slog.Logger, systemPk int64) (map[api.ServiceMapConfig_Source][]Config, error)

ListConfigsInSystem lists all of the service map configs in the provided system, grouped by source.

func UpdateConfig

func UpdateConfig(ctx context.Context, querier db.Querier, systemPk int64, configs []*api.ServiceMapConfig) error

UpdateConfig updates the service map configuration for the provided system.

func UpdateRealtimeMaps

func UpdateRealtimeMaps(ctx context.Context, querier db.Querier, logger *slog.Logger, systemPk int64, routePks []int64) error

UpdateRealtimeMaps updates the realtime service maps

func UpdateStaticMaps

func UpdateStaticMaps(ctx context.Context, querier db.Querier, logger *slog.Logger, args UpdateStaticMapsArgs) error

UpdateStaticMaps updates the static service maps

Types

type Config

type Config struct {
	Pk     int64
	Config *api.ServiceMapConfig
}

type UpdateStaticMapsArgs

type UpdateStaticMapsArgs struct {
	SystemPk    int64
	Trips       []gtfs.ScheduledTrip
	RouteIDToPk map[string]int64
}

Jump to

Keyboard shortcuts

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