types

package
v1.1.0-beta.202410221121 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var OutputModeIds = map[OutputMode][]string{
	OutputModePretty: {"pretty"},
	OutputModePlain:  {"plain"},
	OutputModeYaml:   {"yaml"},
	OutputModeJson:   {"json"},
}

③ Map enumeration values to their textual representations (value identifiers).

Functions

This section is empty.

Types

type APIVersionRequestURI

type APIVersionRequestURI struct {
	APIVersion string `uri:"api_version" binding:"required,flowpipe_api_version"`
}

APIVersionRequestURI defines the requested API version.

type CmdPipeline

type CmdPipeline struct {
	Command       string                 `json:"command" binding:"required,oneof=run"`
	ExecutionID   string                 `json:"execution_id,omitempty"`
	Args          map[string]interface{} `json:"args,omitempty"`
	ArgsString    map[string]string      `json:"args_string,omitempty"`
	ExecutionMode *string                `json:"execution_mode,omitempty" binding:"omitempty,oneof=synchronous asynchronous"`
	WaitRetry     *int                   `json:"wait_retry,omitempty"`
}

func (*CmdPipeline) GetExecutionMode

func (c *CmdPipeline) GetExecutionMode() string

func (*CmdPipeline) GetWaitRetry

func (c *CmdPipeline) GetWaitRetry() int

type CmdProcess

type CmdProcess struct {
	Command             string `json:"command" binding:"required,oneof=resume"`
	PipelineExecutionID string `json:"pipeline_execution_id,omitempty" format:"^(pexec)_[0-9a-v]{20}$"`
	Reason              string `json:"reason,omitempty"`
}

type CmdTrigger added in v0.7.0

type CmdTrigger struct {
	Command string `json:"command" binding:"required,oneof=run reset"`

	// Sepcify execution id, if not specified, a new execution id will be created
	ExecutionID   string                 `json:"execution_id,omitempty"`
	Args          map[string]interface{} `json:"args,omitempty"`
	ArgsString    map[string]string      `json:"args_string,omitempty"`
	ExecutionMode *string                `json:"execution_mode,omitempty" binding:"omitempty,oneof=synchronous asynchronous"`
	WaitRetry     *int                   `json:"wait_retry,omitempty"`
}

func (*CmdTrigger) GetExecutionMode added in v0.7.0

func (c *CmdTrigger) GetExecutionMode() string

func (*CmdTrigger) GetWaitRetry added in v0.7.0

func (c *CmdTrigger) GetWaitRetry() int

type FlowpipeRequire

type FlowpipeRequire struct {
	MinVersionString string `json:"min_version,omitempty"`
}

type FlowpipeResponseMetadata added in v0.7.0

type FlowpipeResponseMetadata struct {
	ExecutionID         string     `json:"execution_id,omitempty"`
	Pipeline            string     `json:"pipeline,omitempty"`
	PipelineExecutionID string     `json:"pipeline_execution_id,omitempty"`
	Status              string     `json:"status,omitempty"`
	IsStale             *bool      `json:"is_stale,omitempty"`
	LastLoaded          *time.Time `json:"last_loaded,omitempty"`
	Type                string     `json:"type,omitempty"`
}

type FlowpipeTriggerResponseMetadata added in v0.7.0

type FlowpipeTriggerResponseMetadata struct {
	ProcessID  string     `json:"process_id,omitempty"`
	Name       string     `json:"name,omitempty"`
	Type       string     `json:"type,omitempty"`
	IsStale    *bool      `json:"is_stale,omitempty"`
	LastLoaded *time.Time `json:"last_loaded,omitempty"`
}

type FpIntegration added in v0.3.0

type FpIntegration struct {
	Name            string  `json:"name"`
	Type            string  `json:"type"`
	Description     *string `json:"description,omitempty"`
	Title           *string `json:"title,omitempty"`
	FileName        string  `json:"file_name,omitempty"`
	StartLineNumber int     `json:"start_line_number,omitempty"`
	EndLineNumber   int     `json:"end_line_number,omitempty"`
	Url             *string `json:"url,omitempty"`

	// slack
	Token         *string `json:"token,omitempty"`
	SigningSecret *string `json:"signing_secret,omitempty"`
	Channel       *string `json:"channel,omitempty"`

	// slack & msteams
	WebhookUrl *string `json:"webhook_url,omitempty"`

	// email
	SmtpHost     *string  `json:"smtp_host,omitempty"`
	SmtpTls      *string  `json:"smtp_tls,omitempty"`
	SmtpPort     *int     `json:"smtp_port,omitempty"`
	SmtpsPort    *int     `json:"smtps_port,omitempty"`
	SmtpUsername *string  `json:"smtp_username,omitempty"`
	SmtpPassword *string  `json:"smtp_password,omitempty"`
	From         *string  `json:"from,omitempty"`
	To           []string `json:"to,omitempty"`
	Cc           []string `json:"cc,omitempty"`
	Bcc          []string `json:"bcc,omitempty"`
	Subject      *string  `json:"subject,omitempty"`
}

