Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Debug = false
View Source
var RestHttpClient = &http.Client{ Transport: &http.Transport{ Proxy: http.ProxyFromEnvironment, MaxIdleConns: 100, IdleConnTimeout: 90 * time.Second, TLSHandshakeTimeout: 10 * time.Second, ExpectContinueTimeout: 1 * time.Second, }, Timeout: 120 * time.Second, }
View Source
var ( SystemProxy = &httputil.ReverseProxy{ Director: systemProxyDirector, Transport: RestHttpClient.Transport, } )
Functions ¶
func RedirectError ¶
func RedirectErrorCode ¶
code can be one of http.StatusMovedPermanently or http.StatusFound or any 3xx http status code
func SendRedirect ¶
func SendRedirect(w http.ResponseWriter, url string, code int)
Types ¶
type RestResponse ¶
type RestResponse struct { Result string `json:"result"` // "success" or "error" (or "redirect") Data json.RawMessage `json:"data"` Error string `json:"error"` Paging interface{} `json:"paging"` Job interface{} `json:"job"` Time interface{} `json:"time"` Access interface{} `json:"access"` RedirectUrl string `json:"redirect_url"` RedirectCode int `json:"redirect_code"` }
Click to show internal directories.
Click to hide internal directories.