xml

package
v0.0.0-...-c43757c Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2022 License: GPL-2.0 Imports: 1 Imported by: 0

README

xml - tools for decoding data written in xml

based on xml-schema and dtd.

Files covered:

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CatMetadata

type CatMetadata struct {
	XMLName         xml.Name          `xml:"catmetadata"`
	LongDescription []longDescription `xml:"longdescription"`
}

type Glsa

type Glsa struct {
	XMLName  xml.Name `xml:"glsa"`
	Id       string   `xml:"id,attr"`
	Title    string   `xml:"title"`
	Synopsis string   `xml:"synopsis"`
	Product  struct {
		XMLName xml.Name `xml:"product"`
		Type    string   `xml:"type,attr"` // (ebuild,informational,infrastructure)
		Content string   `xml:",chardata"`
	} `xml:"product"` //
	Announced string `xml:"announced"`
	Revised   struct {
		XMLName xml.Name `xml:"revised"`
		Count   int      `xml:"count,attr"`
		Content string   `xml:"content"`
	} `xml:"revised"`
	Bug      []uint `xml:"bug"`
	Access   string `xml:"access"` /*?*/
	Affected struct {
		XMLName xml.Name `xml:"affected"`
		Package []struct {
			XMLName   xml.Name `xml:"package"`
			Name      string   `xml:"name,attr"`
			Auto      string   `xml:"auto,attr"`
			Arch      string   `xml:"arch,attr"`
			Vunerable struct {
				XMLName xml.Name `xml:"vunerable"`
				Range   string   `xml:"range,attr"` // (le|lt|eq|gt|ge|rlt|rle|rgt|rge)
				Slot    string   `xml:"slot,attr"`  // default "*"
				Content string   `xml:",chardata"`
			} `xml:"vunerable"`
			Unaffected struct {
				XMLName xml.Name `xml:"vunerable"`
				Range   string   `xml:"range,attr"` // (le|lt|eq|gt|ge|rlt|rle|rgt|rge)
				Slot    string   `xml:"slot,attr"`  // default "*"
				Name    string   `xml:"name,attr"`
				Content string   `xml:",chardata"`
			} `xml:"unaffected"`
		} `xml:"package"` // when product@type = ( 'ebuild' || 'portage' )
		Service []struct {
			XMLName xml.Name `xml:"service"`
			Type    string   `xml:"type,attr"`  // (rsync|web|mirror)
			Fixed   string   `xml:"fixed,attr"` // (yes|no)
			Content string   `xml:",chardata"`
		} `xml:"service"` // when product@type = 'infrastructure'
	} `xml:"affected"`
	Background  xhtml_thingy `xml:"background"` /*?*/
	Description xhtml_thingy `xml:"description"`
	Impact      xhtml_thingy `xml:"impact"`
	Workaround  xhtml_thingy `xml:"workaround"`
	Resolution  xhtml_thingy `xml:"resolution"`
	References  []uri        `xml:"references"`
	// License /*? EMPTY */ `xml:"license"`
	Metadata struct {
		Tag       string `xml:"tag,attr"`
		Revision  string `xml:"revision,attr"`
		Author    string `xml:"author,attr"`
		Timestamp string `xml:"timestamp,attr"`
	} `xml:"metadata"`
}

type Mirrors

type Mirrors struct {
	XMLName     xml.Name `xml:"mirrors"`
	Mirrorgroup []struct {
		XMLName     xml.Name `xml:"mirrorgroup"`
		Region      string   `xml:"region,attr"`
		Country     string   `xml:"country,attr"`
		CountryName string   `xml:"countryname,attr"`
		Mirror      []struct {
			XMLName     xml.Name `xml:"mirror"`
			City        string   `xml:"city,attr"`
			Coordinates string   `xml:"coordinates,attr"`
			GentooBug   string   `xml:"gentoo-bug,attr"`
			Name        string   `xml:"name"`
			Uri         []struct {
				XMLName  xml.Name `xml:"uri"`
				IPv4     string   `xml:"ipv4,attr"`     // (Y|y|N|n) default "y"
				IPv6     string   `xml:"ipv6,attr"`     // (Y|y|N|n) default "n"
				Partial  string   `xml:"partial,attr"`  // (Y|y|N|n) default "n"
				Protocol string   `xml:"protocol,attr"` // (http|ftp|rsync) default "http"
			} `xml:"uri"`
		} `xml:"mirror"`
	} `xml:"mirrorgroup"`
}

type PkgMetadata