func FpIntegrationFromAPI added in v0.3.0

func FpIntegrationFromAPI(apiIntegration flowpipeapiclient.FpIntegration) FpIntegration

func FpIntegrationFromModIntegration added in v0.3.0

func FpIntegrationFromModIntegration(integration modconfig.Integration) (*FpIntegration, error)

func (FpIntegration) String added in v0.3.0

type FpNotifier added in v0.3.0

type FpNotifier struct {
	Name            string     `json:"name"`
	Description     *string    `json:"description,omitempty"`
	Title           *string    `json:"title,omitempty"`
	Notifies        []FpNotify `json:"notifies,omitempty"`
	FileName        string     `json:"file_name,omitempty"`
	StartLineNumber int        `json:"start_line_number,omitempty"`
	EndLineNumber   int        `json:"end_line_number,omitempty"`
}

func FpNotifierFromAPI added in v0.3.0

func FpNotifierFromAPI(apiResp flowpipeapiclient.FpNotifier) FpNotifier

func FpNotifierFromModNotifier added in v0.3.0

func FpNotifierFromModNotifier(notifier modconfig.Notifier) (*FpNotifier, error)

func (FpNotifier) String added in v0.3.0

type FpNotify added in v0.3.0

type FpNotify struct {
	Integration *string `json:"integration,omitempty"`

	Cc          []string `json:"cc,omitempty"`
	Bcc         []string `json:"bcc,omitempty"`
	Channel     *string  `json:"channel,omitempty"`
	Description *string  `json:"description,omitempty"`
	Subject     *string  `json:"subject,omitempty"`
	Title       *string  `json:"title,omitempty"`
	To          []string `json:"to,omitempty"`
}

type FpPipeline

type FpPipeline struct {
	Name            string                     `json:"name"`
	Description     *string                    `json:"description,omitempty"`
	Mod             string                     `json:"mod"`
	Title           *string                    `json:"title,omitempty"`
	Documentation   *string                    `json:"documentation,omitempty"`
	FileName        string                     `json:"file_name,omitempty"`
	StartLineNumber int                        `json:"start_line_number,omitempty"`
	EndLineNumber   int                        `json:"end_line_number,omitempty"`
	Tags            map[string]string          `json:"tags,omitempty"`
	Steps           []modconfig.PipelineStep   `json:"steps,omitempty"`
	OutputConfig    []modconfig.PipelineOutput `json:"outputs,omitempty"`
	Params          []FpPipelineParam          `json:"params,omitempty"`
	RootMod         string                     `json:"root_mod"`
}

func FpPipelineFromAPIResponse

func FpPipelineFromAPIResponse(apiResp flowpipeapiclient.FpPipeline) (*FpPipeline, error)

func FpPipelineFromModPipeline

func FpPipelineFromModPipeline(pipeline *modconfig.Pipeline, rootMod string) (*FpPipeline, error)

func (FpPipeline) String

func (p FpPipeline) String(sanitizer *sanitize.Sanitizer, opts sanitize.RenderOptions) string

type FpPipelineExecution

type FpPipelineExecution struct {
	ExecutionId         string                `json:"execution_id"`
	PipelineExecutionId string                `json:"pipeline_execution_id"`
	Status              string                `json:"status"`
	PipelineName        *string               `json:"pipeline,omitempty"`
	CreatedAt           *time.Time            `json:"created_at,omitempty"`
	Outputs             map[string]any        `json:"outputs,omitempty"`
	Errors              []modconfig.StepError `json:"errors,omitempty"`
}

func FpPipelineExecutionFromAPIResponse

func FpPipelineExecutionFromAPIResponse(apiResp PipelineExecutionResponse) (*FpPipelineExecution, error)

func (FpPipelineExecution) String

type FpPipelineParam

