freepsutils

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Dec 24, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BoolParams

type BoolParams struct {
	Key *string
}

BoolParams contains the parameters for the Bool comparisons

type ConvertFormDataToInputArgs

type ConvertFormDataToInputArgs struct {
	InputFieldName *string
}

ConvertFormDataToInputArgs are the arguments for the ConvertFormDataToInput function

type EchoArgs

type EchoArgs struct {
	Output   *string
	Silent   *bool
	AsString *bool
}

EchoArgs are the arguments for the Echo function

type EchoArgumentsArgs

type EchoArgumentsArgs struct {
	InputKey *string
}

EchoArgumentsArgs are the arguments for the EchoArguments function

type ExtractArgs

type ExtractArgs struct {
	Key         string
	Type        *string
	ContentType *string
}

ExtractArgs are the arguments for the Extract function

type FlattenArgs

type FlattenArgs struct {
	IncludeRegexp *string
	ExcludeRegexp *string
}

FlattenArgs are the arguments for the Echo function

type FloatParams

type FloatParams struct {
	Key   *string
	Value float64
}

FloatParams contains the parameters for the Float comparisons

type GraphFromEngineArgs

type GraphFromEngineArgs struct {
	GraphID string
}

GraphFromEngineArgs are the arguments for the GraphBuilder function

func (*GraphFromEngineArgs) GraphIDSuggestions

func (arg *GraphFromEngineArgs) GraphIDSuggestions(m *OpGraphBuilder) map[string]string

GraphID auggestions returns suggestions for graph names

type GraphFromStoreArgs

type GraphFromStoreArgs struct {
	GraphName       string
	CreateIfMissing *bool
}

GraphFromStoreArgs are the arguments for the GraphBuilder function

func (*GraphFromStoreArgs) GraphNameSuggestions

func (arg *GraphFromStoreArgs) GraphNameSuggestions(m *OpGraphBuilder) []string

GraphNameSuggestions returns suggestions for graph names

type IntParams

type IntParams struct {
	Key   *string
	Value int64
}

IntParams contains the parameters for the Int comparisons

type OpGraphBuilder

type OpGraphBuilder struct {
	GE *freepsgraph.GraphEngine
}

OpGraphBuilder is the operator to build and modify graphs

func (*OpGraphBuilder) DeleteGraph

func (m *OpGraphBuilder) DeleteGraph(ctx *base.Context, input *base.OperatorIO, args GraphFromEngineArgs) *base.OperatorIO

DeleteGraph deletes a graph from the graph engine and stores a backup in the store

func (*OpGraphBuilder) ExecuteGraphFromStore

func (m *OpGraphBuilder) ExecuteGraphFromStore(ctx *base.Context, input *base.OperatorIO, args GraphFromStoreArgs) *base.OperatorIO

ExecuteGraphFromStore executes a graph after loading it from the store

func (*OpGraphBuilder) GetGraph

func (m *OpGraphBuilder) GetGraph(ctx *base.Context, input *base.OperatorIO, args GraphFromEngineArgs) *base.OperatorIO

GetGraph returns a graph from the graph engine

func (*OpGraphBuilder) GetGraphFromStore

func (m *OpGraphBuilder) GetGraphFromStore(ctx *base.Context, input *base.OperatorIO, args GraphFromStoreArgs) *base.OperatorIO

GetGraphFromStore returns a graph from the store

func (*OpGraphBuilder) RestoreDeletedGraphFromStore

func (m *OpGraphBuilder) RestoreDeletedGraphFromStore(ctx *base.Context, input *base.OperatorIO, args GraphFromStoreArgs) *base.OperatorIO

RestoreDeletedGraphFromStore restores a graph from the backup in store

func (*OpGraphBuilder) SetOperation

func (m *OpGraphBuilder) SetOperation(ctx *base.Context, input *base.OperatorIO, args SetOperationArgs) *base.OperatorIO

SetOperation sets the fields of an operation given by the number in a graph in the store

type OpRegexp

type OpRegexp struct {
}

OpRegexp is a collection of regexp operations

func (*OpRegexp) FindStringIndex

func (m *OpRegexp) FindStringIndex(ctx *base.Context, input *base.OperatorIO, args RegexpArgs) *base.OperatorIO

FindStringIndex returns the first match of the given regexp

func (*OpRegexp) FindStringSubmatchIndex

func (m *OpRegexp) FindStringSubmatchIndex(ctx *base.Context, input *base.OperatorIO, args RegexpArgs) *base.OperatorIO

FindStringSubmatchIndex returns the first match of the given regexp

type OpUtils

type OpUtils struct {
}

OpUtils is a collection of utility operations

func (*OpUtils) ContenttypeSuggestions added in v1.4.0

func (m *OpUtils) ContenttypeSuggestions() []string

ContenttypeSuggestions returns a list of possible content types for the given key

func (*OpUtils) ConvertFormDataToInput

func (m *OpUtils) ConvertFormDataToInput(ctx *base.Context, input *base.OperatorIO, args ConvertFormDataToInputArgs) *base.OperatorIO

ConvertFormDataToInput takes the "input" field from the form data and passes it on directly

func (*OpUtils) Echo

func (m *OpUtils) Echo(ctx *base.Context, input *base.OperatorIO, args EchoArgs) *base.OperatorIO

Echo returns the given output or an empty string if no output is given

func (*OpUtils) EchoArguments

func (m *OpUtils) EchoArguments(ctx *base.Context, input *base.OperatorIO, args EchoArgumentsArgs, otherArgs base.FunctionArguments) *base.OperatorIO

EchoArguments returns the arguments as a map

func (*OpUtils) Extract

