Documentation ¶
Index ¶
- Variables
- func AdminOnly(fn func(App, http.ResponseWriter, *http.Request)) func(ctx App, res http.ResponseWriter, req *http.Request)
- func ApiHeaders(fn func(App, http.ResponseWriter, *http.Request)) func(ctx App, res http.ResponseWriter, req *http.Request)
- func BodyParser(fn func(App, http.ResponseWriter, *http.Request)) func(ctx App, res http.ResponseWriter, req *http.Request)
- func CanManageShare(fn func(App, http.ResponseWriter, *http.Request)) func(ctx App, res http.ResponseWriter, req *http.Request)
- func Chain(fn func(App, http.ResponseWriter, *http.Request), m []Middleware, app App) http.HandlerFunc
- func GetGlobalSession() map[string]string
- func IndexHeaders(fn func(App, http.ResponseWriter, *http.Request)) func(ctx App, res http.ResponseWriter, req *http.Request)
- func LoggedInOnly(fn func(App, http.ResponseWriter, *http.Request)) func(ctx App, res http.ResponseWriter, req *http.Request)
- func Logger(ctx App, res http.ResponseWriter, req *http.Request)
- func RedirectSharedLoginIfNeeded(fn func(App, http.ResponseWriter, *http.Request)) func(ctx App, res http.ResponseWriter, req *http.Request)
- func SecureAjax(fn func(App, http.ResponseWriter, *http.Request)) func(ctx App, res http.ResponseWriter, req *http.Request)
- func SecureHeaders(fn func(App, http.ResponseWriter, *http.Request)) func(ctx App, res http.ResponseWriter, req *http.Request)
- func SessionStart(fn func(App, http.ResponseWriter, *http.Request)) func(ctx App, res http.ResponseWriter, req *http.Request)
- func SessionTry(fn func(App, http.ResponseWriter, *http.Request)) func(ctx App, res http.ResponseWriter, req *http.Request)
- func SetGlobalSession(s map[string]string)
- func StaticHeaders(fn func(App, http.ResponseWriter, *http.Request)) func(ctx App, res http.ResponseWriter, req *http.Request)
- type LogEntry
- type Middleware
- type ResponseWriter
- type SftpConfig
- type Telemetry
Constants ¶
This section is empty.
Variables ¶
View Source
var GlobalSession map[string]string
View Source
var GlobalSessionLock sync.Mutex
Functions ¶
func AdminOnly ¶
func AdminOnly(fn func(App, http.ResponseWriter, *http.Request)) func(ctx App, res http.ResponseWriter, req *http.Request)
func ApiHeaders ¶
func ApiHeaders(fn func(App, http.ResponseWriter, *http.Request)) func(ctx App, res http.ResponseWriter, req *http.Request)
func BodyParser ¶
func BodyParser(fn func(App, http.ResponseWriter, *http.Request)) func(ctx App, res http.ResponseWriter, req *http.Request)
func CanManageShare ¶
func CanManageShare(fn func(App, http.ResponseWriter, *http.Request)) func(ctx App, res http.ResponseWriter, req *http.Request)
func Chain ¶
func Chain(fn func(App, http.ResponseWriter, *http.Request), m []Middleware, app App) http.HandlerFunc
func GetGlobalSession ¶
func IndexHeaders ¶
func IndexHeaders(fn func(App, http.ResponseWriter, *http.Request)) func(ctx App, res http.ResponseWriter, req *http.Request)
func LoggedInOnly ¶
func LoggedInOnly(fn func(App, http.ResponseWriter, *http.Request)) func(ctx App, res http.ResponseWriter, req *http.Request)
func RedirectSharedLoginIfNeeded ¶
func RedirectSharedLoginIfNeeded(fn func(App, http.ResponseWriter, *http.Request)) func(ctx App, res http.ResponseWriter, req *http.Request)
func SecureAjax ¶
func SecureAjax(fn func(App, http.ResponseWriter, *http.Request)) func(ctx App, res http.ResponseWriter, req *http.Request)
func SecureHeaders ¶
func SecureHeaders(fn func(App, http.ResponseWriter, *http.Request)) func(ctx App, res http.ResponseWriter, req *http.Request)
func SessionStart ¶
func SessionStart(fn func(App, http.ResponseWriter, *http.Request)) func(ctx App, res http.ResponseWriter, req *http.Request)
func SessionTry ¶
func SessionTry(fn func(App, http.ResponseWriter, *http.Request)) func(ctx App, res http.ResponseWriter, req *http.Request)
func SetGlobalSession ¶
func StaticHeaders ¶
func StaticHeaders(fn func(App, http.ResponseWriter, *http.Request)) func(ctx App, res http.ResponseWriter, req *http.Request)
Types ¶
type LogEntry ¶
type LogEntry struct { Host string `json:"host"` Method string `json:"method"` RequestURI string `json:"pathname"` Proto string `json:"proto"` Status int `json:"status"` Scheme string `json:"scheme"` UserAgent string `json:"userAgent"` Ip string `json:"ip"` Referer string `json:"referer"` Duration float64 `json:"responseTime"` Version string `json:"version"` Backend string `json:"backend"` }
type Middleware ¶
type Middleware func(func(App, http.ResponseWriter, *http.Request)) func(App, http.ResponseWriter, *http.Request)
type ResponseWriter ¶
type ResponseWriter struct { http.ResponseWriter // contains filtered or unexported fields }
func NewResponseWriter ¶
func NewResponseWriter(res http.ResponseWriter) ResponseWriter
func (*ResponseWriter) WriteHeader ¶
func (w *ResponseWriter) WriteHeader(status int)
type SftpConfig ¶
type SftpConfig struct { Hostname string `json:"hostname"` Username string `json:"username"` Password string `json:"password"` Timestamp time.Time `json:"timestamp"` Type string `json:"type"` }
func (SftpConfig) SetSession ¶
func (s SftpConfig) SetSession()
Click to show internal directories.
Click to hide internal directories.