terraformgen

package
v0.0.0-...-62343dc Latest Latest
Warning

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

Go to latest
Published: May 8, 2022 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	FieldKindToType = map[reflect.Kind]string{
		reflect.Bool:    "boolean",
		reflect.String:  "string",
		reflect.Int:     "int",
		reflect.Int32:   "int",
		reflect.Int64:   "bigint",
		reflect.Float32: "float",
		reflect.Float64: "double",
	}
)

Functions

func GenerateDynamoDBTerraform

func GenerateDynamoDBTerraform()

func GenerateIonGlueTerraform

func GenerateIonGlueTerraform()

func GenerateParquetGlueTerraform

func GenerateParquetGlueTerraform()

func GetFieldTypeString

func GetFieldTypeString(fieldType reflect.Type) string

func GetIonNameTag

func GetIonNameTag(tag reflect.StructTag) (string, error)

func GetParquetNameTag

func GetParquetNameTag(tag reflect.StructTag) (string, error)

func ParquetFieldIsTimestamp

func ParquetFieldIsTimestamp(tag reflect.StructTag) bool

Types

type BaseDynamoConfig

type BaseDynamoConfig struct {
	Resources []DynamoDBTable `hcl:"resource,block"`
}

type BaseGlueConfig

type BaseGlueConfig struct {
	Resources []GlueCatalogTable `hcl:"resource,block"`
}

type Columns

type Columns struct {
	Name       string            `hcl:"name"`
	Type       string            `hcl:"type"`
	Comment    string            `hcl:"comment"`
	Parameters map[string]string `hcl:"parameters"`
}

type DynamoDBTable

type DynamoDBTable struct {
	ResourceLabel          string                   `hcl:"resource_label,label"`
	NameLabel              string                   `hcl:"name_label,label"`
	Name                   string                   `hcl:"name"`
	BillingMode            string                   `hcl:"billing_mode"`
	HashKey                string                   `hcl:"hash_key"`
	Attributes             []DynamoDBTableAttribute `hcl:"attribute,block"`
	GlobalSecondaryIndexes []GlobalSecondaryIndex   `hcl:"global_secondary_index,block"`
}

type DynamoDBTableAttribute

type DynamoDBTableAttribute struct {
	Name string `hcl:"name"`
	Type string `hcl:"type"`
}

type GlobalSecondaryIndex

type GlobalSecondaryIndex struct {
	Name           string `hcl:"name"`
	HashKey        string `hcl:"hash_key"`
	RangeKey       string `hcl:"range_key"`
	ProjectionType string `hcl:"projection_type"`
}

type GlueCatalogTable

type GlueCatalogTable struct {
	ResourceLabel     string            `hcl:"resource_label,label"`
	NameLabel         string            `hcl:"name_label,label"`
	Name              string            `hcl:"name"`
	DatabaseName      string            `hcl:"database_name"`
	TableType         string            `hcl:"table_type"`
	Parameters        map[string]string `hcl:"parameters"`
	StorageDescriptor StorageDescriptor `hcl:"storage_descriptor,block"`
	PartitionKeys     []PartitionKeys   `hcl:"partition_keys,block"`
}

func ConvertStructToIonGlueTable

func ConvertStructToIonGlueTable(obj interface{}, cloud, service, resource string) (GlueCatalogTable, error)

func ConvertStructToParquetGlueTable

func ConvertStructToParquetGlueTable(obj interface{}, cloud, service, resource string) (GlueCatalogTable, error)

type PartitionKeys

type PartitionKeys struct {
	Name string `hcl:"name"`
	Type string `hcl:"type"`
}

type SerDeInfo

type SerDeInfo struct {
	Name                 string            `hcl:"name"`
	SerializationLibrary string            `hcl:"serialization_library"`
	Parameters           map[string]string `hcl:"parameters"`
}

type StorageDescriptor

type StorageDescriptor struct {
	Location     string    `hcl:"location"`
	InputFormat  string    `hcl:"input_format"`
	OutputFormat string    `hcl:"output_format"`
	SerDeInfo    SerDeInfo `hcl:"ser_de_info,block"`
	Columns      []Columns `hcl:"columns,block"`
}

Jump to

Keyboard shortcuts

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