Documentation
¶
Index ¶
- type Property
- type Schema
- type Type
- type UnprocessedDefinition
- type UnprocessedEnum
- func (ue *UnprocessedEnum) CanBeFloat64() bool
- func (ue *UnprocessedEnum) CanBeInt64() bool
- func (ue *UnprocessedEnum) CanBeString() bool
- func (ue *UnprocessedEnum) IsSet() bool
- func (ue *UnprocessedEnum) MaybeFloat64() []float64
- func (ue *UnprocessedEnum) MaybeInt64() []int64
- func (ue *UnprocessedEnum) MaybeString() []string
- func (ue *UnprocessedEnum) UnmarshalJSON(bytes []byte) error
- type UnprocessedHandlers
- type UnprocessedHandlersOperation
- type UnprocessedRelationshipRef
- type UnprocessedResourceLink
- type UnprocessedTagging
- type UnprocessedTopLevelResource
- type Validation
- type ValidationArray
- type ValidationNumber
- type ValidationSingle
- type ValidationString
- type ValidationStructuredType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Property ¶
type Property struct { Name string Validation *Validation }
Property describes a property of either a top-level resource or structured type.
type Schema ¶
type Schema struct { UnprocessedByFileName map[string]*UnprocessedTopLevelResource TopLevelResourceTypes map[string]*Type StructuredTypes map[string]*Type }
Schema describes the CloudFormation JSON schema.
func NewSchemaFromBuffer ¶
NewSchemaFromBuffer parses and validates a CloudFormation JSON schema from the given buffer (i.e. "CloudFormationSchema.zip" file).
type Type ¶
type Type struct { IsTopLevelResourceType bool Name string Description string Properties map[string]*Property }
Type describes either a top-level resource type or a structured type.
type UnprocessedDefinition ¶
type UnprocessedDefinition struct { AdditionalProperties bool `json:"additionalProperties,omitempty"` AllOf any `json:"allOf,omitempty"` AnyOf any `json:"anyOf,omitempty"` ArrayType string `json:"arrayType,omitempty"` Comment string `json:"$comment,omitempty"` Const string `json:"const,omitempty"` Default any `json:"default,omitempty"` // If specified, it is a value of "type". Dependencies map[string][]string `json:"dependencies,omitempty"` Description string `json:"description,omitempty"` Enum *UnprocessedEnum `json:"enum,omitempty"` Examples any `json:"examples,omitempty"` Format string `json:"format,omitempty"` InsertionOrder *bool `json:"insertionOrder,omitempty"` Items *UnprocessedDefinition `json:"items,omitempty"` MaxItems *int `json:"maxItems,omitempty"` MaxLength *int `json:"maxLength,omitempty"` MaxProperties *int `json:"maxProperties,omitempty"` Maximum *json.Number `json:"maximum,omitempty"` MinItems *int `json:"minItems,omitempty"` MinLength *int `json:"minLength,omitempty"` MinProperties *int `json:"minProperties,omitempty"` Minimum *json.Number `json:"minimum,omitempty"` MultipleOf *json.Number `json:"multipleOf,omitempty"` OneOf []*UnprocessedDefinition `json:"oneOf,omitempty"` Pattern *string `json:"pattern,omitempty"` PatternProperties map[string]*UnprocessedDefinition `json:"patternProperties,omitempty"` Properties map[string]*UnprocessedDefinition `json:"properties,omitempty"` Ref *string `json:"$ref,omitempty"` RelationshipRef *UnprocessedRelationshipRef `json:"relationshipRef,omitempty"` Required []string `json:"required,omitempty"` Title string `json:"title,omitempty"` Type any `json:"type,omitempty"` // This can be string or []string. UniqueItems *bool `json:"uniqueItems,omitempty"` }
UnprocessedDefinition describes part of the CloudFormation JSON schema.
type UnprocessedEnum ¶
type UnprocessedEnum struct {
// contains filtered or unexported fields
}
UnprocessedEnum describes part of the CloudFormation JSON schema for a resource.
func (*UnprocessedEnum) CanBeFloat64 ¶
func (ue *UnprocessedEnum) CanBeFloat64() bool
CanBeFloat64 returns true if the enum is set and can be parsed as []float64.
func (*UnprocessedEnum) CanBeInt64 ¶
func (ue *UnprocessedEnum) CanBeInt64() bool
CanBeInt64 returns true if the enum is set and can be parsed as []int64.
func (*UnprocessedEnum) CanBeString ¶
func (ue *UnprocessedEnum) CanBeString() bool
CanBeString returns true if the enum is set and can be parsed as []string.
func (*UnprocessedEnum) IsSet ¶
func (ue *UnprocessedEnum) IsSet() bool
IsSet returns true if the enum was set in the schema.
func (*UnprocessedEnum) MaybeFloat64 ¶
func (ue *UnprocessedEnum) MaybeFloat64() []float64
MaybeFloat64 returns the enum as []float64 if possible.
func (*UnprocessedEnum) MaybeInt64 ¶
func (ue *UnprocessedEnum) MaybeInt64() []int64
MaybeInt64 returns the enum as []int64 if possible.
func (*UnprocessedEnum) MaybeString ¶
func (ue *UnprocessedEnum) MaybeString() []string
MaybeString returns the enum as []string if possible.
func (*UnprocessedEnum) UnmarshalJSON ¶
func (ue *UnprocessedEnum) UnmarshalJSON(bytes []byte) error
UnmarshalJSON implements the json.Unmarshaler interface.
type UnprocessedHandlers ¶
type UnprocessedHandlers struct { Create *UnprocessedHandlersOperation `json:"create,omitempty"` Delete *UnprocessedHandlersOperation `json:"delete,omitempty"` List *UnprocessedHandlersOperation `json:"list,omitempty"` Read *UnprocessedHandlersOperation `json:"read,omitempty"` Update *UnprocessedHandlersOperation `json:"update,omitempty"` }
UnprocessedHandlers describes part of the CloudFormation JSON schema for a resource.
type UnprocessedHandlersOperation ¶
type UnprocessedHandlersOperation struct { HandlerSchema *UnprocessedDefinition `json:"handlerSchema,omitempty"` Permissions []string `json:"permissions,omitempty"` TimeoutInMinutes *int `json:"timeoutInMinutes,omitempty"` }
UnprocessedHandlersOperation describes part of the CloudFormation JSON schema for a resource.
type UnprocessedRelationshipRef ¶
type UnprocessedRelationshipRef struct { TypeName string `json:"typeName,omitempty"` PropertyPath string `json:"propertyPath,omitempty"` }
UnprocessedRelationshipRef describes part of the CloudFormation JSON schema.
type UnprocessedResourceLink ¶
type UnprocessedResourceLink struct { Mappings map[string]string `json:"mappings,omitempty"` TemplateURI string `json:"templateUri,omitempty"` }
UnprocessedResourceLink describes part of the CloudFormation JSON schema.
type UnprocessedTagging ¶
type UnprocessedTagging struct { CloudFormationSystemTags bool `json:"cloudFormationSystemTags,omitempty"` Permissions []string `json:"permissions,omitempty"` TagOnCreate bool `json:"tagOnCreate,omitempty"` TagProperty string `json:"tagProperty,omitempty"` TagUpdatable bool `json:"tagUpdatable,omitempty"` Taggable bool `json:"taggable,omitempty"` }
UnprocessedTagging describes part of the CloudFormation JSON schema for a resource.
type UnprocessedTopLevelResource ¶
type UnprocessedTopLevelResource struct { AdditionalIdentifiers [][]string `json:"additionalIdentifiers,omitempty"` AdditionalProperties bool `json:"additionalProperties,omitempty"` AllOf any `json:"allOf,omitempty"` // TODO(ibrt): Type. AnyOf any `json:"anyOf,omitempty"` // TODO(ibrt): Type. Comment string `json:"$comment,omitempty"` ConditionalCreatOnlyProperties []string `json:"conditionalCreateOnlyProperties,omitempty"` CreateOnlyProperties []string `json:"createOnlyProperties,omitempty"` Definitions map[string]*UnprocessedDefinition `json:"definitions,omitempty"` DeprecatedProperties []string `json:"deprecatedProperties,omitempty"` Description string `json:"description,omitempty"` DocumentationURL string `json:"documentationUrl,omitempty"` Handlers *UnprocessedHandlers `json:"handlers,omitempty"` OneOf []*UnprocessedDefinition `json:"oneOf,omitempty"` PrimaryIdentifier []string `json:"primaryIdentifier,omitempty"` Properties map[string]*UnprocessedDefinition `json:"properties,omitempty"` PropertyTransform map[string]string `json:"propertyTransform,omitempty"` ReadOnlyProperties []string `json:"readOnlyProperties,omitempty"` ReplacementStrategy string `json:"replacementStrategy,omitempty"` Required []string `json:"required,omitempty"` ResourceLink *UnprocessedResourceLink `json:"resourceLink,omitempty"` Schema string `json:"$schema,omitempty"` SourceURL string `json:"sourceUrl,omitempty"` Taggable bool `json:"taggable,omitempty"` Tagging *UnprocessedTagging `json:"tagging,omitempty"` TypeName string `json:"typeName,omitempty"` WriteOnlyProperties []string `json:"writeOnlyProperties,omitempty"` }
UnprocessedTopLevelResource describes part of the CloudFormation JSON schema.
type Validation ¶
type Validation struct { Single *ValidationSingle Array *ValidationArray }
Validation describes a value.
type ValidationArray ¶
type ValidationArray struct { MinItems *int MaxItems *int InsertionOrder *bool UniqueItems *bool Items *Validation }
ValidationArray describes an array.
type ValidationNumber ¶
ValidationNumber describes a number value.
type ValidationSingle ¶
type ValidationSingle struct { String *ValidationString Int64 *ValidationNumber[int64] Float64 *ValidationNumber[float64] Structured *ValidationStructuredType }
ValidationSingle describes a single value.
type ValidationString ¶
type ValidationString struct { MinLength *int MaxLength *int Pattern *string Format *string Enum []string }
ValidationString describes a string value.
type ValidationStructuredType ¶
type ValidationStructuredType struct {
StructuredTypeName string
}
ValidationStructuredType describe a structured type value.