server

package
v1.97.0 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2026 License: MIT Imports: 18 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Input

func Input(listener net.Listener) (*model.Input, error)

Input receives configuration via HTTP on the port and returns it decoded

Types

type API

type API struct {
	// Expectations is the list of expectations that haven't been met yet
	Expectations []model.Output
	// Errors is the error list populated by doing a Dependabot run
	Errors []error
	// Actual will contain the smoke test output that actually happened after the run is Complete
	Actual model.SmokeTest
	// contains filtered or unexported fields
}

API intercepts calls to the Dependabot API

func NewAPI

func NewAPI(expected []model.Output, writer io.Writer) *API

NewAPI creates a new API instance and starts the server

func (*API) Complete

func (a *API) Complete()

Complete adds any remaining expectations to the error queue

func (*API) Port

func (a *API) Port() int

Port returns the port the API is listening on

func (*API) ServeHTTP

func (a *API) ServeHTTP(w http.ResponseWriter, r *http.Request)

ServeHTTP handles requests to the server

func (*API) Stop

func (a *API) Stop()

Stop stops the server

Jump to

Keyboard shortcuts

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