gen

package
v0.94.0 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

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

	DefinitionTemplate, _ = template.New("definitionTemplate").Funcs(genhelpers.BuildTemplateFuncMap(
		genhelpers.FirstLetterLowercase,
	)).Parse(definitionTemplateContent)

	AssertionsTemplate, _ = template.New("assertionsTemplate").Funcs(genhelpers.BuildTemplateFuncMap(
		genhelpers.FirstLetterLowercase,
		genhelpers.FirstLetter,
		genhelpers.TypeWithoutPointer,
		genhelpers.CamelToWords,
		genhelpers.RunMapper,
	)).Parse(assertionsTemplateContent)

	AllTemplates = []*template.Template{PreambleTemplate, DefinitionTemplate, AssertionsTemplate}
)

Functions

func GetSdkObjectDetails

func GetSdkObjectDetails() []genhelpers.SdkObjectDetails

Types

type PreambleModel

type PreambleModel struct {
	PackageName               string
	AdditionalStandardImports []string
}

TODO [SNOW-1501905]: extract to commons?

type SdkObjectDef

type SdkObjectDef struct {
	IdType       string
	ObjectType   sdk.ObjectType
	ObjectStruct any
}

type SnowflakeObjectAssertionsModel

type SnowflakeObjectAssertionsModel struct {
	Name    string
	SdkType string
	IdType  string
	Fields  []SnowflakeObjectFieldAssertion
	PreambleModel
}

func (SnowflakeObjectAssertionsModel) SomeFunc

func (m SnowflakeObjectAssertionsModel) SomeFunc()

type SnowflakeObjectFieldAssertion

type SnowflakeObjectFieldAssertion struct {
	Name                  string
	ConcreteType          string
	IsOriginalTypePointer bool
	Mapper                genhelpers.Mapper
}

func MapToSnowflakeObjectFieldAssertion

func MapToSnowflakeObjectFieldAssertion(field genhelpers.Field) SnowflakeObjectFieldAssertion

Jump to

Keyboard shortcuts

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