Skip to content

Commit

Permalink
add new fields for package struct
Browse files Browse the repository at this point in the history
Signed-off-by: NitishKumar06 <[email protected]>
  • Loading branch information
nitishfy committed Oct 16, 2023
1 parent 9a4280d commit 35001cc
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions obs/packages.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,23 @@ import (
"net/url"
)

// Package represents the response body structure containing information about packages in XML format.
type Package struct {
XMLName xml.Name `json:"directory" xml:"directory"`
Entries []Entry `json:"entry" xml:"entry"`
XMLName xml.Name `json:"directory" xml:"directory"`
Name string `json:"name" xml:"name,attr"`
Title string `json:"title,omitempty" xml:"title,omitempty"`
Description string `json:"description,omitempty" xml:"description,omitempty"`
Devel Devel `json:"devel" xml:"devel"`
Entries []Entry `json:"entry" xml:"entry"`
}

// Devel represents the development information
type Devel struct {
Project string `json:"project" xml:"project,attr"`
Package string `json:"package" xml:"package,attr"`
}

// Entry is a struct representing an individual package entry.
type Entry struct {
Name string `json:"name" xml:"name,attr"`
}
Expand Down

0 comments on commit 35001cc

Please sign in to comment.