api

package
Version: v0.0.0-...-5d2edb5 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2021 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ActionResource

type ActionResource interface {
	Action(response http.ResponseWriter, requestData *RequestData)
}

type Controller

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

type ControllerInterface

type ControllerInterface interface {
	// contains filtered or unexported methods
}

func NewImportController

func NewImportController(referential *core.Referential) ControllerInterface

func NewLineController

func NewLineController(referential *core.Referential) ControllerInterface

func NewOperatorController

func NewOperatorController(referential *core.Referential) ControllerInterface

func NewPartnerController

func NewPartnerController(referential *core.Referential) ControllerInterface

func NewReferentialController

func NewReferentialController(server *Server) ControllerInterface

func NewSituationController

func NewSituationController(referential *core.Referential) ControllerInterface

func NewStatusController

func NewStatusController(server *Server) ControllerInterface

func NewStopAreaController

func NewStopAreaController(referential *core.Referential) ControllerInterface

func NewStopVisitController

func NewStopVisitController(referential *core.Referential) ControllerInterface

func NewTimeController

func NewTimeController(server *Server) ControllerInterface

func NewVehicleController

func NewVehicleController(referential *core.Referential) ControllerInterface

func NewVehicleJourneyController

func NewVehicleJourneyController(referential *core.Referential) ControllerInterface

type GtfsHandler

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

func NewGtfsHandler

func NewGtfsHandler(referential *core.Referential, token string) *GtfsHandler

type ImportController

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

type ImportRequest

type ImportRequest struct {
	Force bool
}

type LineController

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

func (*LineController) Create

func (controller *LineController) Create(response http.ResponseWriter, body []byte)

func (*LineController) Delete

func (controller *LineController) Delete(response http.ResponseWriter, identifier string)

func (*LineController) Index

func (controller *LineController) Index(response http.ResponseWriter, filters url.Values)

func (*LineController) Show

func (controller *LineController) Show(response http.ResponseWriter, identifier string)

func (*LineController) Update

func (controller *LineController) Update(response http.ResponseWriter, identifier string, body []byte)

type OperatorController

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

func (*OperatorController) Create

func (controller *OperatorController) Create(response http.ResponseWriter, body []byte)

func (*OperatorController) Delete

func (controller *OperatorController) Delete(response http.ResponseWriter, identifier string)

func (*OperatorController) Index

func (controller *OperatorController) Index(response http.ResponseWriter, filters url.Values)

func (*OperatorController) Show

func (controller *OperatorController) Show(response http.ResponseWriter, identifier string)

func (*OperatorController) Update

func (controller *OperatorController) Update(response http.ResponseWriter, identifier string, body []byte)

type PartnerController

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

func (*PartnerController) Action

func (controller *PartnerController) Action(response http.ResponseWriter, requestData *RequestData)

func (*PartnerController) Create

func (controller *PartnerController) Create(response http.ResponseWriter, body []byte)

func (*PartnerController) Delete

func (controller *PartnerController) Delete(response http.ResponseWriter, identifier string)

func (*PartnerController) Index

func (controller *PartnerController) Index(response http.ResponseWriter, filters url.Values)

func (*PartnerController) Save

func (controller *PartnerController) Save(response http.ResponseWriter)

func (*PartnerController) Show

func (controller *PartnerController) Show(response http.ResponseWriter, identifier string)

func (*PartnerController) Update

func (controller *PartnerController) Update(response http.ResponseWriter, identifier string, body []byte)

type PushHandler

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

func NewPushHandler

func NewPushHandler(referential *core.Referential, token string) *PushHandler

type ReferentialController

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

func (*ReferentialController) Action

func (controller *ReferentialController) Action(response http.ResponseWriter, requestData *RequestData)

func (*ReferentialController) Create

func (controller *ReferentialController) Create(response http.ResponseWriter, body []byte)

func (*ReferentialController) Delete

func (controller *ReferentialController) Delete(response http.ResponseWriter, identifier string)

func (*ReferentialController) Index

func (controller *ReferentialController) Index(response http.ResponseWriter, filters url.Values)

func (*ReferentialController) Save

