serves

package
v1.114.2 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2024 License: Apache-2.0 Imports: 41 Imported by: 0

Documentation

Overview

You can use the "packr clean" command to clean up this, and any other packr generated files.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HTMLError

func HTMLError(w http.ResponseWriter, err error, code int)

func JSONError

func JSONError(w http.ResponseWriter, err error, code int)

func LogError

func LogError(err error, code int)

func Register

func Register(
	store storages.Store,
	router *mux.Router,
	userInfo *url.Userinfo,
	config config.Config,
) error

func RegisterWithHtmlTemplater

func RegisterWithHtmlTemplater(
	store storages.Store,
	router *mux.Router,
	userInfo *url.Userinfo,
	htmlTemplater HtmlTemplater,
	config config.Config,
) error

func SetLocationContext

func SetLocationContext(req *http.Request, location *time.Location)

Types

type ComponentStateData

type ComponentStateData struct {
	Name        string
	Description string
	State       models.ComponentState
}

type HtmlTemplater

type HtmlTemplater interface {
	ExecuteTemplate(wr io.Writer, name string, data interface{}) error
}

type HttpError

type HttpError struct {
	Description string `json:"description"`
	Detail      string `json:"detail"`
	Status      int    `json:"status"`
}

func (HttpError) Error

func (he HttpError) Error() string

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
}

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

func (LocationHandler) Handler

func (s LocationHandler) Handler(next http.Handler) http.Handler

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 (a Serve) AdminAddEditIncidentByType(w http.ResponseWriter, req *http.Request, typ string)

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) Atom

func (a Serve) Atom(w http.ResponseWriter, req *http.Request)

func (Serve) BaseInfo added in v1.6.1

func (a Serve) BaseInfo() config.BaseInfo

func (Serve) BaseURL added in v1.6.1

func (a Serve) BaseURL() string

func (Serve) ByDate

func (a Serve) ByDate(w http.ResponseWriter, req *http.Request)

func (Serve) CreateIncident

func (a Serve) CreateIncident(w http.ResponseWriter, req *http.Request)

func (Serve) Delete

func (a Serve) Delete(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) History

func (a Serve) History(w http.ResponseWriter, req *http.Request)

func (Serve) Ical

func (a Serve) Ical(w http.ResponseWriter, req *http.Request)

func (Serve) Incident

func (a Serve) Incident(w http.ResponseWriter, req *http.Request)

func (Serve) Index

func (a Serve) Index(w http.ResponseWriter, req *http.Request)

func (Serve) IsDefaultLocation

func (a Serve) IsDefaultLocation(req *http.Request) bool

func (Serve) ListSubscribers added in v1.6.2

func (a Serve) ListSubscribers(w http.ResponseWriter, req *http.Request)

func (Serve) Location

func (a Serve) Location(req *http.Request) *time.Location

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) Rss

func (a Serve) Rss(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) 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) Update

func (a Serve) Update(w http.ResponseWriter, req *http.Request)

func (Serve) UpdateMessage

func (a Serve) UpdateMessage(w http.ResponseWriter, req *http.Request)

Directories

Path Synopsis
Code generated by counterfeiter.
Code generated by counterfeiter.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL