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: 8 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 TAcsiName

type TAcsiName string

"SimpleType" base:"xs:Name" TAcsiName ...

func (*TAcsiName) String added in v1.0.3

func (t *TAcsiName) String() string

func (*TAcsiName) Validate

func (t *TAcsiName) Validate() error

type TAnyContentFromOtherNamespace

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

"ComplexType" TAnyContentFromOtherNamespace ...

func (*TAnyContentFromOtherNamespace) Validate

func (t *TAnyContentFromOtherNamespace) Validate() error

type TBaseElement

type TBaseElement struct {
	NodeID
	AdditionalFields AdditionalFieldsType `xml:",any,attr" json:"-"`
	CustomElements   []AnyHolder          `xml:",any" json:"-"`
	Text             *TText               `xml:"Text" json:"Text,omitempty"`
	Private          []TPrivate           `xml:"Private" json:"Private,omitempty"`
}

"ComplexType" TBaseElement ...

func (*TBaseElement) Validate

func (t *TBaseElement) Validate() error

type TID

type TID string

"SimpleType" base:"xs:token" TID ...

func (*TID) String added in v1.0.3

func (t *TID) String() string

func (*TID) Validate

func (t *TID) Validate() error

type TIDNaming

type TIDNaming struct {
	TBaseElement
	AgDesc     // AttributeGroup
	IdAttr TID `xml:"id,attr" json:"id"`
}

"ComplexType" TIDNaming ...

func (*TIDNaming) Validate

func (t *TIDNaming) Validate() error

type TIEDName

type TIEDName string

"SimpleType" base:"tAcsiName" TIEDName ...

func (*TIEDName) String added in v1.0.3

func (t *TIEDName) String() string

func (*TIEDName) Validate

func (t *TIEDName) Validate() error

type TIEDNameIsNone

type TIEDNameIsNone string

"SimpleType" base:"tAcsiName" TIEDNameIsNone ...

func (*TIEDNameIsNone) String added in v1.0.3

func (t *TIEDNameIsNone) String() string

func (*TIEDNameIsNone) Validate

func (t *TIEDNameIsNone) Validate() error

type TIEDNameOrNone

type TIEDNameOrNone struct {
	UnionContent
	// contains filtered or unexported fields
}

"SimpleType" TIEDNameOrNone is UNION type

func (*TIEDNameOrNone) IsEmpty

func (t *TIEDNameOrNone) IsEmpty() bool

func (*TIEDNameOrNone) MarshalXMLAttr

func (t *TIEDNameOrNone) MarshalXMLAttr(name xml.Name) (xml.Attr, error)

func (*TIEDNameOrNone) UnmarshalXMLAttr

func (t *TIEDNameOrNone) UnmarshalXMLAttr(attr xml.Attr) error

func (*TIEDNameOrNone) Validate

func (t *TIEDNameOrNone) Validate() error

type TPrivate

type TPrivate struct {
	TAnyContentFromOtherNamespace
	TypesssAttr *string                      `xml:"typesss,attr,omitempty" json:"typesss,omitempty"`
	NameAttr    *TIEDName                    `xml:"name,attr,omitempty" json:"name,omitempty"`
	TypeAttr    TPrivateTypeNormalizedString `xml:"type,attr" json:"type"`
	SourceAttr  string                       `xml:"source,attr" json:"source"`
}

"ComplexType" TPrivate ...

func (*TPrivate) Validate

func (t *TPrivate) Validate() error

type TPrivateTypeNormalizedString

type TPrivateTypeNormalizedString string

"SimpleType" base:"xs:normalizedString" TPrivateTypeNormalizedString ...

func (*TPrivateTypeNormalizedString) String added in v1.0.3

func (*TPrivateTypeNormalizedString) Validate

func (t *TPrivateTypeNormalizedString) Validate() error

type TText

type TText struct {
	TAnyContentFromOtherNamespace
	SourceAttr *string `xml:"source,attr,omitempty" json:"source,omitempty"`
}

"ComplexType" TText ...

func (*TText) Validate

func (t *TText) Validate() error

type TVal

type TVal struct {
	NodeID
	Content    string  `xml:",chardata" json:",omitempty"`
	SGroupAttr *uint32 `xml:"sGroup,attr,omitempty" json:"sGroup,omitempty"`
}

"ComplexType" TVal ...

func (*TVal) Validate

func (t *TVal) Validate() error

type UnionContent added in v1.0.3

type UnionContent struct {
	Content string `xml:",chardata" json:",omitempty"`
}

func (UnionContent) MarshalJSON added in v1.0.3

func (u UnionContent) MarshalJSON() ([]byte, error)

func (UnionContent) String added in v1.0.3

func (u UnionContent) String() string

func (*UnionContent) UnmarshalJSON added in v1.0.3

func (u *UnionContent) UnmarshalJSON(v []byte) error

type UnitSlice added in v1.0.3

type UnitSlice struct {
	NodeID
	Content string `xml:",chardata" json:",omitempty"`
}

"ComplexType" UnitSlice - хак чтобы побороть []uint32

func (*UnitSlice) CreateElement added in v1.0.3

func (t *UnitSlice) CreateElement(xmlTag string, level, pos uint, parentEl *Element) (*Element, 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