func (controller *ReferentialController) Save(response http.ResponseWriter)

func (*ReferentialController) Show

func (controller *ReferentialController) Show(response http.ResponseWriter, identifier string)

func (*ReferentialController) Update

func (controller *ReferentialController) Update(response http.ResponseWriter, identifier string, body []byte)

type RequestData

type RequestData struct {
	Filters     url.Values
	Body        []byte
	Method      string
	Referential string
	Resource    string
	Id          string
	Action      string
	Url         string
}

func NewRequestDataFromContent

func NewRequestDataFromContent(params []string) *RequestData

type RestfulResource

type RestfulResource interface {
	Index(response http.ResponseWriter, filters url.Values)
	Show(response http.ResponseWriter, identifier string)
	Delete(response http.ResponseWriter, identifier string)
	Update(response http.ResponseWriter, identifier string, body []byte)
	Create(response http.ResponseWriter, body []byte)
}

type SIRICheckStatusRequestHandler

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

func (*SIRICheckStatusRequestHandler) ConnectorType

func (handler *SIRICheckStatusRequestHandler) ConnectorType() string

func (*SIRICheckStatusRequestHandler) RequestorRef

func (handler *SIRICheckStatusRequestHandler) RequestorRef() string

func (*SIRICheckStatusRequestHandler) Respond

func (handler *SIRICheckStatusRequestHandler) Respond(connector core.Connector, rw http.ResponseWriter, message *audit.BigQueryMessage)

type SIRIDeleteSubscriptionRequestHandler

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

func (*SIRIDeleteSubscriptionRequestHandler) ConnectorType

func (handler *SIRIDeleteSubscriptionRequestHandler) ConnectorType() string

func (*SIRIDeleteSubscriptionRequestHandler) RequestorRef

func (handler *SIRIDeleteSubscriptionRequestHandler) RequestorRef() string

func (*SIRIDeleteSubscriptionRequestHandler) Respond

type SIRIEstimatedTimetableRequestHandler

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

func (*SIRIEstimatedTimetableRequestHandler) ConnectorType

func (handler *SIRIEstimatedTimetableRequestHandler) ConnectorType() string

func (*SIRIEstimatedTimetableRequestHandler) RequestorRef

func (handler *SIRIEstimatedTimetableRequestHandler) RequestorRef() string

func (*SIRIEstimatedTimetableRequestHandler) Respond

type SIRIGeneralMessageRequestDeliveriesResponseHandler

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

func (*SIRIGeneralMessageRequestDeliveriesResponseHandler) ConnectorType

func (*SIRIGeneralMessageRequestDeliveriesResponseHandler) RequestorRef

func (*SIRIGeneralMessageRequestDeliveriesResponseHandler) Respond

type SIRIGeneralMessageRequestHandler

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

func (*SIRIGeneralMessageRequestHandler) ConnectorType

func (handler *SIRIGeneralMessageRequestHandler) ConnectorType() string

func (*SIRIGeneralMessageRequestHandler) RequestorRef

func (handler *SIRIGeneralMessageRequestHandler) RequestorRef() string

func (*SIRIGeneralMessageRequestHandler) Respond

func (handler *SIRIGeneralMessageRequestHandler) Respond(connector core.Connector, rw http.ResponseWriter, message *audit.BigQueryMessage)

type SIRIHandler

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

func NewSIRIHandler

func NewSIRIHandler(referential *core.Referential) *SIRIHandler

type SIRILinesDiscoveryRequestHandler

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

func (*SIRILinesDiscoveryRequestHandler) ConnectorType

func (handler *SIRILinesDiscoveryRequestHandler) ConnectorType() string

func (*SIRILinesDiscoveryRequestHandler) RequestorRef

func (handler *SIRILinesDiscoveryRequestHandler) RequestorRef() string

func (*SIRILinesDiscoveryRequestHandler) Respond

func (handler *SIRILinesDiscoveryRequestHandler) Respond(connector core.Connector, rw http.ResponseWriter, message *audit.BigQueryMessage)

type SIRILiteHandler

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

func NewSIRILiteHandler

func NewSIRILiteHandler(referential *core.Referential, token string) *SIRILiteHandler

