restapi

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2025 License: MIT Imports: 44 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func JobConfigDataV1 added in v0.6.0

func JobConfigDataV1(projectDir string, tempDir string, actionConfig string) map[string]interface{}

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
	Step                 plangenerate.Step
	CurrentModule        *analyzerapi.ProjectModule
	CurrentAction        *catalog.Action
	NCI                  nci.Spec
	Env                  map[string]string
	ActionEnv            map[string]string
	ActionConfig         string
	State                *state.ActionStateContext
	TempDir              string
	ArtifactDir          string
	ExecutableCandidates []executable.Executable
}

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)

type DeploymentResponse added in v0.6.0

type DeploymentResponse struct {
	DeploymentType        string            `json:"deployment_type"`
	DeploymentSpec        string            `json:"deployment_spec"`
	DeploymentFile        string            `json:"deployment_file"`
	DeploymentEnvironment string            `json:"deployment_environment"`
	Properties            map[string]string `json:"properties"`
}

func JobDeploymentV1 added in v0.6.0

func JobDeploymentV1(module *analyzerapi.ProjectModule, actionEnv map[string]string, env map[string]string) (DeploymentResponse, error)

type JobModuleDataResponse added in v0.6.0

type JobModuleDataResponse struct {
	ProjectDir string                 `json:"project-dir"`
	Config     map[string]interface{} `json:"config"`
	Env        map[string]string      `json:"env"`
	Module     *analyzerapi.ProjectModule
	Deployment *DeploymentResponse
}

type JobProjectDataResponse added in v0.6.0

type JobProjectDataResponse struct {
	ProjectDir string                 `json:"project-dir"`
	Config     map[string]interface{} `json:"config"`
	Env        map[string]string      `json:"env"`
}

Jump to

Keyboard shortcuts

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