options

package
v0.12.2 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PlatformKey

func PlatformKey(os string, arch string, variant string) string

PlatformKey returns a string usable as platform key

Types

type ManifestOptions

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

ManifestOptions define some options when retrieving image manifests

func NewManifestOptions

func NewManifestOptions() *ManifestOptions

NewManifestOptions returns an initialized ManifestOptions struct

func (*ManifestOptions) Logger

func (o *ManifestOptions) Logger() *log.LogContext

Logger gets the configured log context for given manifest options. If logger is nil, returns a default log context.

func (*ManifestOptions) Platforms

func (o *ManifestOptions) Platforms() []string

func (*ManifestOptions) WantsMetadata

func (o *ManifestOptions) WantsMetadata() bool

WantsMetdata returns true if metadata should be requested

func (*ManifestOptions) WantsPlatform

func (o *ManifestOptions) WantsPlatform(os string, arch string, variant string) bool

MatchesPlatform returns true if given OS name matches the OS set in options

func (*ManifestOptions) WithLogger

func (o *ManifestOptions) WithLogger(logger *log.LogContext) *ManifestOptions

WithLogger sets the log context to use for the given manifest options.

func (*ManifestOptions) WithMetadata

func (o *ManifestOptions) WithMetadata(val bool) *ManifestOptions

WithMetadata sets metadata to be requested

func (*ManifestOptions) WithPlatform

func (o *ManifestOptions) WithPlatform(os string, arch string, variant string) *ManifestOptions

WithPlatform sets a platform filter for options o

Jump to

Keyboard shortcuts

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