Versions in this module Expand all Collapse all v1 v1.0.5 Dec 24, 2020 v1.0.4 Dec 24, 2020 v1.0.3 Dec 24, 2020 v1.0.2 Dec 22, 2020 v1.0.1 Dec 22, 2020 v1.0.0 Dec 21, 2020 v0 v0.0.3 Dec 21, 2020 v0.0.2 Dec 21, 2020 Changes in this version + const EventError + const EventInitSSL + const EventResponse + const MB + const MaxLevel + const PluginName + const UploadErrorCantWrite + const UploadErrorExtension + const UploadErrorNoFile + const UploadErrorNoTmpDir + const UploadErrorOK + var TrailerHeaderKey = http.CanonicalHeaderKey("trailer") + func FetchIndexes(s string) []string + type Cidrs []*net.IPNet + func ParseCIDRs(subnets []string) (Cidrs, error) + func (c *Cidrs) IsTrusted(ip string) bool + type Config struct + Address string + Env map[string]string + FCGI *FCGIConfig + HTTP2 *HTTP2Config + MaxRequestSize uint64 + Middleware []string + Pool *poolImpl.Config + SSL *SSLConfig + TrustedSubnets []string + Uploads *UploadsConfig + func (c *Config) EnableFCGI() bool + func (c *Config) EnableH2C() bool + func (c *Config) EnableHTTP() bool + func (c *Config) EnableHTTP2() bool + func (c *Config) EnableTLS() bool + func (c *Config) InitDefaults() error + func (c *Config) IsTrusted(ip string) bool + func (c *Config) Valid() error + type ErrorEvent struct + Error error + Request *http.Request + func (e *ErrorEvent) Elapsed() time.Duration + type FCGIConfig struct + Address string + type FileUpload struct + Error int + Mime string + Name string + Size int64 + TempFilename string + func NewUpload(f *multipart.FileHeader) *FileUpload + func (f *FileUpload) Open(cfg UploadsConfig) (err error) + type HTTP2Config struct + Enabled bool + H2C bool + MaxConcurrentStreams uint32 + func (cfg *HTTP2Config) InitDefaults() error + type Handle interface + AddListener func(l events.EventListener) + ServeHTTP func(w http.ResponseWriter, r *http.Request) + func NewHandler(maxReqSize uint64, uploads UploadsConfig, trusted Cidrs, pool pool.Pool) (Handle, error) + type Middleware interface + Middleware func(f http.Handler) http.HandlerFunc + type Plugin struct + func (s *Plugin) AddListener(listener events.EventListener) + func (s *Plugin) AddMiddleware(name endure.Named, m Middleware) + func (s *Plugin) Collects() []interface{} + func (s *Plugin) Init(cfg config.Configurer, log logger.Logger, server server.Server) error + func (s *Plugin) Name() string + func (s *Plugin) Reset() error + func (s *Plugin) Serve() chan error + func (s *Plugin) ServeHTTP(w http.ResponseWriter, r *http.Request) + func (s *Plugin) Status() checker.Status + func (s *Plugin) Stop() error + func (s *Plugin) Workers() []worker.BaseProcess + type Request struct + Attributes map[string]interface{} + Cookies map[string]string + Header http.Header + Method string + Parsed bool + Protocol string + RawQuery string + RemoteAddr string + URI string + Uploads *Uploads + func NewRequest(r *http.Request, cfg UploadsConfig) (*Request, error) + func (r *Request) Close(log logger.Logger) + func (r *Request) Open(log logger.Logger) + func (r *Request) Payload() (payload.Payload, error) + type Response struct + Body interface{} + Headers map[string][]string + Status int + func NewResponse(p payload.Payload) (*Response, error) + func (r *Response) Write(w http.ResponseWriter) error + type ResponseEvent struct + Request *Request + Response *Response + func (e *ResponseEvent) Elapsed() time.Duration + type SSLConfig struct + Cert string + Key string + Port int + Redirect bool + RootCA string + type Uploads struct + func (u *Uploads) Clear(log logger.Logger) + func (u *Uploads) MarshalJSON() ([]byte, error) + func (u *Uploads) Open(log logger.Logger) + type UploadsConfig struct + Dir string + Forbid []string + func (cfg *UploadsConfig) Forbids(filename string) bool + func (cfg *UploadsConfig) InitDefaults() error + func (cfg *UploadsConfig) TmpDir() string Other modules containing this package github.com/spiral/roadrunner-plugins/v2