Documentation ¶
Overview ¶
Package gluecf generates CloudFormation from Go objects to create AWS Glue objects.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
CatalogIDRef = cfngen.Ref{Ref: "AWS::AccountId"} // macro expand to accountId for CF
)
Functions ¶
func GenerateCloudFormation ¶
func GenerateCloudFormation(tables []*awsglue.GlueMetadata) (cf []byte, err error)
Output CloudFormation for all 'tables'
Types ¶
type Column ¶
func InferJSONColumns ¶
func InferJSONColumns(obj interface{}, customMappings ...CustomMapping) (cols []Column)
Walk object, create columns using JSON Serde expected types, allow optional custom mappings
type CustomMapping ¶
type Database ¶
type Database struct { Type string DependsOn []string `json:",omitempty"` Properties DatabaseProperties }
func NewDatabase ¶
type DatabaseInput ¶
type DatabaseInput struct { Name interface{} Description string `json:",omitempty"` }
Matches CF structure
type DatabaseProperties ¶
type DatabaseProperties struct { CatalogID interface{} `json:"CatalogId"` // required, string or Ref{}, need json tag to keep linter happy DatabaseInput DatabaseInput }
type NewTableInput ¶
type NewTableInput struct { CatalogID interface{} DatabaseName interface{} Name interface{} Description interface{} Location interface{} Columns []Column PartitionKeys []Column }
inputs to table generation functions
type StorageDescriptor ¶
type StorageDescriptor struct { InputFormat string OutputFormat string Compressed bool `json:",omitempty"` Location interface{} // required BucketColumns []Column `json:",omitempty"` SortColumns []Column `json:",omitempty"` StoredAsSubDirectories bool `json:",omitempty"` SerdeInfo SerdeInfo Columns []Column }
type Table ¶
type Table struct { Type string DependsOn []string `json:",omitempty"` Properties TableProperties }
func NewJSONLTable ¶
func NewJSONLTable(input *NewTableInput) (db *Table)
func NewParquetTable ¶
func NewParquetTable(input *NewTableInput) (db *Table)
type TableInput ¶
type TableInput struct { TableType string Name interface{} Description interface{} `json:",omitempty"` StorageDescriptor StorageDescriptor PartitionKeys []Column `json:",omitempty"` }
type TableProperties ¶
type TableProperties struct { CatalogID interface{} `json:"CatalogId"` // required, string or Ref{}, need json tag to keep linter happy DatabaseName interface{} TableInput TableInput }
Click to show internal directories.
Click to hide internal directories.