api

package
v0.9.3 Latest Latest
Warning

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

Go to latest
Published: May 23, 2023 License: BSD-3-Clause Imports: 15 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ServeAPI

func ServeAPI(config Config)

ServeAPI serves the analysis service on the specified port

Types

type Config

type Config struct {
	ApiPort        int
	GitLabAuth     gitutils.GitAuth
	GitHubAuth     gitutils.GitAuth
	Local          bool   //if set, to bind the api to localhost:port (electron) or simply :port (web service) instead
	CodeBaseDir    string // the location where code is cloned into
	ProjectManager projects.ProjectManager
}

type RouteSpec

type RouteSpec struct {
	Path    string
	Handler func(w http.ResponseWriter, r *http.Request)
	Methods []string
}

func GetRoutes

func GetRoutes(pm projects.ProjectManager) []RouteSpec

Jump to

Keyboard shortcuts

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