gen

package
v0.95.0 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	PreambleTemplate, _ = template.New("preambleTemplate").Parse(preambleTemplateContent)

	DefinitionTemplate, _ = template.New("definitionTemplate").Parse(definitionTemplateContent)

	GenericChecksTemplate, _ = template.New("genericChecksTemplate").Funcs(genhelpers.BuildTemplateFuncMap(
		genhelpers.FirstLetterLowercase,
		genhelpers.FirstLetter,
	)).Parse(genericChecksTemplateContent)

	AggregatedGenericChecksTemplate, _ = template.New("aggregatedGenericChecksTemplate").Funcs(genhelpers.BuildTemplateFuncMap(
		genhelpers.FirstLetterLowercase,
		genhelpers.FirstLetter,
		genhelpers.SnakeCaseToCamel,
		genhelpers.IsLastItem,
	)).Parse(aggregatedGenericChecksTemplateContent)

	SpecificChecksTemplate, _ = template.New("specificChecksTemplate").Funcs(genhelpers.BuildTemplateFuncMap(
		genhelpers.FirstLetterLowercase,
		genhelpers.FirstLetter,
		genhelpers.SnakeCaseToCamel,
	)).Parse(specificChecksTemplateContent)

	AllTemplates = []*template.Template{PreambleTemplate, DefinitionTemplate, GenericChecksTemplate, AggregatedGenericChecksTemplate, SpecificChecksTemplate}
)

Functions

This section is empty.

Types

type ParameterAssertionModel

type ParameterAssertionModel struct {
	Name             string
	Type             string
	DefaultValue     string
	DefaultLevel     string
	AssertionCreator string
}

type PreambleModel

type PreambleModel struct {
	PackageName               string
	AdditionalStandardImports []string
}

TODO [SNOW-1501905]: extract to commons?

type SnowflakeObjectParameters

type SnowflakeObjectParameters struct {
	Name              string
	IdType            string
	Level             sdk.ParameterType
	AdditionalImports []string
	Parameters        []SnowflakeParameter
}

func GetAllSnowflakeObjectParameters

func GetAllSnowflakeObjectParameters() []SnowflakeObjectParameters

func (SnowflakeObjectParameters) ObjectName

func (p SnowflakeObjectParameters) ObjectName() string

type SnowflakeObjectParametersAssertionsModel

type SnowflakeObjectParametersAssertionsModel struct {
	Name       string
	IdType     string
	Parameters []ParameterAssertionModel
	PreambleModel
}

func ModelFromSnowflakeObjectParameters

func ModelFromSnowflakeObjectParameters(snowflakeObjectParameters SnowflakeObjectParameters) SnowflakeObjectParametersAssertionsModel

func (SnowflakeObjectParametersAssertionsModel) SomeFunc

type SnowflakeParameter

type SnowflakeParameter struct {
	ParameterName string
	ParameterType string
	DefaultValue  string
	DefaultLevel  string
}

Jump to

Keyboard shortcuts

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