forked from crewjam/go-cloudformation
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Usage: `go test -v ./scraper/.` will generate updated: * schema.go * schema.json files in the package root
- Loading branch information
Showing
2 changed files
with
496 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
package scraper | ||
|
||
// See: | ||
// * http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/cfn-resource-specification-format.html and | ||
// * http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/cfn-resource-specification.html | ||
// for more information | ||
|
||
// CloudFormationSchema represents the root of the | ||
// schema | ||
type CloudFormationSchema struct { | ||
PropertyTypes map[string]PropertyTypes | ||
ResourceTypes map[string]ResourceTypes | ||
ResourceSpecificationVersion string | ||
} | ||
|
||
// PropertyTypes is a definition of a property | ||
type PropertyTypes struct { | ||
Documentation string | ||
Properties map[string]PropertyTypeDefinition | ||
} | ||
|
||
// ResourceTypes is a definition of a resource | ||
type ResourceTypes struct { | ||
Documentation string | ||
Attributes map[string]ResourceAttribute | ||
Properties map[string]PropertyTypeDefinition | ||
} | ||
|
||
// ResourceAttribute are outputs of CloudFormation | ||
// reosurce | ||
type ResourceAttribute struct { | ||
PrimitiveType string | ||
} | ||
|
||
// PropertyTypeDefinition is the definition of a property | ||
type PropertyTypeDefinition struct { | ||
Required bool | ||
Documentation string | ||
PrimitiveType string | ||
UpdateType string | ||
Type string | ||
DuplicatesAllowed bool | ||
ItemType string | ||
PrimitiveItemType string | ||
} |
Oops, something went wrong.