type FpPipelineParam struct {
	Name        string            `json:"name"`
	Description *string           `json:"description,omitempty"`
	Tags        map[string]string `json:"tags,omitempty"`
	Enum        []interface{}     `json:"enum,omitempty"`
	Optional    *bool             `json:"optional,omitempty"`
	Default     any               `json:"default,omitempty"`
	Type        any               `json:"-"`
	TypeString  string            `json:"type_string"`
	Format      string            `json:"format,omitempty"`
}

func (FpPipelineParam) String

func (p FpPipelineParam) String(sanitizer *sanitize.Sanitizer, opts sanitize.RenderOptions) string

type FpTrigger

type FpTrigger struct {
	Name            string              `json:"name"`
	Mod             string              `json:"mod"`
	Type            string              `json:"type"`
	Enabled         bool                `json:"enabled"`
	Description     *string             `json:"description,omitempty"`
	Pipelines       []FpTriggerPipeline `json:"pipelines,omitempty"`
	Url             *string             `json:"url,omitempty"`
	Title           *string             `json:"title,omitempty"`
	FileName        string              `json:"file_name,omitempty"`
	StartLineNumber int                 `json:"start_line_number,omitempty"`
	EndLineNumber   int                 `json:"end_line_number,omitempty"`
	Documentation   *string             `json:"documentation,omitempty"`
	Tags            map[string]string   `json:"tags,omitempty"`
	Schedule        *string             `json:"schedule,omitempty"`
	Query           *string             `json:"query,omitempty"`
	RootMod         string              `json:"root_mod"`
	Params          []FpPipelineParam   `json:"params,omitempty"`
}

func FpTriggerFromAPI

func FpTriggerFromAPI(apiTrigger flowpipeapiclient.FpTrigger) FpTrigger

func FpTriggerFromModTrigger added in v0.9.1

func FpTriggerFromModTrigger(t modconfig.Trigger, rootMod string) (*FpTrigger, error)

func (FpTrigger) String

func (FpTrigger) TriggerDisplayName added in v0.8.0

func (t FpTrigger) TriggerDisplayName() string

type FpTriggerPipeline added in v0.2.0

type FpTriggerPipeline struct {
	CaptureGroup string `json:"capture_group"`
	Pipeline     string `json:"pipeline"`
}

type FpVariable added in v0.5.0

type FpVariable struct {
	ModName         string            `json:"mod_name"`
	Type            interface{}       `json:"type"`
	TypeString      string            `json:"type_string"`
	Enum            []interface{}     `json:"enum,omitempty"`
	QualifiedName   string            `json:"qualified_name"`
	ResourceName    string            `json:"resource_name"`
	Description     *string           `json:"description,omitempty"`
	ValueDefault    interface{}       `json:"value_default,omitempty" `
	Value           interface{}       `json:"value,omitempty"`
	Tags            map[string]string `json:"tags,omitempty"`
	FileName        string            `json:"file_name,omitempty"`
	StartLineNumber int               `json:"start_line_number,omitempty"`
	EndLineNumber   int               `json:"end_line_number,omitempty"`
	Format          string            `json:"format,omitempty"`
}

func FpVariableFromApi added in v0.5.0

func FpVariableFromApi(apiVariable flowpipeapiclient.FpVariable) *FpVariable

func FpVariableFromModVariable added in v0.5.0

func FpVariableFromModVariable(variable *modconfig.Variable) *FpVariable

func (FpVariable) String added in v0.5.0

func (p FpVariable) String(sanitizer *sanitize.Sanitizer, opts sanitize.RenderOptions) string

type InputIDHash added in v0.3.0

type InputIDHash struct {
	ID   string `json:"id" uri:"id" binding:"required"`
	Hash string `json:"hash" uri:"hash" binding:"required"`
}

type IntegrationRequestURI added in v0.3.0

type IntegrationRequestURI struct {
	IntegrationName string `uri:"integration_name" binding:"required" format:"^[a-z_]{0,32}$"`
}

type ListIntegrationResponse added in v0.3.0

type ListIntegrationResponse struct {
	Items     []FpIntegration `json:"items"`
	NextToken *string         `json:"next_token,omitempty"`
}

This type is used by the API to return a list of integrations.

func ListIntegrationResponseFromAPI added in v0.3.0

func ListIntegrationResponseFromAPI(apiResp *flowpipeapiclient.ListIntegrationResponse) *ListIntegrationResponse

type ListNotifierResponse added in v0.3.0

type ListNotifierResponse struct {
	Items     []FpNotifier `json:"items"`
	NextToken *string      `json:"next_token,omitempty"`
}

func ListNotifierResponseFromAPI added in v0.3.0