type SIRILiteRequestHandler

type SIRILiteRequestHandler interface {
	ConnectorType() string
	Respond(core.Connector, http.ResponseWriter, *audit.BigQueryMessage)
}

type SIRILiteVehicleMonitoringRequestHandler

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

func (*SIRILiteVehicleMonitoringRequestHandler) ConnectorType

func (handler *SIRILiteVehicleMonitoringRequestHandler) ConnectorType() string

func (*SIRILiteVehicleMonitoringRequestHandler) Respond

type SIRINotifySubscriptionTerminatedHandler

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

func (*SIRINotifySubscriptionTerminatedHandler) ConnectorType

func (handler *SIRINotifySubscriptionTerminatedHandler) ConnectorType() string

func (*SIRINotifySubscriptionTerminatedHandler) RequestorRef

func (handler *SIRINotifySubscriptionTerminatedHandler) RequestorRef() string

func (*SIRINotifySubscriptionTerminatedHandler) Respond

type SIRIRequestData

type SIRIRequestData struct {
	Filters     url.Values
	Referential string
	Request     string
	Url         string
}

func NewSIRIRequestDataFromContent

func NewSIRIRequestDataFromContent(params []string) (*SIRIRequestData, bool)

type SIRIRequestHandler

type SIRIRequestHandler interface {
	RequestorRef() string
	ConnectorType() string
	Respond(core.Connector, http.ResponseWriter, *audit.BigQueryMessage)
}

type SIRIServiceRequestHandler

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

func (*SIRIServiceRequestHandler) ConnectorType

func (handler *SIRIServiceRequestHandler) ConnectorType() string

func (*SIRIServiceRequestHandler) RequestorRef

func (handler *SIRIServiceRequestHandler) RequestorRef() string

func (*SIRIServiceRequestHandler) Respond

func (handler *SIRIServiceRequestHandler) Respond(connector core.Connector, rw http.ResponseWriter, message *audit.BigQueryMessage)

type SIRIStopDiscoveryRequestHandler

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

func (*SIRIStopDiscoveryRequestHandler) ConnectorType

func (handler *SIRIStopDiscoveryRequestHandler) ConnectorType() string

func (*SIRIStopDiscoveryRequestHandler) RequestorRef

func (handler *SIRIStopDiscoveryRequestHandler) RequestorRef() string

func (*SIRIStopDiscoveryRequestHandler) Respond

func (handler *SIRIStopDiscoveryRequestHandler) Respond(connector core.Connector, rw http.ResponseWriter, message *audit.BigQueryMessage)

type SIRIStopMonitoringRequestDeliveriesResponseHandler

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

func (*SIRIStopMonitoringRequestDeliveriesResponseHandler) ConnectorType

func (*SIRIStopMonitoringRequestDeliveriesResponseHandler) RequestorRef

func (*SIRIStopMonitoringRequestDeliveriesResponseHandler) Respond

type SIRIStopMonitoringRequestHandler

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

func (*SIRIStopMonitoringRequestHandler) ConnectorType

func (handler *SIRIStopMonitoringRequestHandler) ConnectorType() string

func (*SIRIStopMonitoringRequestHandler) RequestorRef

func (handler *SIRIStopMonitoringRequestHandler) RequestorRef() string

func (*SIRIStopMonitoringRequestHandler) Respond

func (handler *SIRIStopMonitoringRequestHandler) Respond(connector core.Connector, rw http.ResponseWriter, message *audit.BigQueryMessage)

type SIRISubscribeRequestHandler

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

func (*SIRISubscribeRequestHandler) ConnectorType

func (handler *SIRISubscribeRequestHandler) ConnectorType() string

func (*SIRISubscribeRequestHandler) RequestorRef

func (handler *SIRISubscribeRequestHandler) RequestorRef() string

func (*SIRISubscribeRequestHandler) Respond

func (handler *SIRISubscribeRequestHandler) Respond(connector core.Connector, rw http.ResponseWriter, message *audit.BigQueryMessage)

type SIRISubscriptionTerminatedNotificationHandler

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

func (*SIRISubscriptionTerminatedNotificationHandler) ConnectorType

