function

package
v1.2.3-0...-0b8789f Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2025 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package function contains definitions of Jsonnet functions for various template contexts (use, upgrade, ...). Not all functions are available in all template contexts.

The following applies to each function:

  • Parameters of the Go function are external dependencies of the Jsonnet function.
  • Result of the Go function is definition of the Jsonnet function.

Index

Constants

View Source
const (
	SnowflakeWriterIDAws   = keboola.ComponentID("keboola.wr-db-snowflake")
	SnowflakeWriterIDAzure = keboola.ComponentID("keboola.wr-snowflake-blob-storage")
	SnowflakeWriterIDGCP   = keboola.ComponentID("keboola.wr-db-snowflake-gcs")
	SnowflakeWriterIDGCPS3 = keboola.ComponentID("keboola.wr-db-snowflake-gcs-s3")
)

Variables

This section is empty.

Functions

func ComponentIsAvailable

func ComponentIsAvailable(components *model.ComponentsMap) *jsonnet.NativeFunction

ComponentIsAvailable Jsonnet function returns true if the component is available in the stack.

func ConfigID

func ConfigID(idMapper func(id any) string) *jsonnet.NativeFunction

ConfigID Jsonnet function maps configuration ID used in the template to configuration ID used in the project.

func ConfigRowID

func ConfigRowID(idMapper func(id any) string) *jsonnet.NativeFunction

ConfigRowID Jsonnet function maps configuration row ID used in the template to configuration ID used in the project.

func HasProjectBackend

func HasProjectBackend(backends []string) *jsonnet.NativeFunction

HasProjectBackend Jsonnet function returns true if the project backend is available, otherwise false.

func Input

func Input(inputValueProvider func(inputID string) (input.Value, bool)) *jsonnet.NativeFunction

Input Jsonnet function returns input value.

func InputIsAvailable

func InputIsAvailable(inputValueProvider func(inputID string) (input.Value, bool)) *jsonnet.NativeFunction

InputIsAvailable Jsonnet function returns true if the input exists.

func InstanceID

func InstanceID(instanceID string) *jsonnet.NativeFunction

InstanceID Jsonnet function returns full id of the template instance.

func InstanceIDShort

func InstanceIDShort(instanceIDShort string) *jsonnet.NativeFunction

InstanceIDShort Jsonnet function returns shortened id of the template instance.

func RandomID

func RandomID() *jsonnet.NativeFunction

RandomID Jsonnet function returns a random, shortened id of the template instance.

func SnowflakeWriterComponentID

func SnowflakeWriterComponentID(components *model.ComponentsMap, backends []string) *jsonnet.NativeFunction

SnowflakeWriterComponentID Jsonnet function returns component ID of the Snowflake Writer it the stack.

Types

This section is empty.

Jump to

Keyboard shortcuts

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