types

package
v0.1.0-beta.202310030544 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2023 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var OutputModeIds = map[OutputMode][]string{
	OutputModeTable: {"table"},
	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"`
	Args       map[string]interface{} `json:"args,omitempty"`
	ArgsString map[string]string      `json:"args_string,omitempty"`
}

type CmdProcess

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

type EventLogEntry

type EventLogEntry struct {
	EventType string          `json:"event_type"`
	Timestamp *time.Time      `json:"timestamp"`
	Payload   json.RawMessage `json:"payload"`
}

type FpPipeline

type FpPipeline struct {
	Name        string  `json:"name"`
	Description *string `json:"description,omitempty"`
	Mod         string  `json:"mod"`
}

type FpTrigger

type FpTrigger struct {
	Name        string  `json:"name"`
	Type        string  `json:"type"`
	Description *string `json:"description,omitempty"`
	Pipeline    string  `json:"pipeline"`
	Url         *string `json:"url,omitempty"`
}

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.

type ListProcessLogResponse

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

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

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.

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.

type ListVariableResponse

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

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

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 (
	OutputModeTable OutputMode = iota
	OutputModeYaml
	OutputModeJson
)

② Define the enumeration values for FooMode.

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 PrintablePipeline

type PrintablePipeline struct {
	Items interface{}
}

func (PrintablePipeline) GetColumns

func (PrintablePipeline) GetColumns() (columns []TableColumnDefinition)

func (PrintablePipeline) GetItems

func (p PrintablePipeline) GetItems() interface{}

func (PrintablePipeline) GetTable

func (p PrintablePipeline) GetTable() (Table, error)

func (PrintablePipeline) Transform

func (PrintablePipeline) Transform(r flowpipeapiclient.FlowpipeAPIResource) (interface{}, error)

type PrintableProcess

type PrintableProcess struct {
	Items interface{}
}

func (PrintableProcess) GetColumns

func (PrintableProcess) GetColumns() (columns []TableColumnDefinition)

func (PrintableProcess) GetItems

func (p PrintableProcess) GetItems() interface{}

func (PrintableProcess) GetTable

func (p PrintableProcess) GetTable() (Table, error)

func (PrintableProcess) Transform

func (PrintableProcess) Transform(r flowpipeapiclient.FlowpipeAPIResource) (interface{}, error)

type PrintableResource

type PrintableResource interface {
	Transform(flowpipeapiclient.FlowpipeAPIResource) (interface{}, error)
	GetItems() interface{}
	GetTable() (Table, error)
}

type PrintableTrigger

type PrintableTrigger struct {
	Items interface{}
}

func (PrintableTrigger) GetColumns

func (PrintableTrigger) GetColumns() (columns []TableColumnDefinition)

func (PrintableTrigger) GetItems

func (p PrintableTrigger) GetItems() interface{}

func (PrintableTrigger) GetTable

func (p PrintableTrigger) GetTable() (Table, error)

func (PrintableTrigger) Transform

func (PrintableTrigger) Transform(r flowpipeapiclient.FlowpipeAPIResource) (interface{}, error)

type PrintableVariable

type PrintableVariable struct {
	Items interface{}
}

func (PrintableVariable) GetColumns

func (PrintableVariable) GetColumns() (columns []TableColumnDefinition)

func (PrintableVariable) GetItems

func (p PrintableVariable) GetItems() interface{}

func (PrintableVariable) GetTable

func (p PrintableVariable) GetTable() (Table, error)

func (PrintableVariable) Transform

func (PrintableVariable) Transform(r flowpipeapiclient.FlowpipeAPIResource) (interface{}, error)

type Process

type Process struct {
	ID string `json:"process_id"`
}

The definition of a single Flowpipe Process

type ProcessOutputData

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

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 RunPipelineResponse

type RunPipelineResponse struct {
	ExecutionID           string `json:"execution_id"`
	PipelineExecutionID   string `json:"pipeline_execution_id"`
	ParentStepExecutionID string `json:"parent_step_execution_id"`
}

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 Table

type Table struct {
	Rows    []TableRow
	Columns []TableColumnDefinition
}

func (Table) GetItems

func (p Table) GetItems() interface{}

func (Table) GetTable

func (p Table) GetTable() (Table, error)

func (Table) Transform

func (Table) Transform(r flowpipeapiclient.FlowpipeAPIResource) (interface{}, error)

type TableColumnDefinition

type TableColumnDefinition struct {
	// name is a human readable name for the column.
	Name string `json:"name"`
	// type is an OpenAPI type definition for this column, such as number, integer, string, or
	// array.
	// See https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#data-types for more.
	Type string `json:"type"`
	// format is an optional OpenAPI type modifier for this column. A format modifies the type and
	// imposes additional rules, like date or time formatting for a string. The 'name' format is applied
	// to the primary identifier column which has type 'string' to assist in clients identifying column
	// is the resource name.
	// See https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#data-types for more.
	Format string `json:"format"`
	// description is a human readable description of this column.
	Description string `json:"description"`
	// priority is an integer defining the relative importance of this column compared to others. Lower
	// numbers are considered higher priority. Columns that may be omitted in limited space scenarios
	// should be given a higher priority.
	Priority int32 `json:"priority"`
}

Taken from kubectl

func (*TableColumnDefinition) Formatter

func (t *TableColumnDefinition) Formatter() string

type TableRow

type TableRow struct {
	Cells []interface{}
}

type TriggerRequestURI

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

type Variable

type Variable struct {
	Type string `json:"type"`
	Name string `json:"name"`
}

The definition of a single Flowpipe Variable

type VariableRequestURI

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

type WebhookRequestQuery

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

type WebhookRequestUri

type WebhookRequestUri struct {
	Trigger string `json:"trigger" uri:"trigger" 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