func ListNotifierResponseFromAPI(apiResp *flowpipeapiclient.ListNotifierResponse) *ListNotifierResponse

type ListPipelineResponse

type ListPipelineResponse struct {
	Items     []FpPipeline `json:"items"`
	NextToken *string      `json:"next_token,omitempty"`
}

This type is used by the API to return a list of pipelines.

func ListPipelineResponseFromAPIResponse

func ListPipelineResponseFromAPIResponse(apiResp *flowpipeapiclient.ListPipelineResponse) (*ListPipelineResponse, error)

func (ListPipelineResponse) GetResourceType

func (o ListPipelineResponse) GetResourceType() string

type ListProcessLogJSONResponse

type ListProcessLogJSONResponse struct {
	Items     []event.EventLogImpl `json:"items,omitempty"`
	NextToken *string              `json:"next_token,omitempty"`
}

type ListProcessResponse

type ListProcessResponse struct {
	Items     []Process `json:"items"`
	NextToken *string   `json:"next_token,omitempty"`
}

This type is used by the API to return a list of processs.

func ListProcessResponseFromAPIResponse

func ListProcessResponseFromAPIResponse(apiResp *flowpipeapiclient.ListProcessResponse) (*ListProcessResponse, error)

type ListRequestQuery

type ListRequestQuery struct {
	NextToken string `json:"next_token" form:"next_token" binding:"omitempty"`
	Limit     *int   `json:"limit,omitempty" form:"limit" binding:"omitempty"`
}

type ListTriggerResponse

type ListTriggerResponse struct {
	Items     []FpTrigger `json:"items"`
	NextToken *string     `json:"next_token,omitempty"`
}

This type is used by the API to return a list of triggers.

func (ListTriggerResponse) GetResourceType

func (o ListTriggerResponse) GetResourceType() string

type ListVariableResponse

type ListVariableResponse struct {
	Items     []*FpVariable `json:"items"`
	NextToken *string       `json:"next_token,omitempty"`
}

This type is used by the API to return a list of variables.

func ListVariableResponseFromAPI added in v0.5.0

func ListVariableResponseFromAPI(apiResp *flowpipeapiclient.ListVariableResponse) *ListVariableResponse

type Mod

type Mod struct {
	Name          string     `json:"name"`
	Title         *string    `json:"title,omitempty"`
	Description   *string    `json:"description,omitempty"`
	Documentation *string    `json:"documentation,omitempty"`
	Color         *string    `json:"color,omitempty"`
	Categories    []string   `json:"categories,omitempty"`
	OpenGraph     *OpenGraph `json:"opengraph,omitempty"`
	Require       *Require   `json:"require,omitempty"`
}

func NewModFromModConfigMod

func NewModFromModConfigMod(mod *modconfig.Mod) *Mod

type ModRequestURI

type ModRequestURI struct {
	ModName string `uri:"mod_name" binding:"required" format:"^[a-z]{0,32}$"`
}

type ModVersionConstraint

type ModVersionConstraint struct {
	// the fully qualified mod name, e.g. github.com/turbot/mod1
	Name          string `json:"name"`
	VersionString string `json:"version,omitempty"`
}

type NotifierRequestURI added in v0.3.0

type NotifierRequestURI struct {
	NotifierName string `uri:"notifier_name" binding:"required" format:"^[a-z_]{0,32}$"`
}

type OpenGraph

type OpenGraph struct {
	// The opengraph description (og:description) of the mod, for use in social media applications
	Description *string `json:"description,omitempty"`
	Title       *string `json:"title,omitempty"`
}

type OutputMode

type OutputMode enumflag.Flag

① Define your new enum flag type. It can be derived from enumflag.Flag, but it doesn't need to be as long as it satisfies constraints.Integer.

const (
	OutputModePretty OutputMode = iota
	OutputModePlain
	OutputModeYaml
	OutputModeJson
)

② Define the enumeration values for FooMode.

type ParsedErrorEvent

type ParsedErrorEvent struct {
	ParsedEvent
	Errors   []modconfig.StepError `json:"errors"`
	Output   map[string]any        `json:"attributes"`
	Duration *string               `json:"duration,omitempty"`
	// contains filtered or unexported fields
}

ParsedErrorEvent is a ParsedEvent which Failed.

func NewParsedErrorEvent added in v0.2.0

func NewParsedErrorEvent(parsedEvent ParsedEvent, errors []modconfig.StepError, output map[string]any, duration *string, isClosingEvent bool, retriesComplete bool) ParsedErrorEvent

