public

package
v0.6.5 Latest Latest
Warning

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

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

Documentation

Overview

Package public contains the implementation of the Transiter public API.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

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

Server implements the Transiter public API.

func New

func New(pool *pgxpool.Pool, logger *slog.Logger, monitoring monitoring.Monitoring, endpointOptions *endpoints.EndpointOptions) *Server

New creates a new `Server` that uses the provided pool to connect to the database.

func (*Server) Entrypoint

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

func (*Server) GetAgency

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

func (*Server) GetAlert

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

func (*Server) GetFeed

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

func (*Server) GetRoute

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

func (*Server) GetShape added in v0.6.1

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

func (*Server) GetStop

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

func (*Server) GetSystem

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

func (*Server) GetTrip

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

func (*Server) GetVehicle

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

func (*Server) ListAgencies

func (s *Server) ListAgencies(ctx context.Context, req *api.ListAgenciesRequest) (*api.ListAgenciesReply, error)

func (*Server) ListAlerts

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

func (*Server) ListFeeds

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

func (*Server) ListRoutes

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

func (*Server) ListShapes added in v0.6.1

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

func (*Server) ListStops

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

func (*Server) ListSystems

func (s *Server) ListSystems(ctx context.Context, req *api.ListSystemsRequest) (*api.ListSystemsReply, error)

func (*Server) ListTransfers

func (s *Server) ListTransfers(ctx context.Context, req *api.ListTransfersRequest) (*api.ListTransfersReply, error)

func (*Server) ListTrips

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

func (*Server) ListVehicles

func (s *Server) ListVehicles(ctx context.Context, req *api.ListVehiclesRequest) (*api.ListVehiclesReply, error)

Directories

Path Synopsis
Package endpoints contains the logic for each public API endpoint.
Package endpoints contains the logic for each public API endpoint.
Package errors contains logic for making errors user-friendly at the API boundary.
Package errors contains logic for making errors user-friendly at the API boundary.
Package reference contains constructors for public API reference types.
Package reference contains constructors for public API reference types.

Jump to

Keyboard shortcuts

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