Documentation ¶
Index ¶
- func CompressSchema(pkgSpec schema.PackageSpec) ([]byte, error)
- func DecompressSchema(compressedSchema []byte) ([]byte, error)
- func FlattenJSSchema(sch *jsschema.Schema) jsschema.SchemaList
- func GatherSemantics(schemaDir string) (metadata.SemanticsSpecDocument, error)
- func GetInputsFromState(res *metadata.CloudAPIResource, state resource.PropertyMap) (resource.PropertyMap, error)
- func GetTagsProperty(originalSpec *jsschema.Schema) (string, bool)
- func InMemoryPackageLoader(pkgs map[string]*schema.Package) schema.Loader
- func MergeJSSchema(dest *jsschema.Schema, src *jsschema.Schema)
- func NormaliseTypes(sch *jsschema.Schema) *jsschema.Schema
- type Reports
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CompressSchema ¶
func CompressSchema(pkgSpec schema.PackageSpec) ([]byte, error)
func DecompressSchema ¶
func FlattenJSSchema ¶
func FlattenJSSchema(sch *jsschema.Schema) jsschema.SchemaList
FlattenJSSchema recursively flattens a schema containing AnyOf or OneOf into a list of schemas Note: this only performs a shallow copy, don't use in situations where schema fields may be mutated. TODO(https://github.com/pulumi/pulumi-aws-native/issues/992): this should flatten AllOf as well.
func GatherSemantics ¶
func GatherSemantics(schemaDir string) (metadata.SemanticsSpecDocument, error)
func GetInputsFromState ¶
func GetInputsFromState(res *metadata.CloudAPIResource, state resource.PropertyMap) (resource.PropertyMap, error)
func InMemoryPackageLoader ¶
InMemoryPackageLoader prevents having to fetch the schema from the provider every time which significantly speeds up codegen.
func MergeJSSchema ¶
MergeJSSchema overlays the contents of src into dest to merge the values of the fields Note: This only does a shallow copy of src fields, don't use where schemas maybe mutated
Types ¶
type Reports ¶
type Reports struct { // UnexpectedTagsShapes is a map of the resource token of resources which have a `Tags` field but don't match an expected pattern. UnexpectedTagsShapes map[string]interface{} // MissedAutonaming is a map of the resource token of resources we haven't identified as autonameable. MissedAutonaming map[string]interface{} }
func GatherPackage ¶
func GatherPackage(supportedResourceTypes []string, jsonSchemas []*jsschema.Schema, genAll bool, semanticsDocument *metadata.SemanticsSpecDocument) (*pschema.PackageSpec, *metadata.CloudAPIMetadata, *Reports, error)
GatherPackage builds a package spec based on the provided CF JSON schemas.
func NewReports ¶
func NewReports() *Reports