An open API service providing package, version and dependency metadata of many open source software ecosystems and registries.

Top 4.5% on proxy.golang.org
Top 5.7% dependent packages on proxy.golang.org
Top 3.5% dependent repos on proxy.golang.org
Top 4.2% forks on proxy.golang.org

proxy.golang.org : github.com/crewjam/go-cloudformation

Package cloudformation provides a schema and related functions that allow you to reason about cloudformation template documents. Parsing example: Producing Example: See the examples directory for a more complete example of producing a cloudformation template from code. As far as I can tell, AWS do not produce a structured document that describes the Cloudformation schema. The names and types for the various resources and objects are derived from scraping their HTML documentation (see scraper/). It is mostly, but not entirely, complete. I've noticed several inconsistencies in the documentation which suggests that it is constructed by hand. If you run into problems, please submit a bug (or better yet, a pull request). Top level objects in Cloudformation are called resources. They have names like AWS::S3::Bucket and appear as values in the "Resources" mapping. We remove the punctuation from the name to derive a golang structure name like S3Bucket. There other non-resource structures that are refered to either by resources or by other structures. These objects have names with spaces like "Amazon S3 Versioning Configuration". To derive a golang type name the non-letter characters are removed to get S3VersioningConfiguration. Cloudformation uses three scalar types: string, int and bool. When they appear as properties we represent them as *StringExpr, *IntegerExpr, and *BoolExpr respectively. These types reflect that fact that a scalar type could be a literal string, int or bool, or could be a JSON dictionary representing a function call. (The *Expr structs have custom MarshalJSON and UnmarshalJSON that account for this) Another vagary of the cloudformation language is that in cases where a list of objects is expects, a single object can provided. To account for this, whenever a list of objects appears, a custom type *WhateverList is used. This allows us to add a custom UnmarshalJSON which transforms an object into a list containing an object.

Registry - Source - Documentation - JSON
purl: pkg:golang/github.com/crewjam/go-cloudformation
License: BSD-2-Clause
Latest release: almost 7 years ago
First release: over 8 years ago
Namespace: github.com/crewjam
Dependent packages: 1
Dependent repositories: 2
Stars: 103 on GitHub
Forks: 30 on GitHub
See more repository details: repos.ecosyste.ms
Last synced: about 2 months ago

    Loading...
    Readme
    Loading...