type PkgMetadata struct {
	XMLName         xml.Name          `xml:"pkgmetadata"`
	LongDescription []longDescription `xml:"longdescription"`
	Maintainer      []struct {
		XMLName     xml.Name `xml:"maintainer"`
		Restrict    string   `xml:"restrict,attr"`
		Type        string   `xml:"type,attr"`    // (person|project|unknown) "unknown"
		Proxied     string   `xml:"proxied,attr"` // (yes|no|proxy) "no"
		Email       string   `xml:"email"`
		Name        string   `xml:"name"`
		Description struct {
			XMLName xml.Name `xml:"description"`
			Lang    string   `xml:"lang,attr"`
			Content string   `xml:",chardata"`
		} `xml:"description"`
	} `xml:"maintainer"`
	Slots []struct {
		XMLName xml.Name `xml:"slots"`
		Lang    string   `xml:"lang,attr"`
		Slot    []struct {
			XMLName xml.Name `xml:"slot"`
			Name    string   `xml:"name,attr"`
		} `xml:"slot"`
		SubSlot string `xml:"subslot"`
	} `xml:"slots"`
	// StabilizeAllArches ??? {
	// 	XMLName  xml.Name `xml:"stabilize-allarches"`
	// 	Restrict string   `xml:"restrict,attr"`
	// } `xml:"stabilize-allarches"`
	Use []struct {
		XMLName xml.Name `xml:"use"`
		Lang    string   `xml:"lang,attr"`
		Flag    []struct {
			XMLName  xml.Name `xml:"flag"`
			Name     string   `xml:"name,attr"`
			Restrict string   `xml:"restrict,attr"`
			Content  string   `xml:",chardata"`
		} `xml:"flag"`
	} `xml:"use"`
	Upstream struct {
		Maintainer []struct {
			XMLName  xml.Name `xml:"maintainer"`
			Status   string   `xml:"status,attr"`
			Restrict string   `xml:"restrict,attr"`
			Name     string   `xml:"name"`
			Email    string   `xml:"email"`
		} `xml:"maintainer"`
		Changelog string `xml:"changelog"`
		Doc       []struct {
			XMLName xml.Name `xml:"doc"`
			Lang    string   `xml:"lang,attr"`
			Content string   `xml:",chardata"`
		} `xml:"doc"`
		BugsTo   string `xml:"bugs-to"`
		RemoteID []struct {
			XMLName xml.Name `xml:"remote-id"`
			Type    string   `xml:"type,attr"` // (bitbucket|cpan|cpan-module|cpe|cran|ctan|gentoo|github|gitlab|google-code|hackage|heptapod|launchpad|osdn|pear|pecl|pypi|rubygems|sourceforge|sourcehut|vim)
			Content string   `xml:",chardata"`
		} `xml:"remote-id"`
	} `xml:"upstream"`
}

type Projects

type Projects struct {
	XMLName xml.Name `xml:"projects"`
	Project []struct {
		XMLName     xml.Name `xml:"project"`
		Email       string   `xml:"email"`
		Name        string   `xml:"name"`
		Url         string   `xml:"url"`
		Description string   `xml:"description"`
		Subproject  []struct {
			XMLName        xml.Name `xml:"subproject"`
			InheritMembers bool     `xml:"inherit-members,attr"` // (0|1) default "0"
			Ref            string   `xml:"ref,attr"`
			Content        string   `xml:",chardata"`
		} `xml:"subproject"`
		Member []struct {
			XMLName xml.Name `xml:"member"`
			IsLead  bool     `xml:"is-lead,attr"` // (0|1) default "0"
			Email   string   `xml:"email"`
			Name    string   `xml:"name"`
			Role    string   `xml:"role"`
			Content string   `xml:",chardata"`
		} `xml:"member"`
	}
}

type Repository

type Repository struct {
	XMLName xml.Name `xml:"repositories"`
	Version float32  `xml:"version,attr"`
	Repo    []struct {
		XMLName     xml.Name `xml:"repo"`
		Priority    int      `xml:"priority,attr"`
		Quality     string   `xml:"quality,attr"` /// (core|stable|testing|experimental|graveyard)
		Status      string   `xml:"status,attr"`  // (official|unofficial)
		Name        string   `xml:"name"`
		Description struct {
			XMLName xml.Name `xml:"description"`
			Value   string   `xml:",chardata"`
		} `xml:"description"`
		Homepage string `xml:"homepage"`
		Owner    struct {
			XMLName xml.Name `xml:"owner"`
			Type    string   `xml:"type"`
			Email   string   `xml:"email"`
			Name    string   `xml:"name"`
		} `xml:"owner"`
		Source struct {
			XMLName xml.Name `xml:"source"`
			Type    string   `xml:"type,attr"`
			Value   string   `xml:",chardata"` // (bitbucket|cpan|cpan-module|cpe|cran|ctan|freedesktop-gitlab|gentoo|github|gitlab|gnome-gitlab|google-code|hackage|heptapod|launchpad|osdn|pear|pecl|pypi|rubygems|savannah|savannah-nongnu|sourceforge|sourcehut|vim)
		} `xml:"source"`
		Feed string `xml:"feed"`
	} `xml:"repo"`
}

type UserList

type UserList struct {
	XMLName xml.Name `xml:"userlist"`
	User    []struct {
		XMLName  xml.Name `xml:"user"`
		Username string   `xml:"username,attr"`
		ID       uint     `xml:"ID,attr"`
		Realname struct {
			XMLName    xml.Name `xml:"realname"`
			Fullname   string   `xml:"fullname,attr"`
			Firstname  string   `xml:"firstname"`
			Familyname struct {
				XMLName xml.Name `xml:"familyname"`
				Sort    string   `xml:"sort,attr"`
				// check if used anywhere, if not remove to make <familyname/> just string
				Content string `xml:",chardata"`
			} `xml:"familyname"`
		} `xml:"realname"`
		PGPKey   []string `xml:"PGPKey"`
		Alias    []string `xml:"alias"`
		Email    []string `xml:"email"`
		Joined   []string `xml:"joined"`
		Retired  []string `xml:"retired"`
		Status   string   `xml:"status"`
		Roles    string   `xml:"roles"`
		Location struct {
			XMLName   xml.Name `xml:"location"`
			Latitude  string   `xml:"latitude,attr"`
			Longitude string   `xml:"longitude,attr"`
			Content   string   `xml:",chardata"`
		} `xml:"location"`
	} `xml:"user"`
}

Jump to

Keyboard shortcuts

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