Documentation
¶
Index ¶
- func OpenAPIDocument(baseURL string) string
- func OpenAPIDocumentTemplate() string
- type Config
- type Server
- func (s *Server) CreateTrip(w http.ResponseWriter, r *http.Request, _ api.CreateTripParams)
- func (s *Server) GetSchema(w http.ResponseWriter, _ *http.Request)
- func (s *Server) GetTrip(w http.ResponseWriter, r *http.Request, id string)
- func (s *Server) GetTripYAML(w http.ResponseWriter, r *http.Request, id string, ...)
- func (s *Server) GetVersion(w http.ResponseWriter, r *http.Request, id, versionID string)
- func (s *Server) Handler() http.Handler
- func (s *Server) Health(w http.ResponseWriter, _ *http.Request)
- func (s *Server) ListTrips(w http.ResponseWriter, r *http.Request)
- func (s *Server) ListVersions(w http.ResponseWriter, r *http.Request, id string)
- func (s *Server) PatchTrip(w http.ResponseWriter, r *http.Request, id string, _ api.PatchTripParams)
- func (s *Server) PutTripYAML(w http.ResponseWriter, r *http.Request, id string, _ api.PutTripYAMLParams)
- func (s *Server) ReplaceDayRoutes(w http.ResponseWriter, r *http.Request, id string, ...)
- func (s *Server) RestoreVersion(w http.ResponseWriter, r *http.Request, id string, _ api.RestoreVersionParams)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func OpenAPIDocument ¶
OpenAPIDocument returns the OpenAPI YAML with {{BASE_URL}} replaced.
func OpenAPIDocumentTemplate ¶
func OpenAPIDocumentTemplate() string
OpenAPIDocumentTemplate returns the OpenAPI YAML with the {{BASE_URL}} placeholder.
Types ¶
type Config ¶
type Config struct {
Addr string
AgentBearerToken string
PublicBaseURL string
ItinerariesBucket string
CommentsBucket string
AWSRegion string
MaxYAMLBytes int64
OSRMBaseURL string
RouteMode string // straight | osrm
DescopeProjectID string
SessionSecret string
AllowedEmails []string // lowercase sign-in ACL (email only)
AllowedSubs []string // unused in v1; kept for CSV compat
OpenAIAPIKey string
OpenAIModel string
ChatAllowedEmails []string // lowercase; subset allowed to chat
ChatAllowedSubs []string // unused for chat ACL in v1
ContactEmail string // privacy / legal contact (CONTACT_EMAIL)
GoogleSiteVerification string // Search Console HTML tag (GOOGLE_SITE_VERIFICATION)
}
Config is runtime configuration for tripmapd.
func LoadConfig ¶
LoadConfig reads configuration from the environment.
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server is the tripmapd HTTP API.
func (*Server) CreateTrip ¶
func (s *Server) CreateTrip(w http.ResponseWriter, r *http.Request, _ api.CreateTripParams)
func (*Server) GetTripYAML ¶
func (s *Server) GetTripYAML(w http.ResponseWriter, r *http.Request, id string, params api.GetTripYAMLParams)
func (*Server) GetVersion ¶
func (*Server) ListVersions ¶
func (*Server) PatchTrip ¶
func (s *Server) PatchTrip(w http.ResponseWriter, r *http.Request, id string, _ api.PatchTripParams)
func (*Server) PutTripYAML ¶
func (s *Server) PutTripYAML(w http.ResponseWriter, r *http.Request, id string, _ api.PutTripYAMLParams)
func (*Server) ReplaceDayRoutes ¶
func (s *Server) ReplaceDayRoutes(w http.ResponseWriter, r *http.Request, id string, _ api.ReplaceDayRoutesParams)
func (*Server) RestoreVersion ¶
func (s *Server) RestoreVersion(w http.ResponseWriter, r *http.Request, id string, _ api.RestoreVersionParams)