func (ParsedErrorEvent) String

func (p ParsedErrorEvent) String(sanitizer *sanitize.Sanitizer, opts sanitize.RenderOptions) string

type ParsedEvent

type ParsedEvent struct {
	ParsedEventPrefix
	Type     string `json:"event_type"`
	StepType string `json:"step_type"`
	Message  string `json:"message,omitempty"`
	// contains filtered or unexported fields
}

func NewParsedEvent added in v0.2.0

func NewParsedEvent(prefix ParsedEventPrefix, executionId string, eventType string, stepType string, msg string) ParsedEvent

func (ParsedEvent) String

func (p ParsedEvent) String(sanitizer *sanitize.Sanitizer, opts sanitize.RenderOptions) string

type ParsedEventPrefix

type ParsedEventPrefix struct {
	FullPipelineName string  `json:"full_pipeline_name"`
	PipelineName     string  `json:"pipeline_name"`
	FullStepName     *string `json:"full_step_name,omitempty"`
	StepName         *string `json:"step_name,omitempty"`
	ForEachKey       *string `json:"for_each_key,omitempty"`
	LoopIndex        *int    `json:"loop_index,omitempty"`
	RetryIndex       *int    `json:"retry_index,omitempty"`
	// contains filtered or unexported fields
}

func NewParsedEventPrefix added in v0.2.0

func NewParsedEventPrefix(fullPipelineName string, fullStepName *string, forEachKey *string, loopIndex *int, retryIndex *int, serverPrefix *ServerOutputPrefix) ParsedEventPrefix

func NewPrefix

func NewPrefix(fullPipelineName string) ParsedEventPrefix

func NewPrefixWithServer added in v0.2.0

func NewPrefixWithServer(fullPipelineName string, serverPrefix ServerOutputPrefix) ParsedEventPrefix

func (ParsedEventPrefix) String

func (p ParsedEventPrefix) String(sanitizer *sanitize.Sanitizer, opts sanitize.RenderOptions) string

type ParsedEventRegistryItem

type ParsedEventRegistryItem struct {
	Name    string
	Started time.Time
	Args    *modconfig.Input
}

type ParsedEventWithInput

type ParsedEventWithInput struct {
	ParsedEvent
	Input map[string]any `json:"args"`
	// contains filtered or unexported fields
}

func NewParsedEventWithInput added in v0.2.0

func NewParsedEventWithInput(pe ParsedEvent, input map[string]any, isSkip bool) ParsedEventWithInput

func (ParsedEventWithInput) String

type ParsedEventWithOutput

type ParsedEventWithOutput struct {
	ParsedEvent
	Output     map[string]any `json:"attributes"`
	StepOutput map[string]any `json:"step_output"`
	Duration   *string        `json:"duration,omitempty"`
	// contains filtered or unexported fields
}

func NewParsedEventWithOutput added in v0.2.0

func NewParsedEventWithOutput(parsedEvent ParsedEvent, output map[string]any, stepOutput map[string]any, duration *string, isClosingEvent bool) ParsedEventWithOutput

func (ParsedEventWithOutput) String

type ParsedHeader

type ParsedHeader struct {
	ExecutionId string `json:"execution_id"`
	IsStale     bool   `json:"is_stale"`
	LastLoaded  string `json:"last_loaded"`
}

func (ParsedHeader) String

func (p ParsedHeader) String(sanitizer *sanitize.Sanitizer, opts sanitize.RenderOptions) string

type PipelineExecutionResponse

type PipelineExecutionResponse struct {
	Results  map[string]interface{}   `json:"results,omitempty"`
	Flowpipe FlowpipeResponseMetadata `json:"flowpipe,omitempty"`
	Errors   []modconfig.StepError    `json:"errors,omitempty"`
}

type PipelineRequestQuery

type PipelineRequestQuery struct {
	ExecutionMode *string `json:"execution_mode" form:"execution_mode" binding:"omitempty,oneof=synchronous asynchronous"`
}

type PipelineRequestURI

type PipelineRequestURI struct {
	PipelineName string `uri:"pipeline_name" binding:"required" format:"^[a-z_]{0,32}$"`
}

type PrintableIntegration added in v0.3.0

type PrintableIntegration struct {
	Items []FpIntegration
}

func NewPrintableIntegration added in v0.3.0

func NewPrintableIntegration(resp *ListIntegrationResponse) *PrintableIntegration

func NewPrintableIntegrationFromSingle added in v0.3.0

