Documentation ¶
Index ¶
Constants ¶
View Source
const ( DefOutput = "raw" DefFormat = "jpg" DefQuality = 85 DefDelay = 0 DefWidth = 1600 DefHeight = 1200 DefZoom = 1.0 DefFull = false )
Default and maximum values
View Source
const ( Name = "url2img" Version = "1.4" )
Variables ¶
This section is empty.
Functions ¶
func NewResponseWriter ¶
func NewResponseWriter(w http.ResponseWriter) *responseWriter
NewResponseWriter returns new responseWriter
Types ¶
type Loader ¶
type Loader struct { *Object *widgets.QWidget Map sync.Map // contains filtered or unexported fields }
Loader represents image loader
type Params ¶
type Params struct { Id string `json:"id"` Url string `json:"url"` Output string `json:"output"` Format string `json:"format"` UA string `json:"ua"` Quality int `json:"quality"` Delay int `json:"delay"` Width int `json:"width"` Height int `json:"height"` Zoom float64 `json:"zoom"` Full bool `json:"full"` }
Params represent parameters
func (*Params) BodyValues ¶
BodyValues gets params values from json body
func (*Params) FormValues ¶
FormValues gets params values from form
type Server ¶
type Server struct { Bind string Auth *auth.BasicAuth LogFile *os.File LogFilePath string CacheDir string Htpasswd string MaxAge int ReadTimeout int WriteTimeout int Loader *Loader }
Server represents HTTP server
func (*Server) ListenAndServe ¶
func (s *Server) ListenAndServe()
ListenAndServe listens on the TCP address and serves requests
Click to show internal directories.
Click to hide internal directories.