Documentation
¶
Index ¶
- type AnyType
- type ArrayType
- type BooleanType
- type DiscriminatedObjectType
- type IntegerType
- type ObjectProperty
- type ObjectPropertyFlag
- type ObjectType
- type ResourceFunctionType
- type ResourceType
- type ResourceTypeFlag
- type Schema
- type ScopeType
- type StringLiteralType
- type StringType
- type TypeBase
- type TypeReference
- type UnionType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AnyType ¶ added in v1.13.0
type AnyType struct {
Type string `json:"$type"`
}
func (*AnyType) AsTypeBase ¶ added in v1.13.0
func (*AnyType) GetWriteOnly ¶ added in v1.13.0
func (t *AnyType) GetWriteOnly(i interface{}) interface{}
type ArrayType ¶
type ArrayType struct {
Type string `json:"$type"`
ItemType *TypeReference `json:"itemType"`
MinLength *int `json:"minLength"`
MaxLength *int `json:"maxLength"`
}
func (*ArrayType) AsTypeBase ¶
func (*ArrayType) GetWriteOnly ¶
func (t *ArrayType) GetWriteOnly(body interface{}) interface{}
type BooleanType ¶ added in v1.13.0
type BooleanType struct {
Type string `json:"$type"`
}
func (*BooleanType) AsTypeBase ¶ added in v1.13.0
func (t *BooleanType) AsTypeBase() *TypeBase
func (*BooleanType) GetWriteOnly ¶ added in v1.13.0
func (t *BooleanType) GetWriteOnly(i interface{}) interface{}
func (*BooleanType) Validate ¶ added in v1.13.0
func (t *BooleanType) Validate(body interface{}, path string) []error
type DiscriminatedObjectType ¶
type DiscriminatedObjectType struct {
Type string `json:"$type"`
Name string `json:"name"`
Discriminator string `json:"discriminator"`
BaseProperties map[string]ObjectProperty `json:"baseProperties"`
Elements map[string]*TypeReference `json:"elements"`
}
func (*DiscriminatedObjectType) AsTypeBase ¶
func (t *DiscriminatedObjectType) AsTypeBase() *TypeBase
func (*DiscriminatedObjectType) GetWriteOnly ¶
func (t *DiscriminatedObjectType) GetWriteOnly(body interface{}) interface{}
func (*DiscriminatedObjectType) Validate ¶
func (t *DiscriminatedObjectType) Validate(body interface{}, path string) []error
type IntegerType ¶ added in v1.13.0
type IntegerType struct {
Type string `json:"$type"`
MinValue *int `json:"minValue"`
MaxValue *int `json:"maxValue"`
}
func (*IntegerType) AsTypeBase ¶ added in v1.13.0
func (t *IntegerType) AsTypeBase() *TypeBase
func (*IntegerType) GetWriteOnly ¶ added in v1.13.0
func (t *IntegerType) GetWriteOnly(i interface{}) interface{}
func (*IntegerType) Validate ¶ added in v1.13.0
func (t *IntegerType) Validate(body interface{}, path string) []error
type ObjectProperty ¶
type ObjectProperty struct {
Type *TypeReference
Flags []ObjectPropertyFlag
Description *string
}
func (ObjectProperty) IsReadOnly ¶
func (o ObjectProperty) IsReadOnly() bool
func (ObjectProperty) IsRequired ¶
func (o ObjectProperty) IsRequired() bool
func (*ObjectProperty) UnmarshalJSON ¶
func (o *ObjectProperty) UnmarshalJSON(body []byte) error
type ObjectPropertyFlag ¶
type ObjectPropertyFlag int
const ( None ObjectPropertyFlag = 0 Required ObjectPropertyFlag = 1 << 0 ReadOnly ObjectPropertyFlag = 1 << 1 WriteOnly ObjectPropertyFlag = 1 << 2 DeployTimeConstant ObjectPropertyFlag = 1 << 3 Identifier ObjectPropertyFlag = 1 << 4 )
func PossibleObjectPropertyFlagValues ¶
func PossibleObjectPropertyFlagValues() []ObjectPropertyFlag
type ObjectType ¶
type ObjectType struct {
Type string `json:"$type"`
Name string `json:"name"`
Properties map[string]ObjectProperty `json:"properties"`
AdditionalProperties *TypeReference `json:"additionalProperties"`
Sensitive bool `json:"sensitive"`
}
func (*ObjectType) AsTypeBase ¶
func (t *ObjectType) AsTypeBase() *TypeBase
func (*ObjectType) GetWriteOnly ¶
func (t *ObjectType) GetWriteOnly(body interface{}) interface{}
func (*ObjectType) Validate ¶
func (t *ObjectType) Validate(body interface{}, path string) []error
type ResourceFunctionType ¶
type ResourceFunctionType struct {
Type string `json:"$type"`
Name string `json:"name"`
ResourceType string `json:"resourceType"`
ApiVersion string `json:"apiVersion"`
Input *TypeReference `json:"input"`
Output *TypeReference `json:"output"`
}
func (*ResourceFunctionType) AsTypeBase ¶
func (t *ResourceFunctionType) AsTypeBase() *TypeBase
func (*ResourceFunctionType) GetWriteOnly ¶
func (t *ResourceFunctionType) GetWriteOnly(body interface{}) interface{}
func (*ResourceFunctionType) Validate ¶
func (t *ResourceFunctionType) Validate(body interface{}, path string) []error
type ResourceType ¶
type ResourceType struct {
Type string
Name string
ScopeTypes []ScopeType
Body *TypeReference
Flags []ResourceTypeFlag
}
func (*ResourceType) AsTypeBase ¶
func (t *ResourceType) AsTypeBase() *TypeBase
func (*ResourceType) GetWriteOnly ¶
func (t *ResourceType) GetWriteOnly(body interface{}) interface{}
func (*ResourceType) IsReadOnly ¶
func (t *ResourceType) IsReadOnly() bool
func (*ResourceType) UnmarshalJSON ¶
func (t *ResourceType) UnmarshalJSON(body []byte) error
func (*ResourceType) Validate ¶
func (t *ResourceType) Validate(body interface{}, path string) []error
type ResourceTypeFlag ¶
type ResourceTypeFlag int
const ( ResourceTypeFlagNone ResourceTypeFlag = 0 ResourceTypeFlagReadOnly ResourceTypeFlag = 1 << 0 )
func PossibleResourceTypeFlagValues ¶
func PossibleResourceTypeFlagValues() []ResourceTypeFlag
type ScopeType ¶
type ScopeType int
func PossibleScopeTypeValues ¶
func PossibleScopeTypeValues() []ScopeType
type StringLiteralType ¶
func (*StringLiteralType) AsTypeBase ¶
func (t *StringLiteralType) AsTypeBase() *TypeBase
func (*StringLiteralType) GetWriteOnly ¶
func (t *StringLiteralType) GetWriteOnly(i interface{}) interface{}
func (*StringLiteralType) Validate ¶
func (t *StringLiteralType) Validate(body interface{}, path string) []error
type StringType ¶ added in v1.13.0
type StringType struct {
Type string `json:"$type"`
MinLength *int `json:"minLength"`
MaxLength *int `json:"maxLength"`
Sensitive bool `json:"sensitive"`
Pattern string `json:"pattern"`
}
func (*StringType) AsTypeBase ¶ added in v1.13.0
func (s *StringType) AsTypeBase() *TypeBase
func (*StringType) GetWriteOnly ¶ added in v1.13.0
func (s *StringType) GetWriteOnly(i interface{}) interface{}
func (*StringType) Validate ¶ added in v1.13.0
func (s *StringType) Validate(body interface{}, path string) []error
type TypeReference ¶
func (*TypeReference) UpdateType ¶
func (t *TypeReference) UpdateType(types []*TypeBase)
type UnionType ¶
type UnionType struct {
Type string `json:"$type"`
Elements []*TypeReference `json:"elements"`
}
func (*UnionType) AsTypeBase ¶
func (*UnionType) GetWriteOnly ¶
func (t *UnionType) GetWriteOnly(body interface{}) interface{}
Click to show internal directories.
Click to hide internal directories.