Documentation
¶
Index ¶
- func ErrorCommon(key string, message string) error
- func ErrorMismatch(key, expected, actual string) error
- func ErrorNotMatchAny(key string) error
- func ErrorNotMatchAnyValues(key string, value string, options []string) error
- func ErrorShouldDefine(key string) error
- func ErrorShouldNotDefine(key string, options []string) error
- func ErrorShouldNotDefineReadOnly(key string) error
- type AnyType
- type ArrayType
- type BooleanType
- type ExternalDocumentation
- type MSGraphSchemaLoader
- func (r *MSGraphSchemaLoader) GetResourceDefinition(apiVersion, url string) *ResourceType
- func (r *MSGraphSchemaLoader) GetSchema(apiVersion string) *openapi3.T
- func (r *MSGraphSchemaLoader) ListAPIVersions() []string
- func (r *MSGraphSchemaLoader) ListReadableResources(apiVersion string) []ResourceType
- func (r *MSGraphSchemaLoader) ListResources(apiVersion string) []ResourceType
- type NumberType
- type ObjectProperty
- type ObjectPropertyFlag
- type ObjectType
- type ResourceType
- func (t *ResourceType) AsTypeBase() *TypeBase
- func (t *ResourceType) FilterConfigurableFields(body interface{}) interface{}
- func (t *ResourceType) FilterReadOnlyFields(i interface{}) interface{}
- func (t *ResourceType) IsReadOnly() bool
- func (t *ResourceType) UnmarshalJSON(body []byte) error
- func (t *ResourceType) Validate(body interface{}, path string) []error
- type ResourceTypeFlag
- type ScopeType
- type StringType
- type TypeBase
- type TypeReference
- type UnionType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ErrorCommon ¶
func ErrorMismatch ¶
func ErrorNotMatchAny ¶
func ErrorNotMatchAnyValues ¶
func ErrorShouldDefine ¶
func ErrorShouldNotDefine ¶
Types ¶
type AnyType ¶
func (*AnyType) AsTypeBase ¶
func (*AnyType) FilterConfigurableFields ¶
func (t *AnyType) FilterConfigurableFields(i interface{}) interface{}
func (*AnyType) FilterReadOnlyFields ¶
func (t *AnyType) FilterReadOnlyFields(i interface{}) interface{}
type ArrayType ¶
type ArrayType struct {
Type string `json:"$type"`
ItemType *TypeReference `json:"itemType"`
MinLength *uint64 `json:"minLength"`
MaxLength *uint64 `json:"maxLength"`
}
func (*ArrayType) AsTypeBase ¶
func (*ArrayType) FilterConfigurableFields ¶
func (t *ArrayType) FilterConfigurableFields(i interface{}) interface{}
func (*ArrayType) FilterReadOnlyFields ¶
func (t *ArrayType) FilterReadOnlyFields(i interface{}) interface{}
type BooleanType ¶
type BooleanType struct {
Type string `json:"$type"`
}
func (*BooleanType) AsTypeBase ¶
func (t *BooleanType) AsTypeBase() *TypeBase
func (*BooleanType) FilterConfigurableFields ¶
func (t *BooleanType) FilterConfigurableFields(i interface{}) interface{}
func (*BooleanType) FilterReadOnlyFields ¶
func (t *BooleanType) FilterReadOnlyFields(i interface{}) interface{}
func (*BooleanType) Validate ¶
func (t *BooleanType) Validate(i interface{}, s string) []error
type ExternalDocumentation ¶
type MSGraphSchemaLoader ¶
type MSGraphSchemaLoader struct {
// contains filtered or unexported fields
}
func DefaultMSGraphSchemaLoader ¶
func DefaultMSGraphSchemaLoader() *MSGraphSchemaLoader
func NewMSGraphSchemaLoader ¶
func NewMSGraphSchemaLoader(staticFiles embed.FS) *MSGraphSchemaLoader
func (*MSGraphSchemaLoader) GetResourceDefinition ¶
func (r *MSGraphSchemaLoader) GetResourceDefinition(apiVersion, url string) *ResourceType
func (*MSGraphSchemaLoader) GetSchema ¶
func (r *MSGraphSchemaLoader) GetSchema(apiVersion string) *openapi3.T
func (*MSGraphSchemaLoader) ListAPIVersions ¶
func (r *MSGraphSchemaLoader) ListAPIVersions() []string
func (*MSGraphSchemaLoader) ListReadableResources ¶
func (r *MSGraphSchemaLoader) ListReadableResources(apiVersion string) []ResourceType
func (*MSGraphSchemaLoader) ListResources ¶
func (r *MSGraphSchemaLoader) ListResources(apiVersion string) []ResourceType
type NumberType ¶
type NumberType struct {
Type string `json:"$type"`
Format string `json:"format"`
MinValue *float64 `json:"minValue"`
MaxValue *float64 `json:"maxValue"`
}
func (*NumberType) AsTypeBase ¶
func (t *NumberType) AsTypeBase() *TypeBase
func (*NumberType) FilterConfigurableFields ¶
func (t *NumberType) FilterConfigurableFields(i interface{}) interface{}
func (*NumberType) FilterReadOnlyFields ¶
func (t *NumberType) FilterReadOnlyFields(i interface{}) interface{}
func (*NumberType) Validate ¶
func (t *NumberType) Validate(body interface{}, path string) []error
type ObjectProperty ¶
type ObjectProperty struct {
Type *TypeReference
Flags []ObjectPropertyFlag
Description *string
}
func (*ObjectProperty) IsDeployTimeConstant ¶
func (o *ObjectProperty) IsDeployTimeConstant() bool
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) FilterConfigurableFields ¶
func (t *ObjectType) FilterConfigurableFields(body interface{}) interface{}
func (*ObjectType) FilterReadOnlyFields ¶
func (t *ObjectType) FilterReadOnlyFields(body interface{}) interface{}
func (*ObjectType) Validate ¶
func (t *ObjectType) Validate(body interface{}, path string) []error
type ResourceType ¶
type ResourceType struct {
Type string
Name string
Url string
Description string
ExternalDocs *ExternalDocumentation
ScopeTypes []ScopeType
ReadOnlyScopeTypes []ScopeType
Body *TypeReference
Flags []ResourceTypeFlag
}
func (*ResourceType) AsTypeBase ¶
func (t *ResourceType) AsTypeBase() *TypeBase
func (*ResourceType) FilterConfigurableFields ¶
func (t *ResourceType) FilterConfigurableFields(body interface{}) interface{}
func (*ResourceType) FilterReadOnlyFields ¶
func (t *ResourceType) FilterReadOnlyFields(i 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 StringType ¶
type StringType struct {
Type string `json:"$type"`
MinLength *uint64 `json:"minLength"`
MaxLength *uint64 `json:"maxLength"`
Sensitive bool `json:"sensitive"`
Pattern string `json:"pattern"`
Enum []string `json:"enum"`
}
func (*StringType) AsTypeBase ¶
func (s *StringType) AsTypeBase() *TypeBase
func (*StringType) FilterConfigurableFields ¶
func (s *StringType) FilterConfigurableFields(i interface{}) interface{}
func (*StringType) FilterReadOnlyFields ¶
func (s *StringType) FilterReadOnlyFields(i interface{}) interface{}
func (*StringType) Validate ¶
func (s *StringType) Validate(body interface{}, path string) []error
type TypeBase ¶
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) FilterConfigurableFields ¶
func (t *UnionType) FilterConfigurableFields(i interface{}) interface{}
func (*UnionType) FilterReadOnlyFields ¶
func (t *UnionType) FilterReadOnlyFields(i interface{}) interface{}
Click to show internal directories.
Click to hide internal directories.