search

package
v0.0.0-...-4f8ce44 Latest Latest
Warning

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

Go to latest
Published: May 6, 2020 License: GPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Success ...
	Success = 0
	// UnknownFailure ...
	UnknownFailure = 1
	// UnexpectedOperation ...
	UnexpectedOperation = 2
)

Variables

This section is empty.

Functions

func Main

func Main()

Main ...

func WriteExampleConfig

func WriteExampleConfig(fileName string)

WriteExampleConfig ...

Types

type Config

type Config struct {
	Enabled bool          `json:"enabled" yaml:"enabled" xml:"enabled"`
	Mongo   *mongo.Config `json:"mongo" yaml:"mongo" xml:"mongo"`
	Port    int           `json:"port" yaml:"port" xml:"port"`
}

Config ...

func ExampleConfig

func ExampleConfig() *Config

ExampleConfig ...

func NewConfig

func NewConfig() *Config

NewConfig ...

func (*Config) AssertValid

func (c *Config) AssertValid()

AssertValid ...

func (*Config) String

func (c *Config) String() string

func (*Config) YamlString

func (c *Config) YamlString() string

YamlString ...

type Result

type Result struct {
	Status int           `json:"status,omitempty"`
	Error  string        `json:"error,omitempty"`
	Filter cve.DougCVE   `json:"filter,omitempty"`
	CVES   []cve.DougCVE `json:"cves,omitempty"`
}

Result ...

func (*Result) String

func (c *Result) String() string

type Server

type Server struct {
	// contains filtered or unexported fields
}

Server ...

func NewServer

func NewServer(config *Config) (*Server, error)

NewServer ...

func (*Server) ServeHTTP

func (s *Server) ServeHTTP(w http.ResponseWriter, req *http.Request)

ServeHTTP ...

func (*Server) Shutdown

func (s *Server) Shutdown()

Shutdown ...

Jump to

Keyboard shortcuts

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