Update Go code to remove Red Hat dependencies and use Debian equivalents
This commit is contained in:
parent
59ffbbc4d0
commit
be2b81ca6d
11 changed files with 149 additions and 164 deletions
|
|
@ -1,4 +1,4 @@
|
|||
package main
|
||||
package debianpatch
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
|
|
|
|||
41
bib/internal/debian-patch/types.go
Normal file
41
bib/internal/debian-patch/types.go
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
package debianpatch
|
||||
|
||||
// DebianRepoConfig represents a Debian repository configuration
|
||||
type DebianRepoConfig struct {
|
||||
Name string `json:"name"`
|
||||
BaseURLs []string `json:"baseurls"`
|
||||
Enabled bool `json:"enabled"`
|
||||
GPGCheck bool `json:"gpgcheck"`
|
||||
Priority int `json:"priority"`
|
||||
SSLClientKey string `json:"ssl_client_key,omitempty"`
|
||||
SSLClientCert string `json:"ssl_client_cert,omitempty"`
|
||||
SSLCACert string `json:"ssl_ca_cert,omitempty"`
|
||||
}
|
||||
|
||||
// DebianDepsolveResult represents the result of apt dependency resolution
|
||||
type DebianDepsolveResult struct {
|
||||
Packages []string `json:"packages"`
|
||||
Repos []DebianRepoConfig `json:"repos"`
|
||||
}
|
||||
|
||||
// DebianPackage represents a Debian package
|
||||
type DebianPackage struct {
|
||||
Name string `json:"name"`
|
||||
Version string `json:"version"`
|
||||
Architecture string `json:"architecture"`
|
||||
Source string `json:"source"`
|
||||
Size int64 `json:"size"`
|
||||
Checksum string `json:"checksum"`
|
||||
}
|
||||
|
||||
// DebianRepoConfigSlice is a slice of DebianRepoConfig for compatibility
|
||||
type DebianRepoConfigSlice []DebianRepoConfig
|
||||
|
||||
// DebianDepsolveResultMap is a map of depsolve results for compatibility
|
||||
type DebianDepsolveResultMap map[string]DebianDepsolveResult
|
||||
|
||||
// DebianPackageSet represents a set of Debian packages (equivalent to rpmmd.PackageSet)
|
||||
type DebianPackageSet struct {
|
||||
Include []string `json:"include,omitempty"`
|
||||
Exclude []string `json:"exclude,omitempty"`
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue