schema

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: May 26, 2022 License: BSD-3-Clause Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckValidate

func CheckValidate(v interface{}) error

Types

type AdditionalField

type AdditionalField struct {
	xml.Attr
}

func (*AdditionalField) MarshalXMLAttr

func (a *AdditionalField) MarshalXMLAttr(_ xml.Name) (xml.Attr, error)

func (*AdditionalField) UnmarshalXMLAttr

func (a *AdditionalField) UnmarshalXMLAttr(attr xml.Attr) error

type AdditionalFields

type AdditionalFields struct {
	AdditionalFields AdditionalFieldsType `xml:",any,attr"`
	CustomElements   []AnyHolder          `xml:",any"`
}

type AdditionalFieldsType

type AdditionalFieldsType []AdditionalField

type AgDesc

type AgDesc struct {
	DescAttr *string `xml:"desc,attr,omitempty" json:"desc,omitempty"`
}

"AttributeGroup" AgDesc ...

func (*AgDesc) Validate

func (t *AgDesc) Validate() error

type AnyHolder

type AnyHolder struct {
	MModel
}

func (*AnyHolder) MarshalXML

func (a *AnyHolder) MarshalXML(e *xml.Encoder, start xml.StartElement) error

func (*AnyHolder) UnmarshalXML

func (a *AnyHolder) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

type MModel

type MModel struct {
	XMLName xml.Name
	Attr    []xml.Attr `xml:",any,attr"`
	XML     string     `xml:",innerxml"`
}

type NodeID

type NodeID struct {
	NodeID *uuid.UUID `xml:"-" json:"node_id,omitempty"`
}

NodeID используется для маппинга элементов из бд и структуры

type TAnyName

type TAnyName string

"SimpleType" base:"xs:normalizedString" TAnyName ...

func (*TAnyName) Validate

func (t *TAnyName) Validate() error

type TBaseElement

type TBaseElement struct {
	NodeID
	AdditionalFields AdditionalFieldsType `xml:",any,attr"`
	CustomElements   []AnyHolder          `xml:",any"`
}

"ComplexType" TBaseElement ...

func (*TBaseElement) Validate

func (t *TBaseElement) Validate() error

type TName

type TName string

"SimpleType" base:"tAnyName" TName ...

func (*TName) Validate

func (t *TName) Validate() error

type TNaming

type TNaming struct {
	TBaseElement
	AgDesc         // AttributeGroup
	NameAttr TName `xml:"name,attr" json:"name"`
}

"ComplexType" TNaming ...

func (*TNaming) Validate

func (t *TNaming) Validate() error

type TUnNaming

type TUnNaming struct {
	TBaseElement
	AgDesc // AttributeGroup
}

"ComplexType" TUnNaming ...

func (*TUnNaming) Validate

func (t *TUnNaming) Validate() error

type UnsignedInt

type UnsignedInt string

func (*UnsignedInt) Validate

func (u *UnsignedInt) Validate() error

type Validator

type Validator interface {
	Validate() error
}

Jump to

Keyboard shortcuts

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