Documentation ¶
Index ¶
- Variables
- func Fetch(opts *ServerOpts) func(http.ResponseWriter, *http.Request)
- func Middleware(handler func(w http.ResponseWriter, r *http.Request), opts *ServerOpts) http.HandlerFunc
- func RobotsTXT(w http.ResponseWriter, r *http.Request)
- func Serve(opts *ServerOpts)
- func Up(w http.ResponseWriter, r *http.Request)
- type Mux
- type ServerOpts
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // SpecificThrotling is semaphore per domain SpecificThrotling map[string]chan struct{} // GlobalThrotling is global semaphore GlobalThrotling chan struct{} )
Functions ¶
func Fetch ¶
func Fetch(opts *ServerOpts) func(http.ResponseWriter, *http.Request)
Fetch takes url + params in url to download image from url and apply filters
func Middleware ¶
func Middleware(handler func(w http.ResponseWriter, r *http.Request), opts *ServerOpts) http.HandlerFunc
Middleware composes all middlewares
Types ¶
type Mux ¶
type Mux struct {
Routes map[string]func(http.ResponseWriter, *http.Request)
}
Mux is the custom Router needed in order to avoid URL cleaning
type ServerOpts ¶
type ServerOpts struct { MaxRequest int MaxRequestPerDomain int Port string Domain string SSLDir string CDNTTL string AllowedReferers []string StorageDriver storage.Driver FSBase string GCEProject string GSBucket string GSCredencials string }
ServerOpts contains confif for Application
Click to show internal directories.
Click to hide internal directories.