schema

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2021 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 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 ComplexType1

type ComplexType1 struct {
	NodeID
	*TIEDNameOrNone `xml:",chardata" json:",omitempty"`
	TypeAttr        TAnyName        `xml:"type,attr" json:"type"`
	Type2Attr       *TIEDNameOrNone `xml:"type2,attr,omitempty" json:"type2,omitempty"`
}

"ComplexType" ComplexType1 ...

func (*ComplexType1) Validate

func (t *ComplexType1) Validate() 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 SCL

type SCL struct {
	TBaseElement
	ComplexType1 []ComplexType1 `xml:"ComplexType1" json:"ComplexType1"`
}

"ComplexType" SCL ...

func (*SCL) Validate

func (t *SCL) Validate() error

type TAcsiName

type TAcsiName string

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

func (*TAcsiName) Validate

func (t *TAcsiName) Validate() error

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"`
	Text             *string              `xml:"Text" json:"Text"`
}

"Element"// "Element"// "ComplexType" TBaseElement ...

func (*TBaseElement) Validate

func (t *TBaseElement) Validate() error

type TIEDName

type TIEDName string

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

func (*TIEDName) Validate

func (t *TIEDName) Validate() error

type TIEDNameIsNone

type TIEDNameIsNone string

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

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 UnionContent added in v1.0.2

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

func (UnionContent) MarshalJSON added in v1.0.2

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

func (UnionContent) String added in v1.0.2

func (u UnionContent) String() string

func (*UnionContent) UnmarshalJSON added in v1.0.2

func (u *UnionContent) UnmarshalJSON(v []byte) 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