Documentation
¶
Index ¶
- func Load(url string, fromFile bool) (doc *xml.XmlDocument, err error)
- type Collection
- func (col *Collection) Close()
- func (col *Collection) Init()
- func (col Collection) Long(maxColWidth uint)
- func (col *Collection) Search(searchPredicate func(string, string) string, key string, pattern string) Elements
- func (col *Collection) SearchFuzzy(pattern string) Elements
- func (col *Collection) SearchFuzzyUnique(pattern string) (Element, error)
- func (col *Collection) SearchStrict(pattern string) Elements
- func (col *Collection) SearchStrictUnique(pattern string) (Element, error)
- func (col *Collection) SearchStrictUniqueByKey(key string, pattern string) (Element, error)
- func (col *Collection) SearchXpathFuzzy(key string, pattern string) string
- func (col *Collection) SearchXpathStrict(key string, pattern string) string
- func (col Collection) Short()
- func (c Collection) Xml()
- type DescCollection
- type DescElement
- type Element
- type Elements
- type File
- type Format
- type LongFormatFn
- type LongFormatXpaths
- type LongFormatter
- type Remote
- type Shower
- type Sourcer
- type Webui
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Collection ¶
type Collection struct { Url string // contains filtered or unexported fields }
A Collection describes and contains a list of Elements.
func LoadCollection ¶
func LoadCollection(descCol DescCollection, args []string) (Collection, error)
func (*Collection) Close ¶
func (col *Collection) Close()
func (*Collection) Init ¶
func (col *Collection) Init()
func (Collection) Long ¶
func (col Collection) Long(maxColWidth uint)
func (*Collection) SearchFuzzy ¶
func (col *Collection) SearchFuzzy(pattern string) Elements
func (*Collection) SearchFuzzyUnique ¶
func (col *Collection) SearchFuzzyUnique(pattern string) (Element, error)
func (*Collection) SearchStrict ¶
func (col *Collection) SearchStrict(pattern string) Elements
func (*Collection) SearchStrictUnique ¶
func (col *Collection) SearchStrictUnique(pattern string) (Element, error)
func (*Collection) SearchStrictUniqueByKey ¶
func (col *Collection) SearchStrictUniqueByKey(key string, pattern string) (Element, error)
func (*Collection) SearchXpathFuzzy ¶
func (col *Collection) SearchXpathFuzzy(key string, pattern string) string
If key == "", the PrimaryField is used
func (*Collection) SearchXpathStrict ¶
func (col *Collection) SearchXpathStrict(key string, pattern string) string
If key == "", the PrimaryField is used
func (Collection) Short ¶
func (col Collection) Short()
func (Collection) Xml ¶
func (c Collection) Xml()
type DescCollection ¶
type DescCollection struct { // Names of arguments required from the user to get datas from // introspect PageArgs []string // A function that takes the list of arguments specified by // the user PageBuilder (func([]string) Sourcer) // The root Xpath BaseXpath string // Description of Collection's Elements DescElt DescElement // Name of the attribute used to search in the collection PrimaryField string }
This contains informations to generate and query a Collection
type DescElement ¶
type DescElement struct { // Xpath used to generate the short version of an element ShortDetailXpath string // Used to generate the long version of an element LongDetail LongFormatter }
type File ¶
type File struct {
Path string
}
func (File) Load ¶
func (file File) Load(descCol DescCollection) (Collection, error)
type LongFormatFn ¶
func (LongFormatFn) LongFormat ¶
func (fn LongFormatFn) LongFormat(table *uitable.Table, format Format, e Element)
type LongFormatXpaths ¶
type LongFormatXpaths []string
func (LongFormatXpaths) LongFormat ¶
func (xpaths LongFormatXpaths) LongFormat(table *uitable.Table, format Format, e Element)
type LongFormatter ¶
This is used to show the long version of an Element.
type Remote ¶
func (Remote) Load ¶
func (page Remote) Load(descCol DescCollection) (Collection, error)
type Shower ¶
type Shower interface { Long(maxColWidth uint) Short() Xml() }
Several representations of resources
type Sourcer ¶
type Sourcer interface {
Load(descCol DescCollection) (Collection, error)
}
Click to show internal directories.
Click to hide internal directories.