func NewPrintableIntegrationFromSingle(input *FpIntegration) *PrintableIntegration

func (PrintableIntegration) GetItems added in v0.3.0

func (p PrintableIntegration) GetItems() []FpIntegration

func (PrintableIntegration) GetTable added in v0.3.0

func (p PrintableIntegration) GetTable() (*printers.Table, error)

type PrintableNotifier added in v0.3.0

type PrintableNotifier struct {
	Items []FpNotifier
}

func NewPrintableNotifier added in v0.3.0

func NewPrintableNotifier(resp *ListNotifierResponse) *PrintableNotifier

func NewPrintableNotifierFromSingle added in v0.3.0

func NewPrintableNotifierFromSingle(input *FpNotifier) *PrintableNotifier

func (PrintableNotifier) GetItems added in v0.3.0

func (p PrintableNotifier) GetItems() []FpNotifier

func (PrintableNotifier) GetTable added in v0.3.0

func (p PrintableNotifier) GetTable() (*printers.Table, error)

type PrintableParsedEvent

type PrintableParsedEvent struct {
	Items    []sanitize.SanitizedStringer
	Registry map[string]ParsedEventRegistryItem
	// contains filtered or unexported fields
}

func NewPrintableParsedEvent

func NewPrintableParsedEvent(pipelineId string) *PrintableParsedEvent

func (*PrintableParsedEvent) GetItems

func (*PrintableParsedEvent) GetTable

func (p *PrintableParsedEvent) GetTable() (*printers.Table, error)

func (*PrintableParsedEvent) SetEvents

func (p *PrintableParsedEvent) SetEvents(logs ProcessEventLogs) (string, error)

type PrintablePipeline

type PrintablePipeline struct {
	Items []FpPipeline
}

func NewPrintablePipeline

func NewPrintablePipeline(resp *ListPipelineResponse) *PrintablePipeline

func NewPrintablePipelineFromSingle

func NewPrintablePipelineFromSingle(input *FpPipeline) *PrintablePipeline

func (PrintablePipeline) GetItems

func (p PrintablePipeline) GetItems() []FpPipeline

func (PrintablePipeline) GetTable

func (p PrintablePipeline) GetTable() (*printers.Table, error)

type PrintablePipelineExecution

type PrintablePipelineExecution struct {
	Items []FpPipelineExecution
}

func (PrintablePipelineExecution) GetItems

func (PrintablePipelineExecution) GetTable

type PrintableProcess

type PrintableProcess struct {
	Items []Process
}

func NewPrintableProcess

func NewPrintableProcess(resp *ListProcessResponse) *PrintableProcess

func NewPrintableProcessFromSingle

func NewPrintableProcessFromSingle(input *Process) *PrintableProcess

func (PrintableProcess) GetItems

func (p PrintableProcess) GetItems() []Process

func (PrintableProcess) GetTable

func (p PrintableProcess) GetTable() (*printers.Table, error)

type PrintableProgressOutput added in v0.6.0

type PrintableProgressOutput struct {
	Items []sanitize.SanitizedStringer
}

func NewPrintableProgressOutput added in v0.6.0

func NewPrintableProgressOutput() *PrintableProgressOutput

func (*PrintableProgressOutput) GetItems added in v0.6.0

func (*PrintableProgressOutput) GetTable added in v0.6.0

func (p *PrintableProgressOutput) GetTable() (*printers.Table, error)

type PrintableServerOutput added in v0.2.0

type PrintableServerOutput struct {
	Items []sanitize.SanitizedStringer
}

func NewPrintableServerOutput added in v0.2.0

func NewPrintableServerOutput() *PrintableServerOutput

func (*PrintableServerOutput) GetItems added in v0.2.0

func (*PrintableServerOutput) GetTable added in v0.2.0

func (p *PrintableServerOutput) GetTable() (*printers.Table, error)

type PrintableTrigger

type PrintableTrigger struct {
	Items []FpTrigger
}

func NewPrintableTrigger

func NewPrintableTrigger(resp *ListTriggerResponse) *PrintableTrigger

func NewPrintableTriggerFromSingle

func NewPrintableTriggerFromSingle(input *FpTrigger) *PrintableTrigger

func (PrintableTrigger) GetItems

func (p PrintableTrigger) GetItems() []FpTrigger

func (PrintableTrigger) GetTable

func (p PrintableTrigger) GetTable() (*printers.Table, error)

type PrintableVariable

type PrintableVariable struct {
	Items []FpVariable
}

func NewPrintableVariable added in v0.5.0

