Documentation
¶
Index ¶
- Constants
- func Adapt(handler http.Handler, adapters ...Adapter) http.Handler
- func AddBasicHandlers(mux *http.ServeMux) *http.ServeMux
- func AddToMux(mux *http.ServeMux, es *EventSourcerer, cfg *conf.IMSConfig, db *store.DBQ, ...) *http.ServeMux
- type AccessForEvent
- type Adapter
- type AttachRangerToIncident
- type AttachRangerToStay
- type AttachToFieldReport
- type AttachToIncident
- type AttachToStay
- type ContextKey
- type DetachRangerFromIncident
- type DetachRangerFromStay
- type EditEvent
- type EditFieldReport
- type EditFieldReportReportEntry
- type EditIncident
- type EditIncidentReportEntry
- type EditIncidentTypes
- type EditStay
- type EditStayReportEntry
- type EditStreets
- type EventSourcerer
- type GetActionLogs
- type GetAuth
- type GetAuthResponse
- type GetBuildInfo
- type GetDestinations
- type GetEventAccesses
- type GetEvents
- type GetFieldReport
- type GetFieldReportAttachment
- type GetFieldReports
- type GetIncident
- type GetIncidentAttachment
- type GetIncidentTypes
- type GetIncidents
- type GetPersonnel
- type GetPersonnelResponse
- type GetRuntimeMetrics
- type GetStay
- type GetStayAttachment
- type GetStays
- type GetStreets
- type IMSEvent
- type IMSEventData
- type JWTContext
- type NewFieldReport
- type NewIncident
- type NewStay
- type PerformGC
- type PostAuth
- type PostAuthRequest
- type PostAuthResponse
- type PostEventAccess
- type RefreshAccessToken
- type RefreshAccessTokenResponse
- type UpdateDestinations
Constants ¶
View Source
const (
ErrLongPassword = authError("rejected very long password")
)
View Source
const EventSourceChannel = "imsevents"
View Source
const (
IMSAttachmentFormKey = "imsAttachment"
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AccessForEvent ¶
type AccessForEvent struct {
EventID int32 `json:"event_id"`
ReadIncidents bool `json:"readIncidents"`
WriteIncidents bool `json:"writeIncidents"`
WriteFieldReports bool `json:"writeFieldReports"`
ReadStays bool `json:"readStays"`
WriteStays bool `json:"writeStays"`
AttachFiles bool `json:"attachFiles"`
}
type Adapter ¶
func LimitRequestBytes ¶
func LogRequest ¶
func OptionalAuthN ¶
func RecoverFromPanic ¶
func RecoverFromPanic() Adapter
func RequireAuthN ¶
type AttachRangerToIncident ¶
type AttachRangerToIncident struct {
// contains filtered or unexported fields
}
func (AttachRangerToIncident) ServeHTTP ¶
func (action AttachRangerToIncident) ServeHTTP(w http.ResponseWriter, req *http.Request)
type AttachRangerToStay ¶
type AttachRangerToStay struct {
// contains filtered or unexported fields
}
func (AttachRangerToStay) ServeHTTP ¶
func (action AttachRangerToStay) ServeHTTP(w http.ResponseWriter, req *http.Request)
type AttachToFieldReport ¶
type AttachToFieldReport struct {
// contains filtered or unexported fields
}
func (AttachToFieldReport) ServeHTTP ¶
func (action AttachToFieldReport) ServeHTTP(w http.ResponseWriter, req *http.Request)
type AttachToIncident ¶
type AttachToIncident struct {
// contains filtered or unexported fields
}
func (AttachToIncident) ServeHTTP ¶
func (action AttachToIncident) ServeHTTP(w http.ResponseWriter, req *http.Request)
type AttachToStay ¶
type AttachToStay struct {
// contains filtered or unexported fields
}
func (AttachToStay) ServeHTTP ¶
func (action AttachToStay) ServeHTTP(w http.ResponseWriter, req *http.Request)
type DetachRangerFromIncident ¶
type DetachRangerFromIncident struct {
// contains filtered or unexported fields
}
func (DetachRangerFromIncident) ServeHTTP ¶
func (action DetachRangerFromIncident) ServeHTTP(w http.ResponseWriter, req *http.Request)
type DetachRangerFromStay ¶
type DetachRangerFromStay struct {
// contains filtered or unexported fields
}
func (DetachRangerFromStay) ServeHTTP ¶
func (action DetachRangerFromStay) ServeHTTP(w http.ResponseWriter, req *http.Request)
type EditFieldReport ¶
type EditFieldReport struct {
// contains filtered or unexported fields
}
func (EditFieldReport) ServeHTTP ¶
func (action EditFieldReport) ServeHTTP(w http.ResponseWriter, req *http.Request)
type EditFieldReportReportEntry ¶
type EditFieldReportReportEntry struct {
// contains filtered or unexported fields
}
func (EditFieldReportReportEntry) ServeHTTP ¶
func (action EditFieldReportReportEntry) ServeHTTP(w http.ResponseWriter, req *http.Request)
type EditIncident ¶
type EditIncident struct {
// contains filtered or unexported fields
}
func (EditIncident) ServeHTTP ¶
func (action EditIncident) ServeHTTP(w http.ResponseWriter, req *http.Request)
type EditIncidentReportEntry ¶
type EditIncidentReportEntry struct {
// contains filtered or unexported fields
}
func (EditIncidentReportEntry) ServeHTTP ¶
func (action EditIncidentReportEntry) ServeHTTP(w http.ResponseWriter, req *http.Request)
type EditIncidentTypes ¶
type EditIncidentTypes struct {
// contains filtered or unexported fields
}
func (EditIncidentTypes) ServeHTTP ¶
func (action EditIncidentTypes) ServeHTTP(w http.ResponseWriter, req *http.Request)
type EditStayReportEntry ¶
type EditStayReportEntry struct {
// contains filtered or unexported fields
}
func (EditStayReportEntry) ServeHTTP ¶
func (action EditStayReportEntry) ServeHTTP(w http.ResponseWriter, req *http.Request)
type EditStreets ¶
type EditStreets struct {
// contains filtered or unexported fields
}
func (EditStreets) ServeHTTP ¶
func (action EditStreets) ServeHTTP(w http.ResponseWriter, req *http.Request)
type EventSourcerer ¶
type EventSourcerer struct {
Server *eventsource.Server
IdCounter atomic.Int64
}
func NewEventSourcerer ¶
func NewEventSourcerer() *EventSourcerer
func (*EventSourcerer) Replay ¶
func (es *EventSourcerer) Replay(channel, id string) chan eventsource.Event
type GetActionLogs ¶
type GetActionLogs struct {
// contains filtered or unexported fields
}
func (GetActionLogs) ServeHTTP ¶
func (action GetActionLogs) ServeHTTP(w http.ResponseWriter, req *http.Request)
type GetAuthResponse ¶
type GetAuthResponse struct {
Authenticated bool `json:"authenticated"`
User string `json:"user,omitzero"`
Admin bool `json:"admin"`
EventAccess map[string]AccessForEvent `json:"event_access"`
}
type GetBuildInfo ¶
type GetBuildInfo struct {
// contains filtered or unexported fields
}
func (GetBuildInfo) ServeHTTP ¶
func (action GetBuildInfo) ServeHTTP(w http.ResponseWriter, req *http.Request)
type GetDestinations ¶
type GetDestinations struct {
// contains filtered or unexported fields
}
func (GetDestinations) ServeHTTP ¶
func (action GetDestinations) ServeHTTP(w http.ResponseWriter, req *http.Request)
type GetEventAccesses ¶
type GetEventAccesses struct {
// contains filtered or unexported fields
}
func (GetEventAccesses) ServeHTTP ¶
func (action GetEventAccesses) ServeHTTP(w http.ResponseWriter, req *http.Request)
type GetFieldReport ¶
type GetFieldReport struct {
// contains filtered or unexported fields
}
func (GetFieldReport) ServeHTTP ¶
func (action GetFieldReport) ServeHTTP(w http.ResponseWriter, req *http.Request)
type GetFieldReportAttachment ¶
type GetFieldReportAttachment struct {
// contains filtered or unexported fields
}
func (GetFieldReportAttachment) ServeHTTP ¶
func (action GetFieldReportAttachment) ServeHTTP(w http.ResponseWriter, req *http.Request)
type GetFieldReports ¶
type GetFieldReports struct {
// contains filtered or unexported fields
}
func (GetFieldReports) ServeHTTP ¶
func (action GetFieldReports) ServeHTTP(w http.ResponseWriter, req *http.Request)
type GetIncident ¶
type GetIncident struct {
// contains filtered or unexported fields
}
func (GetIncident) ServeHTTP ¶
func (action GetIncident) ServeHTTP(w http.ResponseWriter, req *http.Request)
type GetIncidentAttachment ¶
type GetIncidentAttachment struct {
// contains filtered or unexported fields
}
func (GetIncidentAttachment) ServeHTTP ¶
func (action GetIncidentAttachment) ServeHTTP(w http.ResponseWriter, req *http.Request)
type GetIncidentTypes ¶
type GetIncidentTypes struct {
// contains filtered or unexported fields
}
func (GetIncidentTypes) ServeHTTP ¶
func (action GetIncidentTypes) ServeHTTP(w http.ResponseWriter, req *http.Request)
type GetIncidents ¶
type GetIncidents struct {
// contains filtered or unexported fields
}
func (GetIncidents) ServeHTTP ¶
func (action GetIncidents) ServeHTTP(w http.ResponseWriter, req *http.Request)
type GetPersonnel ¶
type GetPersonnel struct {
// contains filtered or unexported fields
}
func (GetPersonnel) ServeHTTP ¶
func (action GetPersonnel) ServeHTTP(w http.ResponseWriter, req *http.Request)
type GetPersonnelResponse ¶
type GetRuntimeMetrics ¶
type GetRuntimeMetrics struct {
// contains filtered or unexported fields
}
func (GetRuntimeMetrics) ServeHTTP ¶
func (action GetRuntimeMetrics) ServeHTTP(w http.ResponseWriter, req *http.Request)
type GetStayAttachment ¶
type GetStayAttachment struct {
// contains filtered or unexported fields
}
func (GetStayAttachment) ServeHTTP ¶
func (action GetStayAttachment) ServeHTTP(w http.ResponseWriter, req *http.Request)
type GetStreets ¶
type GetStreets struct {
// contains filtered or unexported fields
}
func (GetStreets) ServeHTTP ¶
func (action GetStreets) ServeHTTP(w http.ResponseWriter, req *http.Request)
type IMSEvent ¶
type IMSEvent struct {
EventID int64
EventData IMSEventData
}
type IMSEventData ¶
type IMSEventData struct {
EventID int32 `json:"event_id,omitzero"`
Comment string `json:"comment,omitzero"`
IncidentNumber int32 `json:"incident_number,omitzero"`
FieldReportNumber int32 `json:"field_report_number,omitzero"`
StayNumber int32 `json:"stay_number,omitzero"`
InitialEvent bool `json:"initial_event,omitzero"`
}
type JWTContext ¶
type NewFieldReport ¶
type NewFieldReport struct {
// contains filtered or unexported fields
}
func (NewFieldReport) ServeHTTP ¶
func (action NewFieldReport) ServeHTTP(w http.ResponseWriter, req *http.Request)
type NewIncident ¶
type NewIncident struct {
// contains filtered or unexported fields
}
func (NewIncident) ServeHTTP ¶
func (action NewIncident) ServeHTTP(w http.ResponseWriter, req *http.Request)
type PostAuthRequest ¶
type PostAuthResponse ¶
type PostEventAccess ¶
type PostEventAccess struct {
// contains filtered or unexported fields
}
func (PostEventAccess) ServeHTTP ¶
func (action PostEventAccess) ServeHTTP(w http.ResponseWriter, req *http.Request)
type RefreshAccessToken ¶
type RefreshAccessToken struct {
// contains filtered or unexported fields
}
func (RefreshAccessToken) ServeHTTP ¶
func (action RefreshAccessToken) ServeHTTP(w http.ResponseWriter, req *http.Request)
type UpdateDestinations ¶
type UpdateDestinations struct {
// contains filtered or unexported fields
}
func (UpdateDestinations) ServeHTTP ¶
func (action UpdateDestinations) ServeHTTP(w http.ResponseWriter, req *http.Request)
Click to show internal directories.
Click to hide internal directories.