restapi

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2024 License: MIT Imports: 36 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ListenOnAddr

func ListenOnAddr(e *echo.Echo, listen string)

func ListenOnSocket

func ListenOnSocket(e *echo.Echo, file string)

func SecureWithAPIKey

func SecureWithAPIKey(e *echo.Echo, secret string)

SecureWithAPIKey secures the api with a secret access token The access token needs to be passed in Authorization Header with value Bearer <secret> For invalid key, it sends “401 - Unauthorized” response. For missing key, it sends “400 - Bad Request” response.

func Setup

func Setup(handlers APIConfig) *echo.Echo

Types

type APIConfig

type APIConfig struct {
	BuildID       string
	JobID         string
	ProjectDir    string
	Modules       []*analyzerapi.ProjectModule
	CurrentModule *analyzerapi.ProjectModule
	CurrentAction *catalog.Action
	Env           map[string]string
	ActionConfig  string
	State         *state.ActionStateContext
	TempDir       string
	ArtifactDir   string
}

type ByVersion

type ByVersion []*version.Version

ByVersion implements sort.Interface

func (ByVersion) Len

func (a ByVersion) Len() int

func (ByVersion) Less

func (a ByVersion) Less(i, j int) bool

func (ByVersion) Swap

func (a ByVersion) Swap(i, j int)

Jump to

Keyboard shortcuts

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