func NewPrintableVariable(resp *ListVariableResponse) *PrintableVariable

func NewPrintableVariableFromSingle added in v0.5.0

func NewPrintableVariableFromSingle(input *FpVariable) *PrintableVariable

func (PrintableVariable) GetItems

func (p PrintableVariable) GetItems() []FpVariable

func (PrintableVariable) GetTable

func (p PrintableVariable) GetTable() (*printers.Table, error)

type Process

type Process struct {
	ID        string    `json:"execution_id"`
	Pipeline  string    `json:"pipeline"`
	Status    string    `json:"status"`
	CreatedAt time.Time `json:"created_at"`
}

The definition of a single Flowpipe Process

func ProcessFromAPIResponse

func ProcessFromAPIResponse(apiResp flowpipeapiclient.Process) (*Process, error)

func (Process) String

func (p Process) String(sanitizer *sanitize.Sanitizer, opts sanitize.RenderOptions) string

type ProcessEventLogs

type ProcessEventLogs []event.EventLogImpl

func (ProcessEventLogs) GetResourceType

func (ProcessEventLogs) GetResourceType() string

GetResourceType is used to satisfy the interface requirements of types.PrintableResource Transform function

type ProcessOutputData

type ProcessOutputData struct {
	ID     string                 `json:"process_id"`
	Output map[string]interface{} `json:"output"`
}

type ProcessPayload

type ProcessPayload struct {
	PipelineName        string              `json:"name"`
	PipelineExecutionID string              `json:"pipeline_execution_id"`
	Event               ProcessPayloadEvent `json:"event"`
}

Process log payload definition

type ProcessPayloadEvent

type ProcessPayloadEvent struct {
	CreatedAt time.Time `json:"created_at"`
}

type ProcessRequestURI

type ProcessRequestURI struct {
	// TODO: do we want to pass the ExecutionID or PipelineExecutionID? The log is stored under ExecutionID but the execution works with PipelineExecutionID
	// ProcessId string `uri:"process_id" binding:"required" format:"^(pexec|exec)_[0-9a-v]{20}$"`
	ProcessId string `uri:"process_id" binding:"required" format:"^exec_[0-9a-v]{20}$"`
}

type ProgressOutput added in v0.6.0

type ProgressOutput struct {
	ExecutionId string                `json:"execution_id"`
	Output      map[string]any        `json:"output"`
	Errors      []modconfig.StepError `json:"errors"`
}

func NewProgressOutput added in v0.6.0

func NewProgressOutput(executionId string, output map[string]any, errors []modconfig.StepError) ProgressOutput

func (ProgressOutput) String added in v0.6.0

type Require

type Require struct {
	Flowpipe *FlowpipeRequire       `json:"flowpipe,omitempty"`
	Mods     []ModVersionConstraint `json:"mods,omitempty"`
}

type SafeMap added in v0.3.0

type SafeMap[K comparable, V any] struct {
	// contains filtered or unexported fields
}

func NewSafeMap added in v0.3.0

func NewSafeMap[K comparable, V any]() *SafeMap[K, V]

NewSafeMap creates a new instance of a SafeMap.

func (*SafeMap[K, V]) Delete added in v0.3.0

func (sm *SafeMap[K, V]) Delete(key K)

Delete removes a key-value pair from the SafeMap.

func (*SafeMap[K, V]) Get added in v0.3.0

func (sm *SafeMap[K, V]) Get(key K) (V, bool)

Get retrieves a value for a key from the SafeMap.

func (*SafeMap[K, V]) Set added in v0.3.0

func (sm *SafeMap[K, V]) Set(key K, value V)

Set sets a key-value pair in the SafeMap.

type ServerOutput added in v0.2.0

type ServerOutput struct {
	ServerOutputPrefix
	Message string
}

func NewServerOutput added in v0.2.0

func NewServerOutput(ts time.Time, category string, msg string) ServerOutput

func (ServerOutput) String added in v0.2.0

func (o ServerOutput) String(sanitizer *sanitize.Sanitizer, opts sanitize.RenderOptions) string

type ServerOutputError added in v0.2.0

type ServerOutputError struct {
	ServerOutputPrefix
	Message string
	Error   error
}

func NewServerOutputError added in v0.2.0

func NewServerOutputError(serverOutputPrefix ServerOutputPrefix, message string, err error) *ServerOutputError

func (ServerOutputError) String added in v0.2.0

func (o ServerOutputError) String(sanitizer *sanitize.Sanitizer, opts sanitize.RenderOptions) string

