ociimg

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2023 License: MIT Imports: 28 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthConfig

type AuthConfig struct {
	Username string `hcl:"username,optional"`
	Password string `hcl:"password,optional"`
	Auth     string `hcl:"auth,optional"`

	// IdentityToken is used to authenticate the user and get
	// an access token for the registry.
	IdentityToken string `hcl:"identitytoken,optional"`

	// RegistryToken is a bearer token to be sent to a registry
	RegistryToken string `hcl:"registrytoken,optional"`
}

func (AuthConfig) Authorization

func (a AuthConfig) Authorization() (*authn.AuthConfig, error)

type BuildrKeyChain

type BuildrKeyChain map[string]AuthConfig

func KeyChain

func KeyChain(creds []RegistryAuth) BuildrKeyChain

func (BuildrKeyChain) Resolve

func (b BuildrKeyChain) Resolve(resource authn.Resource) (authn.Authenticator, error)

type ContainerImage

type ContainerImage struct {
	Content map[string]string `hcl:"content"`

	BaseImage           string         `hcl:"base_image"`
	ImageName           string         `hcl:"image_name"`
	Platform            string         `hcl:"platform"`
	Tags                []string       `hcl:"tags"`
	Entrypoint          []string       `hcl:"entrypoint,optional"`
	Command             []string       `hcl:"command,optional"`
	RegistryCredentials []RegistryAuth `hcl:"registry_auth,block"`

	PublishToDaemon   bool `hcl:"publish_to_daemon,optional"`
	PublishToRegistry bool `hcl:"publish_to_registry,optional"`
	// contains filtered or unexported fields
}

func (ContainerImage) Category

func (o ContainerImage) Category() modules.Category

func (ContainerImage) Execute

func (ContainerImage) Type

func (o ContainerImage) Type() string

type Publisher

type Publisher interface {
	Publish(ctx context.Context, result imageOrIndex) (name.Reference, error)
}

type RegistryAuth

type RegistryAuth struct {
	Registry   string `hcl:",label"`
	AuthConfig `hcl:",remain"`
}

Jump to

Keyboard shortcuts

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