gore

package
v0.2.0-alpha Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2022 License: Unlicense Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type QueryResult

type QueryResult struct {
	Completed bool
	Error     error
	Capped    bool
	CapLimit  int
	Empty     bool
}

type ResultItem

type ResultItem struct {
	Data map[string]interface{} `json:"ResultItem"`
}

func (ResultItem) Bool

func (ri ResultItem) Bool(name string) bool

func (ResultItem) Date

func (ri ResultItem) Date(name string) time.Time

func (ResultItem) Float

func (ri ResultItem) Float(name string) float64

func (ResultItem) Int

func (ri ResultItem) Int(name string) int

func (ResultItem) MarshalXML

func (ri ResultItem) MarshalXML(e *xml.Encoder, start xml.StartElement) error

map to xml

func (ResultItem) String

func (ri ResultItem) String(name string) string

type ResultSet

type ResultSet struct {
	QueryName string
	Query     QueryResult
	Results   []ResultItem
}

func (ResultSet) Export

func (rs ResultSet) Export(filename, xFmt string) (err error)

type XmlNode

type XmlNode struct {
	XMLName xml.Name
	Content []byte     `xml:",innerxml"`
	Attr    []xml.Attr `xml:",any,attr"`
	Nodes   []XmlNode  `xml:",any"`
}

func ParseXML

func ParseXML(content []byte) (nodes XmlNode, err error)

func (XmlNode) AsMap

func (n XmlNode) AsMap(mapInfo map[string]string) (info map[string]interface{})

func (XmlNode) AttrAsMap

func (n XmlNode) AttrAsMap(mapInfo map[string]string) (info map[string]interface{})

func (XmlNode) Get

func (n XmlNode) Get(name string) (node XmlNode, err error)

func (XmlNode) GetAll

func (n XmlNode) GetAll(name string) (nodes []XmlNode, err error)

func (XmlNode) GetAsMap

func (n XmlNode) GetAsMap(name string, mapInfo map[string]string) (info map[string]interface{}, err error)

Jump to

Keyboard shortcuts

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