api

package
v0.4.4 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2024 License: AGPL-3.0 Imports: 58 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConstructPipelineFullyQualifiedName

func ConstructPipelineFullyQualifiedName(pipelineName string) string

func ExecutePipeline

func ExecutePipeline(input types.CmdPipeline, pipelineName string, esService *es.ESService) (types.PipelineExecutionResponse, *event.PipelineQueue, error)

func GetIntegration added in v0.3.0

func GetIntegration(name string) (*types.FpIntegration, error)

func GetNotifier added in v0.3.0

func GetNotifier(name string) (*types.FpNotifier, error)

func GetPipeline

func GetPipeline(pipelineName string, rootMod string) (*types.FpPipeline, error)

func GetProcess

func GetProcess(executionId string) (*types.Process, error)

func GetTrigger

func GetTrigger(triggerName string) (*types.FpTrigger, error)

func ListIntegrations added in v0.3.0

func ListIntegrations() (*types.ListIntegrationResponse, error)

func ListNotifiers added in v0.3.0

func ListNotifiers() (*types.ListNotifierResponse, error)

func ListPipelines

func ListPipelines(rootMod string) (*types.ListPipelineResponse, error)

func ListProcesses

func ListProcesses() (*types.ListProcessResponse, error)

func ListTriggers

func ListTriggers() (*types.ListTriggerResponse, error)

Types

type APIService

type APIService struct {
	EsService *es.ESService

	HTTPAddress string
	HTTPPort    int

	// Status tracking for the API service.
	Status    string
	StartedAt *time.Time

	StoppedAt *time.Time `json:"stopped_at,omitempty"`

	ModMetadata RootModMetadata
	// contains filtered or unexported fields
}

APIService represents the API service.

func NewAPIService

func NewAPIService(ctx context.Context, es *es.ESService, opts ...APIServiceOption) (*APIService, error)

NewAPIService creates a new APIService.

func (*APIService) DocsRegisterAPI

func (api *APIService) DocsRegisterAPI(router *gin.RouterGroup)

func (*APIService) FormRegisterAPI added in v0.3.0

func (api *APIService) FormRegisterAPI(router *gin.RouterGroup)

func (*APIService) IntegrationRegisterAPI added in v0.3.0

func (api *APIService) IntegrationRegisterAPI(router *gin.RouterGroup)

func (*APIService) ModRegisterAPI

func (api *APIService) ModRegisterAPI(router *gin.RouterGroup)

func (*APIService) NotifierRegisterAPI added in v0.3.0

func (api *APIService) NotifierRegisterAPI(router *gin.RouterGroup)

func (*APIService) PipelineRegisterAPI

func (api *APIService) PipelineRegisterAPI(router *gin.RouterGroup)

func (*APIService) ProcessRegisterAPI

func (api *APIService) ProcessRegisterAPI(router *gin.RouterGroup)

func (*APIService) Start

func (api *APIService) Start() error

Start starts services managed by the Manager.

func (*APIService) Stop

func (api *APIService) Stop() error

Stop stops services managed by the Manager.

func (*APIService) TriggerRegisterAPI

func (api *APIService) TriggerRegisterAPI(router *gin.RouterGroup)

func (*APIService) VariableRegisterAPI

func (api *APIService) VariableRegisterAPI(router *gin.RouterGroup)

func (*APIService) WebhookRegisterAPI

func (api *APIService) WebhookRegisterAPI(router *gin.RouterGroup)

type APIServiceOption

type APIServiceOption func(*APIService) error

APIServiceOption defines a type of function to configures the APIService.

func WithHTTPAddress

func WithHTTPAddress(addr string) APIServiceOption

WithHTTPAddress sets the host and port of the API HTTPS service from the given address string in host:port format.

func WithHTTPPort

func WithHTTPPort(port int) APIServiceOption

WithHTTPPort sets port of the API HTTP service

type JSONPayload

type JSONPayload struct {
	PipelineExecutionID string `json:"pipeline_execution_id"`
	StepExecutionID     string `json:"step_execution_id"`
	ExecutionID         string `json:"execution_id"`
}

type RootModMetadata

type RootModMetadata struct {
	IsStale    bool      `json:"is_stale"`
	LastLoaded time.Time `json:"last_loaded"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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