util

package
v0.3.0-beta.202402222251 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const RFC3389WithMS = "2006-01-02T15:04:05.000Z07:00"

Variables

This section is empty.

Functions

func BigFloatToInt64 added in v0.2.0

func BigFloatToInt64(input *big.Float) int64

func CalculateHash

func CalculateHash(s, salt string) string

func CreateFlowpipeSalt added in v0.3.0

func CreateFlowpipeSalt(filename string, length int) (string, error)

Assumes that the dir exists

The function creates the salt if it does not exist, or it returns the existing salt if it's already there

func EnsureDir added in v0.3.0

func EnsureDir(dir string) error

func GetBaseUrl added in v0.3.0

func GetBaseUrl() string

func GetGlobalSalt added in v0.3.0

func GetGlobalSalt() (string, error)

func GetHost

func GetHost() string

func GetModSaltOrDefault added in v0.3.0

func GetModSaltOrDefault() (string, error)

Global vs Mod salt behaviour:

- We should only create the salt *automatically* in the "global" location: `~/.flowpipe/internal/salt ` - A user may create a "mod salt" file in the mod manually (`./.flowpipe/internal/salt`)

- If there is a mod salt, it is used for triggers, otherwise use the global salt. *Integrations* always use the global salt - this implies that:

  • any new installs will only have global salt (unless a user manually creates one)
  • existing installs work and continue to use the same salt as they currently do (unless the user manually deletes the salt)
  • the user may decide to use their own custom per-mod salt, but this is an advanced operation

func GetWebformUrl

func GetWebformUrl(execId string, pExecId string, sExecId string) (string, error)

func NewExecutionID

func NewExecutionID() string

func NewPipelineExecutionID

func NewPipelineExecutionID() string

func NewProcessID

func NewProcessID() string

func NewSessionID

func NewSessionID() string

func NewStepExecutionID

func NewStepExecutionID() string

func NewUniqueID

func NewUniqueID() string

func SafeDeref added in v0.3.0

func SafeDeref[T any](ptr *T) T

func ValidateEmailInput

func ValidateEmailInput(ctx context.Context, i modconfig.Input) error

Types

type CommandBusMock added in v0.2.0

type CommandBusMock struct {
	SendFunc         func(ctx context.Context, command interface{}) error
	SendWithLockFunc func(ctx context.Context, command interface{}, lock *sync.Mutex) error
}

func (*CommandBusMock) Send added in v0.2.0

func (c *CommandBusMock) Send(ctx context.Context, command interface{}) error

func (*CommandBusMock) SendWithLock added in v0.2.0

func (c *CommandBusMock) SendWithLock(ctx context.Context, command interface{}, lock *sync.Mutex) error

type HclExpressionMock added in v0.2.0

type HclExpressionMock struct {
	ValueFunc func(evalCtx *hcl.EvalContext) (cty.Value, hcl.Diagnostics)
}

func (*HclExpressionMock) Range added in v0.2.0

func (*HclExpressionMock) Range() hcl.Range

func (*HclExpressionMock) StartRange added in v0.2.0

func (*HclExpressionMock) StartRange() hcl.Range

func (*HclExpressionMock) Value added in v0.2.0

func (h *HclExpressionMock) Value(evalCtx *hcl.EvalContext) (cty.Value, hcl.Diagnostics)

func (*HclExpressionMock) Variables added in v0.2.0

func (*HclExpressionMock) Variables() []hcl.Traversal

Jump to

Keyboard shortcuts

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