func (m *OpUtils) Extract(ctx *base.Context, input *base.OperatorIO, args ExtractArgs) *base.OperatorIO

Extract extracts the value of a given key from the input, if necessary it tries to flatten the input first

func (*OpUtils) Flatten

func (m *OpUtils) Flatten(ctx *base.Context, input *base.OperatorIO, args FlattenArgs) *base.OperatorIO

Flatten flattens the input from a nested map to a flat map

func (*OpUtils) FloatGreaterThan

func (m *OpUtils) FloatGreaterThan(ctx *base.Context, input *base.OperatorIO, args FloatParams) *base.OperatorIO

FloatGreaterThan compares the input with the given value and returns the input if it is greater than the given value

func (*OpUtils) FloatLessThan

func (m *OpUtils) FloatLessThan(ctx *base.Context, input *base.OperatorIO, args FloatParams) *base.OperatorIO

FloatLessThan compares the input with the given value and returns the input if it is less than the given value

func (*OpUtils) FormToJSON

func (m *OpUtils) FormToJSON(ctx *base.Context, input *base.OperatorIO) *base.OperatorIO

FormToJSON converts the input from form data to JSON

func (*OpUtils) HasInput

func (m *OpUtils) HasInput(ctx *base.Context, input *base.OperatorIO) *base.OperatorIO

HasInput returns an error if the input is empty

func (*OpUtils) IntEqual

func (m *OpUtils) IntEqual(ctx *base.Context, input *base.OperatorIO, args IntParams) *base.OperatorIO

IntEqual compares the input with the given value and returns the input if it is equal to the given value

func (*OpUtils) IntGreaterThan

func (m *OpUtils) IntGreaterThan(ctx *base.Context, input *base.OperatorIO, args IntParams) *base.OperatorIO

IntGreaterThan compares the input with the given value and returns the input if it is greater than the given value

func (*OpUtils) IntLessThan

func (m *OpUtils) IntLessThan(ctx *base.Context, input *base.OperatorIO, args IntParams) *base.OperatorIO

IntLessThan compares the input with the given value and returns the input if it is less than the given value

func (*OpUtils) IsFalse

func (m *OpUtils) IsFalse(ctx *base.Context, input *base.OperatorIO, args BoolParams) *base.OperatorIO

IsFalse returns the input if the input is false

func (*OpUtils) IsTrue

func (m *OpUtils) IsTrue(ctx *base.Context, input *base.OperatorIO, args BoolParams) *base.OperatorIO

IsTrue returns the input if it is true

func (*OpUtils) MergeInputAndArguments

func (m *OpUtils) MergeInputAndArguments(ctx *base.Context, input *base.OperatorIO, args base.FunctionArguments) *base.OperatorIO

MergeInputAndArguments merges the input and the arguments into a single map

func (*OpUtils) RemapKeys

func (m *OpUtils) RemapKeys(ctx *base.Context, input *base.OperatorIO, args EchoArgumentsArgs, mapping base.FunctionArguments) *base.OperatorIO

RemapKeys renames arguments in the input based on the given mapping

func (*OpUtils) StringAppend added in v1.4.0

func (m *OpUtils) StringAppend(ctx *base.Context, input *base.OperatorIO, args StringAppendArgs) *base.OperatorIO

StringReplaceMulti replaces given args framed with "%" with their values

func (*OpUtils) StringEqual

func (m *OpUtils) StringEqual(ctx *base.Context, input *base.OperatorIO, args StringParams) *base.OperatorIO

StringEqual compares the input with the given value and returns the input if it is equal to the given value

func (*OpUtils) StringReplace

func (m *OpUtils) StringReplace(ctx *base.Context, input *base.OperatorIO, args StringReplaceArgs) *base.OperatorIO

StringReplace replaces the given search string with the given replace string

func (*OpUtils) StringReplaceMulti

func (m *OpUtils) StringReplaceMulti(ctx *base.Context, input *base.OperatorIO, args StringReplaceMultiArgs, otherArgs base.FunctionArguments) *base.OperatorIO

StringReplaceMulti replaces given args framed with "%" with their values

func (*OpUtils) StringSplit

func (m *OpUtils) StringSplit(ctx *base.Context, input *base.OperatorIO, args StringSplitArgs) *base.OperatorIO

StringSplit splits the input by the given separator and returns the part at the given position

func (*OpUtils) TypeSuggestions

func (m *OpUtils) TypeSuggestions() []string

TypeSuggestions returns a list of possible types for the given key

type RegexpArgs

type RegexpArgs struct {
	Regexp string
}

RegexpArgs are the arguments for the Regexp function

type SetOperationArgs

type SetOperationArgs struct {
	GraphName       string
	OperationNumber int
	Operator        *string
	Function        *string
	ArgumentName    *string
	ArgumentValue   *string
}

SetOperationArgs sets the fields of an operation given by the number in a graph in the store

type StringAppendArgs added in v1.4.0

type StringAppendArgs struct {
	InputString    *string
	StringToAppend string
}

StringAppendArgs

type StringParams

type StringParams struct {
	Key   *string
	Value string
}

StringParams contains the parameters for the String comparisons

type StringReplaceArgs

type StringReplaceArgs struct {
	InputString *string
	Search      string
	Replace     string
}

StringReplaceArgs are the arguments for the StringReplace function

type StringReplaceMultiArgs

type StringReplaceMultiArgs struct {
	InputString *string
}

StringReplaceMultiArgs

type StringSplitArgs

type StringSplitArgs struct {
	Sep string
	Pos int
}

StringSplitArgs are the arguments for the Split function

Jump to

Keyboard shortcuts

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