api

package
v0.1.0-beta.202311140126 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2023 License: AGPL-3.0 Imports: 51 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIService

type APIService struct {
	EsService *es.ESService

	HTTPPort string `json:"http_port,omitempty"`

	HTTPSHost string `json:"https_host,omitempty"`
	HTTPSPort string `json:"https_port,omitempty"`

	// Status tracking for the API service.
	Status    string     `json:"status"`
	StartedAt *time.Time `json:"started_at,omitempty"`
	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) InputRegisterAPI

func (api *APIService) InputRegisterAPI(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 WithHTTPSAddress

func WithHTTPSAddress(addr string) APIServiceOption

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

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