ospatch

package
v0.0.0-...-5eebc06 Latest Latest
Warning

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

Go to latest
Published: May 1, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DisableAutoUpdates

func DisableAutoUpdates(ctx context.Context)

DisableAutoUpdates disables system auto updates.

func InstallWUAUpdates

func InstallWUAUpdates(ctx context.Context) error

InstallWUAUpdates is the linux stub for InstallWUAUpdates.

func RunAptGetUpgrade

func RunAptGetUpgrade(ctx context.Context, opts ...AptGetUpgradeOption) error

RunAptGetUpgrade runs apt-get upgrade.

func RunGooGetUpdate

func RunGooGetUpdate(ctx context.Context, opts ...GooGetUpdateOption) error

RunGooGetUpdate runs googet update.

func RunYumUpdate

func RunYumUpdate(ctx context.Context, opts ...YumUpdateOption) error

RunYumUpdate runs yum update.

func RunZypperPatch

func RunZypperPatch(ctx context.Context, opts ...ZypperPatchOption) error

RunZypperPatch runs zypper patch.

func SystemRebootRequired

func SystemRebootRequired(ctx context.Context) (bool, error)

SystemRebootRequired checks whether a system reboot is required.

Types

type AptGetUpgradeOption

type AptGetUpgradeOption func(*aptGetUpgradeOpts)

AptGetUpgradeOption is an option for apt-get update.

func AptGetDryRun

func AptGetDryRun(dryrun bool) AptGetUpgradeOption

AptGetDryRun performs a dry run.

func AptGetExcludes

func AptGetExcludes(excludes []*Exclude) AptGetUpgradeOption

AptGetExcludes excludes these packages from upgrade.

func AptGetExclusivePackages

func AptGetExclusivePackages(exclusivePackages []string) AptGetUpgradeOption

AptGetExclusivePackages includes only these packages in the upgrade.

func AptGetUpgradeType

func AptGetUpgradeType(upgradeType packages.AptUpgradeType) AptGetUpgradeOption

AptGetUpgradeType returns a AptGetUpgradeOption that specifies upgrade type.

type Exclude

type Exclude struct {
	// contains filtered or unexported fields
}

Exclude represents package exclude entry by a user

func CreateRegexExclude

func CreateRegexExclude(regex *regexp.Regexp) *Exclude

CreateRegexExclude returns new Exclude struct that represents exclusion with regex

func CreateStringExclude

func CreateStringExclude(strictString *string) *Exclude

CreateStringExclude returns new Exclude struct that represents exclusion with string

func (*Exclude) MatchesName

func (exclude *Exclude) MatchesName(name *string) bool

MatchesName returns if a package with a certain name matches Exclude struct and should be excluded

func (Exclude) String

func (exclude Exclude) String() string

type GooGetUpdateOption

type GooGetUpdateOption func(*googetUpdateOpts)

GooGetUpdateOption is an option for apt-get update.

func GooGetDryRun

func GooGetDryRun(dryrun bool) GooGetUpdateOption

GooGetDryRun performs a dry run.

func GooGetExcludes

func GooGetExcludes(excludes []*Exclude) GooGetUpdateOption

GooGetExcludes excludes these packages from upgrade.

func GooGetExclusivePackages

func GooGetExclusivePackages(exclusivePackages []string) GooGetUpdateOption

GooGetExclusivePackages includes only these packages in the upgrade.

type YumUpdateOption

type YumUpdateOption func(*yumUpdateOpts)

YumUpdateOption is an option for yum update.

func YumDryRun

func YumDryRun(dryrun bool) YumUpdateOption

YumDryRun performs a dry run.

func YumExclusivePackages

func YumExclusivePackages(exclusivePackages []string) YumUpdateOption

YumExclusivePackages includes only these packages in the upgrade.

func YumUpdateExcludes

func YumUpdateExcludes(excludes []*Exclude) YumUpdateOption

YumUpdateExcludes returns a YumUpdateOption that specifies what packages to add to the --exclude flag.

func YumUpdateMinimal

func YumUpdateMinimal(minimal bool) YumUpdateOption

YumUpdateMinimal returns a YumUpdateOption that specifies the update-minimal command should be used.

func YumUpdateSecurity

func YumUpdateSecurity(security bool) YumUpdateOption

YumUpdateSecurity returns a YumUpdateOption that specifies the --security flag should be used.

type ZypperPatchOption

type ZypperPatchOption func(*zypperPatchOpts)

ZypperPatchOption is an option for zypper patch.

func ZypperPatchCategories

func ZypperPatchCategories(categories []string) ZypperPatchOption

ZypperPatchCategories returns a ZypperUpdateOption that specifies what categories to add to the --categories flag.

func ZypperPatchSeverities

func ZypperPatchSeverities(severities []string) ZypperPatchOption

ZypperPatchSeverities returns a ZypperUpdateOption that specifies what categories to add to the --categories flag.

func ZypperUpdateDryrun

func ZypperUpdateDryrun(dryrun bool) ZypperPatchOption

ZypperUpdateDryrun returns a ZypperUpdateOption that specifies the runner.

func ZypperUpdateWithExcludes

func ZypperUpdateWithExcludes(excludes []*Exclude) ZypperPatchOption

ZypperUpdateWithExcludes returns a ZypperUpdateOption that specifies list of packages to be excluded from update

func ZypperUpdateWithExclusivePatches

func ZypperUpdateWithExclusivePatches(exclusivePatches []string) ZypperPatchOption

ZypperUpdateWithExclusivePatches returns a ZypperUpdateOption that specifies list of exclusive packages to be updated

func ZypperUpdateWithOptional

func ZypperUpdateWithOptional(withOptional bool) ZypperPatchOption

ZypperUpdateWithOptional returns a ZypperUpdateOption that specifies the --with-optional flag should be used.

func ZypperUpdateWithUpdate

func ZypperUpdateWithUpdate(withUpdate bool) ZypperPatchOption

ZypperUpdateWithUpdate returns a ZypperUpdateOption that specifies the --with-update flag should be used.

Jump to

Keyboard shortcuts

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