platformutil

package
v1.7.6 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: Apache-2.0 Imports: 9 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CanExecProbably

func CanExecProbably(ss ...string) (bool, error)

func LayerDescs

func LayerDescs(ctx context.Context, provider content.Provider, imageTarget ocispec.Descriptor, platform platforms.MatchComparer) ([]ocispec.Descriptor, error)

func NewMatchComparer

func NewMatchComparer(all bool, ss []string) (platforms.MatchComparer, error)

NewMatchComparer returns MatchComparer. If all is true, NewMatchComparer always returns All, regardless to the value of ss. If all is false and ss is empty, NewMatchComparer returns DefaultStrict (not Default). Otherwise NewMatchComparer returns Ordered MatchComparer.

func NewMatchComparerFromOCISpecPlatformSlice

func NewMatchComparerFromOCISpecPlatformSlice(platformz []ocispec.Platform) platforms.MatchComparer

NewMatchComparerFromOCISpecPlatformSlice returns MatchComparer. If platformz is empty, NewMatchComparerFromOCISpecPlatformSlice returns All (not DefaultStrict).

func NewOCISpecPlatformSlice

func NewOCISpecPlatformSlice(all bool, ss []string) ([]ocispec.Platform, error)

NewOCISpecPlatformSlice returns a slice of ocispec.Platform If all is true, NewOCISpecPlatformSlice always returns an empty slice, regardless to the value of ss. If all is false and ss is empty, NewOCISpecPlatformSlice returns DefaultSpec. Otherwise NewOCISpecPlatformSlice returns the slice that correspond to ss.

func NormalizeString

func NormalizeString(s string) (string, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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