Documentation ¶
Index ¶
- func BrowseHandler(w http.ResponseWriter, r *http.Request)
- func DataList() (dataList []string)
- func FetcherHandler(w http.ResponseWriter, r *http.Request)
- func Handler(w http.ResponseWriter, r *http.Request)
- func LogAndAddCacheControl(h http.Handler) http.Handler
- func LogAndFilterDataRequest(h http.Handler) http.Handler
- func LogRequest(r *http.Request, msg string)
- func RedirectToHTTPS(port int)
- func RedirectToHTTPSHandler(w http.ResponseWriter, r *http.Request)
- func Report(port int, staticRsrcDir string, datadir string)
- func ResultToJsData(w io.Writer, json []byte)
- func SaveJSON(name string, json []byte) string
- func Serve(port int, debugpath, uipath, staticRsrcDir string, datadir string)
- func Sync(out io.Writer, u string) bool
- func SyncHandler(w http.ResponseWriter, r *http.Request)
- type HTMLEscapeWriter
- type ListBucketResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BrowseHandler ¶ added in v0.4.2
func BrowseHandler(w http.ResponseWriter, r *http.Request)
BrowseHandler handles listing and rendering the JSON results.
func DataList ¶ added in v0.6.0
func DataList() (dataList []string)
DataList returns the .json files/entries in data dir.
func FetcherHandler ¶
func FetcherHandler(w http.ResponseWriter, r *http.Request)
FetcherHandler is the handler for the fetcher/proxy.
func Handler ¶
func Handler(w http.ResponseWriter, r *http.Request)
Handler is the main UI handler creating the web forms and processing them.
func LogAndAddCacheControl ¶ added in v0.4.2
LogAndAddCacheControl logs the request and wrapps an HTTP handler to add a Cache-Control header for static files.
func LogAndFilterDataRequest ¶ added in v0.6.0
LogAndFilterDataRequest logs the data request.
func LogRequest ¶
LogRequest logs the incoming request, including headers when loglevel is verbose
func RedirectToHTTPS ¶ added in v0.6.1
func RedirectToHTTPS(port int)
RedirectToHTTPS Sets up a redirector to https on the given port. (Do not create a loop, make sure this is addressed from an ingress)
func RedirectToHTTPSHandler ¶ added in v0.6.1
func RedirectToHTTPSHandler(w http.ResponseWriter, r *http.Request)
RedirectToHTTPSHandler handler sends a redirect to same URL with https.
func Report ¶ added in v0.5.1
Report starts the browsing only UI server on the given port. Similar to Serve with only the read only part.
func ResultToJsData ¶ added in v0.4.2
ResultToJsData converts a result object to chart data arrays and title and creates a chart from the result object
func SaveJSON ¶ added in v0.4.2
SaveJSON save Json bytes to give file name (.json) in data-path dir.
func Serve ¶
Serve starts the fhttp.Serve() plus the UI server on the given port and paths (empty disables the feature). uiPath should end with / (be a 'directory' path)
func SyncHandler ¶ added in v0.6.4
func SyncHandler(w http.ResponseWriter, r *http.Request)
SyncHandler handles syncing/downloading from tsv url.
Types ¶
type HTMLEscapeWriter ¶ added in v0.4.2
HTMLEscapeWriter is an io.Writer escaping the output for safe html inclusion.
type ListBucketResult ¶ added in v0.6.5
type ListBucketResult struct { NextMarker string `xml:"NextMarker"` Names []string `xml:"Contents>Key"` }
ListBucketResult is the minimum we need out of s3 xml results. https://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketGET.html e.g. https://storage.googleapis.com/fortio-data?max-keys=2&prefix=fortio.istio.io/