dtversion

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2021 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const VersionLabel = "com.dynatrace.build-version"

VersionLabel is the name of the label used on ActiveGate-provided images.

Variables

This section is empty.

Functions

func CompareVersionInfo

func CompareVersionInfo(a VersionInfo, b VersionInfo) int

CompareVersionInfo returns:

	0: if a == b
 n > 0: if a > b
 n < 0: if a < b
 0 with error: if a == nil || b == nil

func MakeSystemContext

func MakeSystemContext(dockerReference reference.Named, dockerConfig *DockerConfig) *types.SystemContext

MakeSystemContext returns a SystemConfig for the given image and Dockerconfig.

func ParseDockerAuthsFromSecret

func ParseDockerAuthsFromSecret(secret *corev1.Secret) (map[string]DockerAuth, error)

Types

type DockerAuth

type DockerAuth struct {
	Username string `json:"username"`
	Password string `json:"password"`
}

type DockerConfig

type DockerConfig struct {
	Auths         map[string]DockerAuth
	SkipCertCheck bool
}

type ImageVersion

type ImageVersion struct {
	Version string
	Hash    string
}

ImageVersion includes information for a given image. Version can be empty if the corresponding label isn't set.

func GetImageVersion

func GetImageVersion(imageName string, dockerConfig *DockerConfig) (ImageVersion, error)

GetImageVersion fetches image information for imageName

type ImageVersionProvider

type ImageVersionProvider func(img string, dockerConfig *DockerConfig) (ImageVersion, error)

ImageVersionProvider can fetch image information from img

type VersionInfo

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

func ExtractVersion

func ExtractVersion(versionString string) (VersionInfo, error)

Jump to

Keyboard shortcuts

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