utils

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2025 License: BSD-3-Clause Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckDockerImageExists

func CheckDockerImageExists(dockerClient DockerClientInterface, imageRef string) (bool, error)

CheckDockerImageExists checks if a Docker image exists

func Contains

func Contains(slice []string, item string) bool

contains checks if a string is in a slice of strings

func ParseDockerImage added in v0.2.0

func ParseDockerImage(image string) (string, string, error)

ParseDockerImage parses a Docker image string and returns the repository and tag values.

func SourceConfigUriParser

func SourceConfigUriParser(uri string) (string, string, error)

Types

type DockerClientInterface added in v0.2.0

type DockerClientInterface interface {
	ImageInspect(ctx context.Context, imageRef string) (image.InspectResponse, error)
}

DockerClientInterface defines the methods required for a Docker client

type RealDockerClient added in v0.2.0

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

RealDockerClient wraps the actual Docker client

func NewRealDockerClient added in v0.2.0

func NewRealDockerClient() (*RealDockerClient, error)

NewRealDockerClient initializes a new RealDockerClient

func (*RealDockerClient) ImageInspect added in v0.2.0

func (r *RealDockerClient) ImageInspect(
	ctx context.Context,
	imageRef string,
) (image.InspectResponse, error)

ImageInspect implements DockerClientInterface

Jump to

Keyboard shortcuts

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