mirror of
https://github.com/gogrlx/snack.git
synced 2026-04-02 05:08:42 -07:00
Implements the dnf sub-package with Manager, VersionQuerier, Holder, Cleaner, FileOwner, RepoManager, KeyManager, Grouper, and NameNormalizer interfaces. Implements the rpm sub-package with Manager, FileOwner, and NameNormalizer interfaces. Both follow the existing pattern: exported methods on struct delegate to unexported functions, _linux.go for real implementations, _other.go with build-tag stubs, embedded snack.Locker for mutating operations, and compile-time interface checks. Includes parser tests for all output formats.
90 lines
2.1 KiB
Go
90 lines
2.1 KiB
Go
//go:build !linux
|
|
|
|
package dnf
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/gogrlx/snack"
|
|
)
|
|
|
|
func latestVersion(_ context.Context, _ string) (string, error) {
|
|
return "", snack.ErrUnsupportedPlatform
|
|
}
|
|
|
|
func listUpgrades(_ context.Context) ([]snack.Package, error) {
|
|
return nil, snack.ErrUnsupportedPlatform
|
|
}
|
|
|
|
func upgradeAvailable(_ context.Context, _ string) (bool, error) {
|
|
return false, snack.ErrUnsupportedPlatform
|
|
}
|
|
|
|
func versionCmp(_ context.Context, _, _ string) (int, error) {
|
|
return 0, snack.ErrUnsupportedPlatform
|
|
}
|
|
|
|
func hold(_ context.Context, _ []string) error {
|
|
return snack.ErrUnsupportedPlatform
|
|
}
|
|
|
|
func unhold(_ context.Context, _ []string) error {
|
|
return snack.ErrUnsupportedPlatform
|
|
}
|
|
|
|
func listHeld(_ context.Context) ([]snack.Package, error) {
|
|
return nil, snack.ErrUnsupportedPlatform
|
|
}
|
|
|
|
func autoremove(_ context.Context, _ ...snack.Option) error {
|
|
return snack.ErrUnsupportedPlatform
|
|
}
|
|
|
|
func clean(_ context.Context) error {
|
|
return snack.ErrUnsupportedPlatform
|
|
}
|
|
|
|
func fileList(_ context.Context, _ string) ([]string, error) {
|
|
return nil, snack.ErrUnsupportedPlatform
|
|
}
|
|
|
|
func owner(_ context.Context, _ string) (string, error) {
|
|
return "", snack.ErrUnsupportedPlatform
|
|
}
|
|
|
|
func listRepos(_ context.Context) ([]snack.Repository, error) {
|
|
return nil, snack.ErrUnsupportedPlatform
|
|
}
|
|
|
|
func addRepo(_ context.Context, _ snack.Repository) error {
|
|
return snack.ErrUnsupportedPlatform
|
|
}
|
|
|
|
func removeRepo(_ context.Context, _ string) error {
|
|
return snack.ErrUnsupportedPlatform
|
|
}
|
|
|
|
func addKey(_ context.Context, _ string) error {
|
|
return snack.ErrUnsupportedPlatform
|
|
}
|
|
|
|
func removeKey(_ context.Context, _ string) error {
|
|
return snack.ErrUnsupportedPlatform
|
|
}
|
|
|
|
func listKeys(_ context.Context) ([]string, error) {
|
|
return nil, snack.ErrUnsupportedPlatform
|
|
}
|
|
|
|
func groupList(_ context.Context) ([]string, error) {
|
|
return nil, snack.ErrUnsupportedPlatform
|
|
}
|
|
|
|
func groupInfo(_ context.Context, _ string) ([]snack.Package, error) {
|
|
return nil, snack.ErrUnsupportedPlatform
|
|
}
|
|
|
|
func groupInstall(_ context.Context, _ string, _ ...snack.Option) error {
|
|
return snack.ErrUnsupportedPlatform
|
|
}
|