update

package
v0.0.0-...-11537ce Latest Latest
Warning

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

Go to latest
Published: May 2, 2022 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AsStrings

func AsStrings(deps []DepInfo) []string

func Contains

func Contains(s []DepInfo, name string) bool

func DetermineJenkinsVersionFromDockerfile

func DetermineJenkinsVersionFromDockerfile(reader io.Reader) (string, error)

func ExtractExactVersion

func ExtractExactVersion(jenkinsVersion string) string

func IsLTS

func IsLTS(version string) bool

Types

type Config

type Config struct {
	ConnectionCheckURL  string                     `json:"connectionCheckUrl"`
	Core                CoreInfo                   `json:"core"`
	Deprecations        map[string]DeprecationInfo `json:"deprecations"`
	ID                  string                     `json:"id"`
	Plugins             map[string]PluginInfo      `json:"plugins"`
	UpdateCenterVersion string                     `json:"updateCenterVersion"`
	Warnings            []WarningInfo              `json:"warnings"`
}

Config struct to store the update center config representation.

type CoreInfo

type CoreInfo struct {
	BuildDate string `json:"buildDate"`
	Name      string `json:"core"`
	Sha1      string `json:"sha1"`
	Sha256    string `json:"sha256"`
	URL       string `json:"url"`
	Version   string `json:"version"`
}

CoreInfo struct to store the update center core representation.

type DepInfo

type DepInfo struct {
	Name    string
	Version string
	Comment string
	Changed bool
}

func FindAll

func FindAll(deps []DepInfo, test func(info DepInfo) bool) (ret []DepInfo)

func FromString

func FromString(in string) (*DepInfo, error)

func FromStrings

func FromStrings(input []string) ([]DepInfo, error)

func (*DepInfo) ShouldUpdate

func (d *DepInfo) ShouldUpdate(version string) bool

func (*DepInfo) SkipUpdate

func (d *DepInfo) SkipUpdate() bool

func (*DepInfo) String

func (d *DepInfo) String() string

type Dependency

type Dependency struct {
	Name     string `json:"name"`
	Optional bool   `json:"optional"`
	Version  string `json:"version"`
}

Dependency struct to store the update center dependency representation.

type DeprecationInfo

type DeprecationInfo struct {
	URL string `json:"url"`
}

DeprecationInfo struct to store the update center deprecation representation.

type GitHub

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

func (*GitHub) Client

func (g *GitHub) Client() api.Client

func (*GitHub) GetLatestLTSRelease

func (g *GitHub) GetLatestLTSRelease() (string, error)

func (*GitHub) SetClient

func (g *GitHub) SetClient(client *api.Client)

type PluginInfo

type PluginInfo struct {
	BuildDate    string       `json:"buildDate"`
	Name         string       `json:"name"`
	Sha1         string       `json:"sha1"`
	Sha256       string       `json:"sha256"`
	URL          string       `json:"url"`
	Version      string       `json:"version"`
	RequiredCore string       `json:"requiredCore"`
	Dependencies []Dependency `json:"dependencies"`
}

PluginInfo struct to store the update center plugin representation.

type ReleaseInfo

type ReleaseInfo struct {
	TagName         string `json:"tag_name"`
	TargetCommitish string `json:"target_commitish"`
	Name            string `json:"name"`
	Draft           bool   `json:"draft"`
	Prerelease      bool   `json:"prerelease"`
	CreatedAt       string `json:"created_at"`
	PublishedAt     string `json:"published_at"`
}

type Updater

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

func (*Updater) Client

func (u *Updater) Client() api.Client

func (*Updater) GetWarnings

func (u *Updater) GetWarnings(plugins []DepInfo) ([]WarningInfo, error)

func (*Updater) IncludeDependencies

func (u *Updater) IncludeDependencies()

func (*Updater) LatestVersions

func (u *Updater) LatestVersions(plugins []DepInfo) ([]DepInfo, error)

func (*Updater) SecurityUpdates

func (u *Updater) SecurityUpdates()

func (*Updater) SetClient

func (u *Updater) SetClient(client *api.Client)

func (*Updater) SetVersion

func (u *Updater) SetVersion(version string)

type VersionInfo

type VersionInfo struct {
	LastVersion string `json:"lastVersion"`
	Pattern     string `json:"pattern"`
}

VersionInfo struct to store the update center version representation.

func (*VersionInfo) Matches

func (v *VersionInfo) Matches(in string) bool

type WarningInfo

type WarningInfo struct {
	ID       string        `json:"id"`
	Message  string        `json:"message"`
	Name     string        `json:"name"`
	Type     string        `json:"type"`
	URL      string        `json:"url"`
	Versions []VersionInfo `json:"versions"`
}

WarningInfo struct to store the update center warning representation.

func (*WarningInfo) Matches

func (w *WarningInfo) Matches(in string) bool

Jump to

Keyboard shortcuts

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