first with full handle over rpm
Signed-off-by: GnomeZworc <nicolas.boufidjeline@g3e.fr>
This commit is contained in:
parent
7948368573
commit
274ea454dd
50 changed files with 4309 additions and 0 deletions
41
internal/clone/rpm/primary.go
Normal file
41
internal/clone/rpm/primary.go
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
package rpm
|
||||
|
||||
import "encoding/xml"
|
||||
|
||||
const primaryNS = "http://linux.duke.edu/metadata/common"
|
||||
|
||||
type PrimaryMetadata struct {
|
||||
XMLName xml.Name `xml:"http://linux.duke.edu/metadata/common metadata"`
|
||||
Packages []Package `xml:"http://linux.duke.edu/metadata/common package"`
|
||||
}
|
||||
|
||||
type Package struct {
|
||||
Type string `xml:"type,attr"`
|
||||
Name string `xml:"http://linux.duke.edu/metadata/common name"`
|
||||
Arch string `xml:"http://linux.duke.edu/metadata/common arch"`
|
||||
Version PackageVersion `xml:"http://linux.duke.edu/metadata/common version"`
|
||||
Checksum PackageChecksum `xml:"http://linux.duke.edu/metadata/common checksum"`
|
||||
Location PackageLocation `xml:"http://linux.duke.edu/metadata/common location"`
|
||||
Size PackageSize `xml:"http://linux.duke.edu/metadata/common size"`
|
||||
}
|
||||
|
||||
type PackageVersion struct {
|
||||
Epoch string `xml:"epoch,attr"`
|
||||
Ver string `xml:"ver,attr"`
|
||||
Rel string `xml:"rel,attr"`
|
||||
}
|
||||
|
||||
type PackageChecksum struct {
|
||||
Type string `xml:"type,attr"`
|
||||
Value string `xml:",chardata"`
|
||||
}
|
||||
|
||||
type PackageLocation struct {
|
||||
Href string `xml:"href,attr"`
|
||||
}
|
||||
|
||||
type PackageSize struct {
|
||||
Package int64 `xml:"package,attr"`
|
||||
Installed int64 `xml:"installed,attr"`
|
||||
Archive int64 `xml:"archive,attr"`
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue