api

package
v0.0.0-...-9fd5d19 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2019 License: GPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type API

type API struct {
	Router *gin.Engine `json:"router"` // The HTTP router

	DB *bolt.DB `json:"db"` // The database

	CWD    *core.ChromeWebDriver `json:"cwd"` // The web driver / scraper
	Engine engine.Engine         // The scraping engine

	Root string `json:"root"` // API root route

	Logger *loggo.Logger `json:"logger"` // The logger

	Client *http.Client `json:"client"` // The HTTP client
}

API represents an API instance.

func NewAPI

func NewAPI() (*API, error)

NewAPI initializes a new API instance.

func (*API) StartServing

func (api *API) StartServing(port int64) error

StartServing starts serving the API.

Jump to

Keyboard shortcuts

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