Documentation ¶
Index ¶
- Constants
- func WithCSP(handler http.Handler, policy string) http.Handler
- type Server
- func (server *Server) Context(parent component.InstallationContext) component.InstallationContext
- func (control Server) Path() string
- func (server *Server) Server(ctx context.Context, progress io.Writer) (public http.Handler, internal http.Handler, err error)
- func (server *Server) Stack() component.StackWithResources
- func (server *Server) Trigger(ctx context.Context) error
Constants ¶
View Source
const ( CSRFCookie = "F" // CSRF cookie sent on a lot of requests CSRFCookieField = "@" // form field name __should not be used by anything else__ SessionCookie = "x" // name of the cookie to use ; to doubt SessionUserKey = "@" // key within the session data to hold the username )
CSRFCookie, CSRFCookieField, SessionCookie and SessionUserKey hold the names of the cookies and fields used for specific cookies.
These are intentionally kept short to conserve bandwidth.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Server ¶
type Server struct { component.Base Dependencies struct { Routeables []component.Routeable Cronables []component.Cronable Templating *templating.Templating } }
Server represents the running control server.
func (*Server) Context ¶
func (server *Server) Context(parent component.InstallationContext) component.InstallationContext
func (*Server) Server ¶
func (server *Server) Server(ctx context.Context, progress io.Writer) (public http.Handler, internal http.Handler, err error)
Server returns an http.Mux that implements the main server instance. The server may spawn background tasks, but these should be terminated once context closes.
Logging messages are directed to progress
func (*Server) Stack ¶
func (server *Server) Stack() component.StackWithResources
Click to show internal directories.
Click to hide internal directories.