httpv

package
v0.0.0-...-035b4ae Latest Latest
Warning

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

Go to latest
Published: May 9, 2020 License: MIT Imports: 38 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GinRefreshPage

func GinRefreshPage(refreshInterval int)

func QRecovery

func QRecovery(f func(c *gin.Context, err interface{})) gin.HandlerFunc

func QRecoveryWithWriter

func QRecoveryWithWriter(f func(c *gin.Context, err interface{})) gin.HandlerFunc

Types

type CustomHTMLRenderer

type CustomHTMLRenderer struct {
	Name string
	Data interface{}
}

func (*CustomHTMLRenderer) Instance

func (r *CustomHTMLRenderer) Instance(name string, data interface{}) render.Render

func (*CustomHTMLRenderer) Render

func (*CustomHTMLRenderer) WriteContentType

func (r *CustomHTMLRenderer) WriteContentType(w http.ResponseWriter)

type HtmlInfo

type HtmlInfo struct {
	Name       string
	Path       string
	Content    []byte
	ModifyTime int64
}

type HttpAgent

type HttpAgent struct {
	Name string

	Output io.Writer
	// contains filtered or unexported fields
}

func (*HttpAgent) Get

func (o *HttpAgent) Get(opts []map[string]interface{}, nicemilli int, newsession int, concurrent int, loglevel int) ([]map[string]interface{}, error)

func (*HttpAgent) GetDriverConcurrent

func (o *HttpAgent) GetDriverConcurrent(opts []map[string]interface{}, nicemilli int, newsession int, concurrent int, loglevel int) ([]map[string]interface{}, error)

func (*HttpAgent) GetMany

func (o *HttpAgent) GetMany(driver selenium.WebDriver, opts []map[string]interface{}, nicemilli int, newsession int, loglevel int) ([]map[string]interface{}, error)

func (*HttpAgent) GetOne

func (o *HttpAgent) GetOne(driver selenium.WebDriver, opt map[string]interface{}, newsession bool, loglevel int) (map[string]interface{}, error)

func (*HttpAgent) GetSimpleConcurrent

func (o *HttpAgent) GetSimpleConcurrent(opts []map[string]interface{}, nicemilli int, newsession int, concurrent int, loglevel int) ([]map[string]interface{}, error)

func (*HttpAgent) InitDriver

func (o *HttpAgent) InitDriver() (driver selenium.WebDriver, err error)

func (*HttpAgent) InitDrivers

func (o *HttpAgent) InitDrivers(count int) (drivers []selenium.WebDriver, err error)

func (*HttpAgent) InitParameters

func (o *HttpAgent) InitParameters(config map[string]interface{})

func (*HttpAgent) InitService

func (o *HttpAgent) InitService() ([]*selenium.Service, error)

func (*HttpAgent) IsBasicHttp

func (o *HttpAgent) IsBasicHttp() bool

func (*HttpAgent) ReleaseDrivers

func (o *HttpAgent) ReleaseDrivers(drivers []selenium.WebDriver)

func (*HttpAgent) StopService

func (o *HttpAgent) StopService()

func (*HttpAgent) Terminate

func (o *HttpAgent) Terminate() error

type HttpServer

type HttpServer struct {
	Root    string
	Rootabs string
	// contains filtered or unexported fields
}

func GetInstance

func GetInstance() *HttpServer

func (*HttpServer) GetData

func (o *HttpServer) GetData(key string) interface{}

func (*HttpServer) ReqParse

func (o *HttpServer) ReqParse(c *gin.Context) (map[string]interface{}, error)

func (*HttpServer) ResolvePath

func (o *HttpServer) ResolvePath(path string, category string) (string, error)

func (*HttpServer) RespJson

func (o *HttpServer) RespJson(code int, data interface{}, c *gin.Context)

func (*HttpServer) RespJsonEx

func (o *HttpServer) RespJsonEx(data interface{}, err error, c *gin.Context)

func (*HttpServer) Run

func (o *HttpServer) Run() error

func (*HttpServer) SetData

func (o *HttpServer) SetData(key string, val interface{})

func (*HttpServer) Terminate

func (o *HttpServer) Terminate() error

Jump to

Keyboard shortcuts

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