Documentation
¶
Index ¶
- func HTMLError(w http.ResponseWriter, err error, code int)
- func JSONError(w http.ResponseWriter, err error, code int)
- func LogError(err error, code int)
- func Register(store storages.Store, router *mux.Router, userInfo *url.Userinfo, ...) error
- func RegisterWithHtmlTemplater(store storages.Store, router *mux.Router, userInfo *url.Userinfo, ...) error
- func SetLocationContext(req *http.Request, location *time.Location)
- type ComponentStateData
- type HtmlTemplater
- type HttpError
- type IndexData
- type JsonComponent
- type JsonGroup
- type JsonIncident
- type JsonMessage
- type JsonResponse
- type LocationContextType
- type LocationHandler
- type MinifyMiddleware
- type Serve
- func (a *Serve) AddMessage(w http.ResponseWriter, req *http.Request)
- func (a *Serve) AdminAddEditIncident(w http.ResponseWriter, req *http.Request)
- func (a *Serve) AdminAddEditIncidentByType(w http.ResponseWriter, req *http.Request, typ string)
- func (a *Serve) AdminAddEditMaintenance(w http.ResponseWriter, req *http.Request)
- func (a *Serve) AdminIncidents(w http.ResponseWriter, req *http.Request)
- func (a *Serve) AdminInfo(w http.ResponseWriter, req *http.Request)
- func (a *Serve) AdminMaintenance(w http.ResponseWriter, req *http.Request)
- func (a *Serve) AdminPersistentIncidents(w http.ResponseWriter, req *http.Request)
- func (a *Serve) Atom(w http.ResponseWriter, req *http.Request)
- func (a *Serve) BaseInfo() config.BaseInfo
- func (a *Serve) BaseURL() string
- func (a *Serve) ByDate(w http.ResponseWriter, req *http.Request)
- func (a *Serve) CreateIncident(w http.ResponseWriter, req *http.Request)
- func (a *Serve) Delete(w http.ResponseWriter, req *http.Request)
- func (a *Serve) DeleteMessage(w http.ResponseWriter, req *http.Request)
- func (a *Serve) HealthCheck(w http.ResponseWriter, req *http.Request)
- func (a *Serve) History(w http.ResponseWriter, req *http.Request)
- func (a *Serve) Ical(w http.ResponseWriter, req *http.Request)
- func (a *Serve) Incident(w http.ResponseWriter, req *http.Request)
- func (a *Serve) Index(w http.ResponseWriter, req *http.Request)
- func (a *Serve) IsDefaultLocation(req *http.Request) bool
- func (a *Serve) ListSubscribers(w http.ResponseWriter, req *http.Request)
- func (a *Serve) Location(req *http.Request) *time.Location
- func (a *Serve) Notify(w http.ResponseWriter, req *http.Request)
- func (a *Serve) Persistents(w http.ResponseWriter, req *http.Request)
- func (a *Serve) ReadMessage(w http.ResponseWriter, req *http.Request)
- func (a *Serve) ReadMessages(w http.ResponseWriter, req *http.Request)
- func (a *Serve) Rss(w http.ResponseWriter, req *http.Request)
- func (a *Serve) ShowComponents(w http.ResponseWriter, req *http.Request)
- func (a *Serve) ShowFlagComponentStates(w http.ResponseWriter, req *http.Request)
- func (a *Serve) ShowFlagIncidentStates(w http.ResponseWriter, req *http.Request)
- func (a *Serve) ShowIncident(w http.ResponseWriter, req *http.Request)
- func (a *Serve) Statuses(w http.ResponseWriter, req *http.Request)
- func (a *Serve) SubscribeEmail(w http.ResponseWriter, req *http.Request)
- func (a *Serve) UnsubscribeEmail(w http.ResponseWriter, req *http.Request)
- func (a *Serve) Update(w http.ResponseWriter, req *http.Request)
- func (a *Serve) UpdateMessage(w http.ResponseWriter, req *http.Request)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ComponentStateData ¶
type ComponentStateData struct {
Name string
Description string
State models.ComponentState
}
type HtmlTemplater ¶
type HttpError ¶
type IndexData ¶
type IndexData struct {
GroupComponentState map[string]models.ComponentState
ComponentStatesData map[string][]*ComponentStateData
Timeline map[string][]models.Incident
PersistentIncidents []models.Incident
TimelineDates []string
Scheduled []models.Incident
BaseInfo config.BaseInfo
Timezone string
Theme config.Theme
}
func (*IndexData) ToJsonData ¶ added in v1.160.0
func (i *IndexData) ToJsonData() interface{}
type JsonComponent ¶ added in v1.160.0
type JsonGroup ¶ added in v1.160.0
type JsonGroup struct {
Name string `json:"name"`
Components []JsonComponent `json:"components"`
State string `json:"state"`
}
type JsonIncident ¶ added in v1.160.0
type JsonIncident struct {
GUID string `json:"guid"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
State string `json:"state"`
ComponentState string `json:"component_state"`
Components []string `json:"components"`
Messages []JsonMessage `json:"messages"`
Metadata interface{} `json:"metadata"`
IsScheduled bool `json:"is_scheduled"`
Persistent bool `json:"persistent"`
}
type JsonMessage ¶ added in v1.160.0
type JsonResponse ¶ added in v1.160.0
type JsonResponse struct {
Groups []JsonGroup `json:"groups"`
PersistentIncidents []JsonIncident `json:"persistent_incidents"`
Incidents []JsonIncident `json:"incidents"`
ScheduledIncidents []JsonIncident `json:"scheduled"`
TimeZone string `json:"timezone"`
}
type LocationContextType ¶
type LocationContextType int
const (
LocationContextKey LocationContextType = iota
)
type LocationHandler ¶
type LocationHandler struct {
// contains filtered or unexported fields
}
func NewLocationHandler ¶
func NewLocationHandler(sessKey string) *LocationHandler
type MinifyMiddleware ¶
type MinifyMiddleware struct {
// contains filtered or unexported fields
}
func NewMinifyMiddleware ¶
func NewMinifyMiddleware(next http.Handler) *MinifyMiddleware
func (*MinifyMiddleware) ServeHTTP ¶
func (m *MinifyMiddleware) ServeHTTP(w http.ResponseWriter, req *http.Request)
type Serve ¶
type Serve struct {
// contains filtered or unexported fields
}
func (*Serve) AddMessage ¶
func (a *Serve) AddMessage(w http.ResponseWriter, req *http.Request)
func (*Serve) AdminAddEditIncident ¶
func (a *Serve) AdminAddEditIncident(w http.ResponseWriter, req *http.Request)
func (*Serve) AdminAddEditIncidentByType ¶
func (*Serve) AdminAddEditMaintenance ¶
func (a *Serve) AdminAddEditMaintenance(w http.ResponseWriter, req *http.Request)
func (*Serve) AdminIncidents ¶
func (a *Serve) AdminIncidents(w http.ResponseWriter, req *http.Request)
func (*Serve) AdminInfo ¶ added in v1.6.1
func (a *Serve) AdminInfo(w http.ResponseWriter, req *http.Request)
func (*Serve) AdminMaintenance ¶
func (a *Serve) AdminMaintenance(w http.ResponseWriter, req *http.Request)
func (*Serve) AdminPersistentIncidents ¶ added in v1.6.1
func (a *Serve) AdminPersistentIncidents(w http.ResponseWriter, req *http.Request)
func (*Serve) CreateIncident ¶
func (a *Serve) CreateIncident(w http.ResponseWriter, req *http.Request)
func (*Serve) DeleteMessage ¶
func (a *Serve) DeleteMessage(w http.ResponseWriter, req *http.Request)
func (*Serve) HealthCheck ¶ added in v1.97.4
func (a *Serve) HealthCheck(w http.ResponseWriter, req *http.Request)
func (*Serve) ListSubscribers ¶ added in v1.6.2
func (a *Serve) ListSubscribers(w http.ResponseWriter, req *http.Request)
func (*Serve) Notify ¶ added in v1.2.0
func (a *Serve) Notify(w http.ResponseWriter, req *http.Request)
func (*Serve) Persistents ¶ added in v1.6.1
func (a *Serve) Persistents(w http.ResponseWriter, req *http.Request)
func (*Serve) ReadMessage ¶
func (a *Serve) ReadMessage(w http.ResponseWriter, req *http.Request)
func (*Serve) ReadMessages ¶
func (a *Serve) ReadMessages(w http.ResponseWriter, req *http.Request)
func (*Serve) ShowComponents ¶
func (a *Serve) ShowComponents(w http.ResponseWriter, req *http.Request)
func (*Serve) ShowFlagComponentStates ¶
func (a *Serve) ShowFlagComponentStates(w http.ResponseWriter, req *http.Request)
func (*Serve) ShowFlagIncidentStates ¶
func (a *Serve) ShowFlagIncidentStates(w http.ResponseWriter, req *http.Request)
func (*Serve) ShowIncident ¶
func (a *Serve) ShowIncident(w http.ResponseWriter, req *http.Request)
func (*Serve) Statuses ¶ added in v1.160.0
func (a *Serve) Statuses(w http.ResponseWriter, req *http.Request)
func (*Serve) SubscribeEmail ¶
func (a *Serve) SubscribeEmail(w http.ResponseWriter, req *http.Request)
func (*Serve) UnsubscribeEmail ¶
func (a *Serve) UnsubscribeEmail(w http.ResponseWriter, req *http.Request)
func (*Serve) UpdateMessage ¶
func (a *Serve) UpdateMessage(w http.ResponseWriter, req *http.Request)
Source Files
¶
Click to show internal directories.
Click to hide internal directories.