mock

package
v2.0.4 Latest Latest
Warning

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

Go to latest
Published: May 27, 2020 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateMockAPI

func CreateMockAPI(developmentMode bool) (models.GoQueryAPI, error)

CreateMockAPI creates and returns an api implementation that implements the models.GoQueryAPI interface can easily be parameterized with flags passed from main via the config.json

Types

type MockAPI

type MockAPI struct {
	Token           string
	CookieJar       *cookiejar.Jar
	Client          *http.Client
	Authed          bool
	DevelopmentMode bool
}

func (*MockAPI) CheckHost

func (instance *MockAPI) CheckHost(uuid string) (hosts.Host, error)

func (*MockAPI) FetchResults

func (instance *MockAPI) FetchResults(queryName string) ([]map[string]string, string, error)

func (*MockAPI) ScheduleQuery

func (instance *MockAPI) ScheduleQuery(uuid string, query string) (string, error)

Jump to

Keyboard shortcuts

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