schema

package
v0.0.0-...-0a377e8 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2024 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CompressSchema

func CompressSchema(pkgSpec schema.PackageSpec) ([]byte, error)

func DecompressSchema

func DecompressSchema(compressedSchema []byte) ([]byte, error)

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 GetTagsProperty

func GetTagsProperty(originalSpec *jsschema.Schema) (string, bool)

func InMemoryPackageLoader

func InMemoryPackageLoader(pkgs map[string]*schema.Package) schema.Loader

InMemoryPackageLoader prevents having to fetch the schema from the provider every time which significantly speeds up codegen.

func MergeJSSchema

func MergeJSSchema(dest *jsschema.Schema, src *jsschema.Schema)

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

func NormaliseTypes

func NormaliseTypes(sch *jsschema.Schema) *jsschema.Schema

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

func (*Reports) WriteToDirectory

func (r *Reports) WriteToDirectory(dir string) error

Jump to

Keyboard shortcuts

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