Documentation ¶
Overview ¶
Package public contains the implementation of the Transiter public API.
Index ¶
- type Server
- func (s *Server) Entrypoint(ctx context.Context, req *api.EntrypointRequest) (*api.EntrypointReply, error)
- func (s *Server) GetAgency(ctx context.Context, req *api.GetAgencyRequest) (*api.Agency, error)
- func (s *Server) GetAlert(ctx context.Context, req *api.GetAlertRequest) (*api.Alert, error)
- func (s *Server) GetFeed(ctx context.Context, req *api.GetFeedRequest) (*api.Feed, error)
- func (s *Server) GetRoute(ctx context.Context, req *api.GetRouteRequest) (*api.Route, error)
- func (s *Server) GetShape(ctx context.Context, req *api.GetShapeRequest) (*api.Shape, error)
- func (s *Server) GetStop(ctx context.Context, req *api.GetStopRequest) (*api.Stop, error)
- func (s *Server) GetSystem(ctx context.Context, req *api.GetSystemRequest) (*api.System, error)
- func (s *Server) GetTrip(ctx context.Context, req *api.GetTripRequest) (*api.Trip, error)
- func (s *Server) GetVehicle(ctx context.Context, req *api.GetVehicleRequest) (*api.Vehicle, error)
- func (s *Server) ListAgencies(ctx context.Context, req *api.ListAgenciesRequest) (*api.ListAgenciesReply, error)
- func (s *Server) ListAlerts(ctx context.Context, req *api.ListAlertsRequest) (*api.ListAlertsReply, error)
- func (s *Server) ListFeeds(ctx context.Context, req *api.ListFeedsRequest) (*api.ListFeedsReply, error)
- func (s *Server) ListRoutes(ctx context.Context, req *api.ListRoutesRequest) (*api.ListRoutesReply, error)
- func (s *Server) ListShapes(ctx context.Context, req *api.ListShapesRequest) (*api.ListShapesReply, error)
- func (s *Server) ListStops(ctx context.Context, req *api.ListStopsRequest) (*api.ListStopsReply, error)
- func (s *Server) ListSystems(ctx context.Context, req *api.ListSystemsRequest) (*api.ListSystemsReply, error)
- func (s *Server) ListTransfers(ctx context.Context, req *api.ListTransfersRequest) (*api.ListTransfersReply, error)
- func (s *Server) ListTrips(ctx context.Context, req *api.ListTripsRequest) (*api.ListTripsReply, error)
- func (s *Server) ListVehicles(ctx context.Context, req *api.ListVehiclesRequest) (*api.ListVehiclesReply, error)
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) GetVehicle ¶
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. |
Click to show internal directories.
Click to hide internal directories.