Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrInvalidChat = errors.New("invalid chat")
ErrInvalidChat indicates the chat extension does not conform to the schema.
Functions ¶
func ListAvailableSchemas ¶
func ListAvailableSchemas() []string
ListAvailableSchemas returns a list of all available schema names.
func ValidateAgainstSchema ¶
ValidateAgainstSchema validates XML against a named schema.
func ValidateChat ¶
ValidateChat parses and validates a __chat extension.
Types ¶
type ChatSchema ¶
type ChatSchema struct {
XMLName xml.Name `xml:"__chat"`
ID string `xml:"id,attr,omitempty"`
Message string `xml:"message,attr"`
Sender string `xml:"sender,attr"`
}
ChatSchema defines the expected attributes for the __chat extension.
Click to show internal directories.
Click to hide internal directories.