cmd

package
v0.0.0-...-6a70844 Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2018 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrWrongHTMLFormat wrong html format
	ErrWrongHTMLFormat = errors.New("wrong html format")
	// ErrParserNotSupported parser not supported
	ErrParserNotSupported = errors.New("parser not supported")
)

Functions

func Execute

func Execute()

Execute adds all child commands to the root command and sets flags appropriately. This is called by main.main(). It only needs to happen once to the rootCmd.

Types

type HTMLServer

type HTMLServer struct {
}

HTMLServer is basic implement of Server interface It receive html from web extension

func (*HTMLServer) Handler

func (s *HTMLServer) Handler(writer http.ResponseWriter, request *http.Request)

Handler is the handler function of server

type JSONServer

type JSONServer struct {
}

JSONServer is basic implement of Server interface It receive json from web extension

func (*JSONServer) Handler

func (s *JSONServer) Handler(writer http.ResponseWriter, request *http.Request)

Handler is the handler function of server

type Server

type Server interface {
	Handler(http.ResponseWriter, *http.Request)
}

Server interface

Jump to

Keyboard shortcuts

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