http

package
v0.2.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 8, 2020 License: Apache-2.0 Imports: 29 Imported by: 0

Documentation

Overview

Package http implements http server for previewer.

Index

Constants

View Source
const (
	ReqIDField    = "request_id"
	HostField     = "host"
	MethodField   = "method"
	URLField      = "url"
	BrowserField  = "browser"
	RemoteField   = "remote"
	QueryField    = "query"
	CodeField     = "response_code"
	RespTimeField = "response_time"
	HashField     = "hash"
)

Constants.

Variables

This section is empty.

Functions

func StartHTTPServer

func StartHTTPServer(logger models.Loggerer, conf models.Config,
	preview preview.Preview, opts entities.ResizeOptions)

StartHTTPServer inits routing and starts web listener.

Types

type ClientError

type ClientError struct {
	Error `json:"error"`
}

ClientError model.

type Error

type Error struct {
	ErrCode        int    `json:"code"`
	ErrText        string `json:"text,omitempty"`
	ErrDescription string `json:"description"`
	// contains filtered or unexported fields
}

Error model.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL