generate

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2022 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Max

func Max(a, b int) int

Max returns the largest integer from two inputs

func Pad

func Pad(len int, str string) string

Pad a string with whitespace until it reaches the desired length

func Remove

func Remove(rmv, str string) string

Remove a single occurrence of a substring from an existing string if found

func TypeAppend

func TypeAppend(name, str string) string

TypeAppend will append any given name to a pre-existing type and ensure it remains a valid Go type

Types

type GeneratedHeader

type GeneratedHeader struct {
	Region  string
	Version string
	Date    string
}

GeneratedHeader contains properties used to construct the header of an auto-generated Go file

type Resource

type Resource struct {
	Generated      GeneratedHeader
	GoPackage      string
	GoImports      []string
	Type           string
	Name           string
	Documentation  string
	Properties     map[string]cfn.Property
	Attributes     map[string]cfn.Attribute
	CustomTypes    []cfn.PropertyType
	CreationPolicy string
	UpdatePolicy   string
}

Resource defines a CloudFormation resource and all of the properties required by the Go templates

type Task

type Task struct{}

Task for generating Go files based on an AWS CloudFormation specification

func (Task) Run

func (t Task) Run(ctx *context.Context) error

Run the task to generate Go files based on an AWS CloudFormation specification

func (Task) String

func (t Task) String() string

String generates a string representation of the task

Jump to

Keyboard shortcuts

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