Help us shape the future of Go! Take the 2026 Go Developer Survey

types

package
v0.0.0 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2022 License: MPL-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ArrayType

type ArrayType struct {
	ItemType *TypeReference
}

func (*ArrayType) AsTypeBase

func (t *ArrayType) AsTypeBase() *TypeBase

func (*ArrayType) GetWriteOnly

func (t *ArrayType) GetWriteOnly(body interface{}) interface{}

func (*ArrayType) UnmarshalJSON

func (t *ArrayType) UnmarshalJSON(body []byte) error

func (*ArrayType) Validate

func (t *ArrayType) Validate(body interface{}, path string) []error

type BuiltInType

type BuiltInType struct {
	Kind BuiltInTypeKind `json:"Kind"`
}

func (*BuiltInType) AsTypeBase

func (t *BuiltInType) AsTypeBase() *TypeBase

func (*BuiltInType) GetWriteOnly

func (t *BuiltInType) GetWriteOnly(body interface{}) interface{}

func (*BuiltInType) Validate

func (t *BuiltInType) Validate(body interface{}, path string) []error

type BuiltInTypeKind

type BuiltInTypeKind int
const (
	Any         BuiltInTypeKind = 1
	NULL        BuiltInTypeKind = 2
	Bool        BuiltInTypeKind = 3
	Int         BuiltInTypeKind = 4
	String      BuiltInTypeKind = 5
	Object      BuiltInTypeKind = 6
	Array       BuiltInTypeKind = 7
	ResourceRef BuiltInTypeKind = 8
)

func (BuiltInTypeKind) String

func (kind BuiltInTypeKind) String() string

type DiscriminatedObjectType

type DiscriminatedObjectType struct {
	Name           string
	Discriminator  string
	BaseProperties map[string]ObjectProperty
	Elements       map[string]*TypeReference
}

func (*DiscriminatedObjectType) AsTypeBase

func (t *DiscriminatedObjectType) AsTypeBase() *TypeBase

func (*DiscriminatedObjectType) GetWriteOnly

func (t *DiscriminatedObjectType) GetWriteOnly(body interface{}) interface{}

func (*DiscriminatedObjectType) UnmarshalJSON

func (t *DiscriminatedObjectType) UnmarshalJSON(body []byte) error

func (*DiscriminatedObjectType) Validate

func (t *DiscriminatedObjectType) 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
)

func PossibleObjectPropertyFlagValues

func PossibleObjectPropertyFlagValues() []ObjectPropertyFlag

type ObjectType

type ObjectType struct {
	Name                 string
	Properties           map[string]ObjectProperty
	AdditionalProperties *TypeReference
}

func (*ObjectType) AsTypeBase

func (t *ObjectType) AsTypeBase() *TypeBase

func (*ObjectType) GetWriteOnly

func (t *ObjectType) GetWriteOnly(body interface{}) interface{}

func (*ObjectType) UnmarshalJSON

func (t *ObjectType) UnmarshalJSON(body []byte) error

func (*ObjectType) Validate

func (t *ObjectType) Validate(body interface{}, path string) []error

type ResourceFunctionType

type ResourceFunctionType struct {
	Name         string
	ResourceType string
	ApiVersion   string
	Input        *TypeReference
	Output       *TypeReference
}

func (*ResourceFunctionType) AsTypeBase

func (t *ResourceFunctionType) AsTypeBase() *TypeBase

func (*ResourceFunctionType) GetWriteOnly

func (t *ResourceFunctionType) GetWriteOnly(body interface{}) interface{}

func (*ResourceFunctionType) UnmarshalJSON

func (t *ResourceFunctionType) UnmarshalJSON(body []byte) error

func (*ResourceFunctionType) Validate

func (t *ResourceFunctionType) Validate(body interface{}, path string) []error

type ResourceType

type ResourceType struct {
	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 Schema

type Schema struct {
	Types []*TypeBase
}

func (*Schema) UnmarshalJSON

func (s *Schema) UnmarshalJSON(body []byte) error

type ScopeType

type ScopeType int
const (
	Unknown ScopeType = 0

	Tenant ScopeType = 1 << 0

	ManagementGroup ScopeType = 1 << 1

	Subscription ScopeType = 1 << 2

	ResourceGroup ScopeType = 1 << 3

	Extension ScopeType = 1 << 4
)

func PossibleScopeTypeValues

func PossibleScopeTypeValues() []ScopeType

func (ScopeType) String

func (scope ScopeType) String() string

type StringLiteralType

type StringLiteralType struct {
	Value string `json:"Value"`
}

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 TypeBase

type TypeBase interface {
	AsTypeBase() *TypeBase
	Validate(interface{}, string) []error
	GetWriteOnly(interface{}) interface{}
}

type TypeBaseKind

type TypeBaseKind string
const (
	TypeBaseKindBuiltInType             TypeBaseKind = "1"
	TypeBaseKindObjectType              TypeBaseKind = "2"
	TypeBaseKindArrayType               TypeBaseKind = "3"
	TypeBaseKindResourceType            TypeBaseKind = "4"
	TypeBaseKindUnionType               TypeBaseKind = "5"
	TypeBaseKindStringLiteralType       TypeBaseKind = "6"
	TypeBaseKindDiscriminatedObjectType TypeBaseKind = "7"
	TypeBaseKindResourceFunctionType    TypeBaseKind = "8"
)

func PossibleTypeBaseKindValues

func PossibleTypeBaseKindValues() []TypeBaseKind

type TypeReference

type TypeReference struct {
	Type      *TypeBase
	TypeIndex int
}

func (*TypeReference) UpdateType

func (t *TypeReference) UpdateType(types []*TypeBase)

type UnionType

type UnionType struct {
	Elements []*TypeReference
}

func (*UnionType) AsTypeBase

func (t *UnionType) AsTypeBase() *TypeBase

func (*UnionType) GetWriteOnly

func (t *UnionType) GetWriteOnly(body interface{}) interface{}

func (*UnionType) UnmarshalJSON

func (t *UnionType) UnmarshalJSON(body []byte) error

func (*UnionType) Validate

func (t *UnionType) Validate(body interface{}, path string) []error

Jump to

Keyboard shortcuts

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