endpoints

package
v0.6.3 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2024 License: MIT Imports: 15 Imported by: 0

Documentation

Overview

Package endpoints contains the logic for each public API endpoint.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Entrypoint

func Entrypoint(ctx context.Context, r *Context, req *api.EntrypointRequest) (*api.EntrypointReply, error)

func GetAgency

func GetAgency(ctx context.Context, r *Context, req *api.GetAgencyRequest) (*api.Agency, error)

func GetAlert

func GetAlert(ctx context.Context, r *Context, req *api.GetAlertRequest) (*api.Alert, error)

func GetFeed

func GetFeed(ctx context.Context, r *Context, req *api.GetFeedRequest) (*api.Feed, error)

func GetRoute

func GetRoute(ctx context.Context, r *Context, req *api.GetRouteRequest) (*api.Route, error)

func GetShape added in v0.6.1

func GetShape(ctx context.Context, r *Context, req *api.GetShapeRequest) (*api.Shape, error)

func GetStop

func GetStop(ctx context.Context, r *Context, req *api.GetStopRequest) (*api.Stop, error)

func GetSystem

func GetSystem(ctx context.Context, r *Context, req *api.GetSystemRequest) (*api.System, error)

func GetTrip

func GetTrip(ctx context.Context, r *Context, req *api.GetTripRequest) (*api.Trip, error)

func GetVehicle

func GetVehicle(ctx context.Context, r *Context, req *api.GetVehicleRequest) (*api.Vehicle, error)

func ListAlerts

func ListAlerts(ctx context.Context, r *Context, req *api.ListAlertsRequest) (*api.ListAlertsReply, error)

func ListFeeds

func ListFeeds(ctx context.Context, r *Context, req *api.ListFeedsRequest) (*api.ListFeedsReply, error)

func ListRoutes

func ListRoutes(ctx context.Context, r *Context, req *api.ListRoutesRequest) (*api.ListRoutesReply, error)

func ListShapes added in v0.6.1

func ListShapes(ctx context.Context, r *Context, req *api.ListShapesRequest) (*api.ListShapesReply, error)

func ListStops

func ListStops(ctx context.Context, r *Context, req *api.ListStopsRequest) (*api.ListStopsReply, error)

func ListTrips

func ListTrips(ctx context.Context, r *Context, req *api.ListTripsRequest) (*api.ListTripsReply, error)

Types

type Context

type Context struct {
	Querier         db.Querier
	Reference       reference.Generator
	Logger          *slog.Logger
	EndpointOptions EndpointOptions
}

type EndpointOptions

type EndpointOptions struct {
	// The maximum number of stops, vehicles, and shapes that can be returned in a single request.
	// Defaults to 100.
	MaxEntitiesPerRequest int32
}

Jump to

Keyboard shortcuts

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