type ServerOutputLoaded added in v0.2.0

type ServerOutputLoaded struct {
	ServerOutputPrefix
	ModName  string
	IsReload bool
}

func NewServerOutputLoaded added in v0.2.0

func NewServerOutputLoaded(serverOutputPrefix ServerOutputPrefix, modName string, isReload bool) *ServerOutputLoaded

func (ServerOutputLoaded) String added in v0.2.0

type ServerOutputPrefix added in v0.2.0

type ServerOutputPrefix struct {
	TimeStamp time.Time
	Category  string
	// contains filtered or unexported fields
}

func NewServerOutputPrefix added in v0.2.0

func NewServerOutputPrefix(ts time.Time, category string) ServerOutputPrefix

func NewServerOutputPrefixWithExecId added in v0.2.0

func NewServerOutputPrefixWithExecId(ts time.Time, category string, execId *string) ServerOutputPrefix

func (ServerOutputPrefix) String added in v0.2.0

type ServerOutputQueryTriggerRun added in v0.3.0

type ServerOutputQueryTriggerRun struct {
	ServerOutputPrefix
	TriggerName string
	Inserted    int
	Updated     int
	Deleted     int
}

func NewServerOutputQueryTriggerRun added in v0.3.0

func NewServerOutputQueryTriggerRun(name string, inserted int, updated int, deleted int) ServerOutputQueryTriggerRun

func (ServerOutputQueryTriggerRun) String added in v0.3.0

type ServerOutputStatusChange added in v0.2.0

type ServerOutputStatusChange struct {
	ServerOutputPrefix
	Status     string
	Content    string
	Additional int
}

func NewServerOutputStatusChange added in v0.2.0

func NewServerOutputStatusChange(ts time.Time, status string, content string) ServerOutputStatusChange

func NewServerOutputStatusChangeWithAdditional added in v0.3.0

func NewServerOutputStatusChangeWithAdditional(ts time.Time, status string, content string, additional int) ServerOutputStatusChange

func (ServerOutputStatusChange) String added in v0.2.0

type ServerOutputTrigger added in v0.2.0

type ServerOutputTrigger struct {
	ServerOutputPrefix
	Name     string
	Type     string
	Enabled  *bool
	Schedule *string
	Method   *string
	Url      *string
	Sql      *string
}

func NewServerOutputTrigger added in v0.2.0

func NewServerOutputTrigger(prefix ServerOutputPrefix, n string, t string, e *bool) *ServerOutputTrigger

func (ServerOutputTrigger) String added in v0.2.0

type ServerOutputTriggerExecution added in v0.2.0

type ServerOutputTriggerExecution struct {
	ServerOutputPrefix
	TriggerName  string
	PipelineName string
}

func NewServerOutputTriggerExecution added in v0.2.0

func NewServerOutputTriggerExecution(ts time.Time, execId string, name string, pipeline string) *ServerOutputTriggerExecution

func (ServerOutputTriggerExecution) String added in v0.2.0

type Stack

type Stack struct {
	ID         string            `json:"id"`
	Status     string            `json:"status"`
	StepStatus map[int]string    `json:"pipeline_step_status"`
	Stacks     map[string]*Stack `json:"children"`
}

type TriggerExecutionResponse added in v0.7.0

type TriggerExecutionResponse struct {
	Results    map[string]interface{}          `json:"results,omitempty"`
	Errors     []perr.ErrorModel               `json:"errors,omitempty"`
	Flowpipe   FlowpipeTriggerResponseMetadata `json:"flowpipe"`
	LastStatus string                          `json:"last_status,omitempty"`
}

type TriggerRequestURI

type TriggerRequestURI struct {
	TriggerName string `uri:"trigger_name" binding:"required" format:"^[a-z]{0,32}$"`
}

type VariableRequestURI

type VariableRequestURI struct {
	VariableName string `uri:"variable_name" binding:"required" format:"^[a-z]{0,32}$"`
}

type WebhookRequestQuery

type WebhookRequestQuery struct {
	WaitTime *int `json:"wait_time" form:"wait_time" binding:"omitempty"`
}

func (*WebhookRequestQuery) GetWaitTime

func (c *WebhookRequestQuery) GetWaitTime() int

type WebhookRequestUri

type WebhookRequestUri struct {
	Hook string `json:"hook" uri:"hook" binding:"required"`
	Hash string `json:"hash" uri:"hash" binding:"required"`
}

Jump to

Keyboard shortcuts

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