func (handler *SIRISubscriptionTerminatedNotificationHandler) ConnectorType() string

func (*SIRISubscriptionTerminatedNotificationHandler) RequestorRef

func (handler *SIRISubscriptionTerminatedNotificationHandler) RequestorRef() string

func (*SIRISubscriptionTerminatedNotificationHandler) Respond

type Savable

type Savable interface {
	Save(response http.ResponseWriter)
}

type Server

type Server struct {
	uuid.UUIDConsumer
	clock.ClockConsumer
	core.ReferentialsConsumer
	// contains filtered or unexported fields
}

func NewServer

func NewServer(bind string) *Server

func (*Server) HandleFlow

func (server *Server) HandleFlow(response http.ResponseWriter, request *http.Request)

func (*Server) ListenAndServe

func (server *Server) ListenAndServe() error

type SiriErrorResponse

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

type SituationController

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

func (*SituationController) Create

func (controller *SituationController) Create(response http.ResponseWriter, body []byte)

func (*SituationController) Delete

func (controller *SituationController) Delete(response http.ResponseWriter, identifier string)

func (*SituationController) Index

func (controller *SituationController) Index(response http.ResponseWriter, filters url.Values)

func (*SituationController) Show

func (controller *SituationController) Show(response http.ResponseWriter, identifier string)

func (*SituationController) Update

func (controller *SituationController) Update(response http.ResponseWriter, identifier string, body []byte)

type Status

type Status struct {
	Status  string `json:"status"`
	Version string `json:"version"`
}

type StatusController

type StatusController struct{}

type StopAreaController

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

func (*StopAreaController) Create

func (controller *StopAreaController) Create(response http.ResponseWriter, body []byte)

func (*StopAreaController) Delete

func (controller *StopAreaController) Delete(response http.ResponseWriter, identifier string)

func (*StopAreaController) Index

func (controller *StopAreaController) Index(response http.ResponseWriter, filters url.Values)

func (*StopAreaController) Show

func (controller *StopAreaController) Show(response http.ResponseWriter, identifier string)

func (*StopAreaController) Update

func (controller *StopAreaController) Update(response http.ResponseWriter, identifier string, body []byte)

type StopVisitController

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

func (*StopVisitController) Create

func (controller *StopVisitController) Create(response http.ResponseWriter, body []byte)

func (*StopVisitController) Delete

func (controller *StopVisitController) Delete(response http.ResponseWriter, identifier string)

func (*StopVisitController) Index

func (controller *StopVisitController) Index(response http.ResponseWriter, filters url.Values)

func (*StopVisitController) Show

func (controller *StopVisitController) Show(response http.ResponseWriter, identifier string)

func (*StopVisitController) Update

func (controller *StopVisitController) Update(response http.ResponseWriter, identifier string, body []byte)

type TimeController

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

type VehicleController

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

func (*VehicleController) Create

func (controller *VehicleController) Create(response http.ResponseWriter, body []byte)

func (*VehicleController) Delete

func (controller *VehicleController) Delete(response http.ResponseWriter, identifier string)

func (*VehicleController) Index

func (controller *VehicleController) Index(response http.ResponseWriter, filters url.Values)

func (*VehicleController) Show

func (controller *VehicleController) Show(response http.ResponseWriter, identifier string)

func (*VehicleController) Update

func (controller *VehicleController) Update(response http.ResponseWriter, identifier string, body []byte)

type VehicleJourneyController

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

func (*VehicleJourneyController) Create

func (controller *VehicleJourneyController) Create(response http.ResponseWriter, body []byte)

func (*VehicleJourneyController) Delete

func (controller *VehicleJourneyController) Delete(response http.ResponseWriter, identifier string)

func (*VehicleJourneyController) Index

func (controller *VehicleJourneyController) Index(response http.ResponseWriter, filters url.Values)

func (*VehicleJourneyController) Show

func (controller *VehicleJourneyController) Show(response http.ResponseWriter, identifier string)

func (*VehicleJourneyController) Update

func (controller *VehicleJourneyController) Update(response http.ResponseWriter, identifier string, body []byte)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL