copybuilder

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNotFound = errors.New("builder AMI not found")
)

Functions

This section is empty.

Types

type Config

type Config struct {
	SourceRegion string
	DestRegion   string
	Version      string
	Name         string
	CopyTags     bool
	Wait         bool
	Public       bool
	Output       io.Writer
}

type CopyImageAPI

type CopyImageAPI interface {
	CopyImage(
		ctx context.Context,
		params *ec2.CopyImageInput,
		optFns ...func(*ec2.Options),
	) (*ec2.CopyImageOutput, error)
}

type DescribeImagesAPI

type DescribeImagesAPI interface {
	DescribeImages(
		ctx context.Context,
		params *ec2.DescribeImagesInput,
		optFns ...func(*ec2.Options),
	) (*ec2.DescribeImagesOutput, error)
}

type ImageWaiter

type ImageWaiter interface {
	Wait(
		ctx context.Context,
		params *ec2.DescribeImagesInput,
		maxWaitDur time.Duration,
		optFns ...func(*ec2.ImageAvailableWaiterOptions),
	) error
}

type ModifyImageAttributeAPI

type ModifyImageAttributeAPI interface {
	ModifyImageAttribute(
		ctx context.Context,
		params *ec2.ModifyImageAttributeInput,
		optFns ...func(*ec2.Options),
	) (*ec2.ModifyImageAttributeOutput, error)
}

type ModifySnapshotAttributeAPI

type ModifySnapshotAttributeAPI interface {
	ModifySnapshotAttribute(
		ctx context.Context,
		params *ec2.ModifySnapshotAttributeInput,
		optFns ...func(*ec2.Options),
	) (*ec2.ModifySnapshotAttributeOutput, error)
}

type Result

type Result struct {
	SourceAMI  string
	SourceName string
	DestAMI    string
	DestName   string
}

func Copy

func Copy(ctx context.Context, cfg Config) (*Result, error)

func CopyWithClients

func CopyWithClients(
	ctx context.Context,
	cfg Config,
	sourceClient DescribeImagesAPI,
	destClient CopyImageAPI,
	destEC2Client EC2Client,
	waiter ImageWaiter,
) (*Result, error)

Jump to

Keyboard shortcuts

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