ecr

package
v0.47.2 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// RepositoryAlreadyExists repository already exists
	RepositoryAlreadyExists = "RepositoryAlreadyExistsException"
	// LimitExceededException A service limit is exceeded
	LimitExceededException = "LimitExceededException"
	// RepositoryNotEmptyException ECR is not empty
	RepositoryNotEmptyException = "RepositoryNotEmptyException"
	// RepositoryNotFoundException ECR was not found
	RepositoryNotFoundException = "RepositoryNotFoundException"
)

Variables

This section is empty.

Functions

func CompareTags

func CompareTags(tags []v1beta1.Tag, ecrTags []ecrtypes.Tag) bool

CompareTags compares arrays of v1alpha1.Tag and ecrtypes.Tag

func CreatePatch

CreatePatch creates a *v1alpha1.RepositoryParameters that has only the changed values between the target *v1alpha1.RepositoryParameters and the current *ecr.Repository.

func DiffTags

func DiffTags(spec []v1beta1.Tag, current []ecrtypes.Tag) (addTags []ecrtypes.Tag, remove []string)

DiffTags returns tags that should be added or removed.

func GenerateCreateRepositoryInput

func GenerateCreateRepositoryInput(name string, params *v1beta1.RepositoryParameters) *ecr.CreateRepositoryInput

GenerateCreateRepositoryInput Generates the CreateRepositoryInput from the RepositoryParameters

func GenerateRepositoryObservation

func GenerateRepositoryObservation(repo ecrtypes.Repository) v1beta1.RepositoryObservation

GenerateRepositoryObservation is used to produce v1alpha1.RepositoryObservation from ecr.Repository

func GenerateSetRepositoryPolicyInput

func GenerateSetRepositoryPolicyInput(params *v1beta1.RepositoryPolicyParameters, policy *string) *ecr.SetRepositoryPolicyInput

GenerateSetRepositoryPolicyInput Generates the CreateRepositoryInput from the RepositoryPolicyParameters

func IsPolicyNotFoundErr

func IsPolicyNotFoundErr(err error) bool

IsPolicyNotFoundErr returns true if the error code indicates that the policy was not found

func IsRepoNotFoundErr

func IsRepoNotFoundErr(err error) bool

IsRepoNotFoundErr returns true if the error is because the item doesn't exist

func IsRepositoryUpToDate

func IsRepositoryUpToDate(e *v1beta1.RepositoryParameters, tags []ecrtypes.Tag, repo *ecrtypes.Repository) bool

IsRepositoryUpToDate checks whether there is a change in any of the modifiable fields.

func LateInitializeRepository

func LateInitializeRepository(in *v1beta1.RepositoryParameters, r *ecrtypes.Repository)

LateInitializeRepository fills the empty fields in *v1alpha1.RepositoryParameters with the values seen in ecr.Repository.

func LateInitializeRepositoryPolicy

func LateInitializeRepositoryPolicy(in *v1beta1.RepositoryPolicyParameters, r *ecr.GetRepositoryPolicyOutput)

LateInitializeRepositoryPolicy fills the empty fields in *v1alpha1.RepositoryPolicyParameters with the values seen in ecr.GetRepositoryPolicyResponse.

func RawPolicyData

func RawPolicyData(original *v1beta1.RepositoryPolicy) (string, error)

RawPolicyData parses and formats the RepositoryPolicy struct

func Serialize

func Serialize(p *v1beta1.RepositoryPolicyBody) (interface{}, error)

Serialize is the custom marshaller for the RepositoryPolicyBody

func SerializeAWSPrincipal

func SerializeAWSPrincipal(p v1beta1.AWSPrincipal) *string

SerializeAWSPrincipal converts an AWSPrincipal to a string

func SerializeRepositoryCondition

func SerializeRepositoryCondition(p []v1beta1.Condition) (interface{}, error)

SerializeRepositoryCondition converts the string -> Condition map into a serialized version

func SerializeRepositoryPolicyStatement

func SerializeRepositoryPolicyStatement(p v1beta1.RepositoryPolicyStatement) (interface{}, error)

SerializeRepositoryPolicyStatement is the custom marshaller for the RepositoryPolicyStatement

func SerializeRepositoryPrincipal

func SerializeRepositoryPrincipal(p *v1beta1.RepositoryPrincipal) (interface{}, error)

SerializeRepositoryPrincipal is the custom serializer for the RepositoryPrincipal

func SortTags

func SortTags(tags []v1beta1.Tag, ecrTags []ecrtypes.Tag)

SortTags sorts array of v1alpha1.Tag and ecrtypes.Tag on 'Key'

Types

type RepositoryClient

type RepositoryClient interface {
	CreateRepository(ctx context.Context, input *ecr.CreateRepositoryInput, opts ...func(*ecr.Options)) (*ecr.CreateRepositoryOutput, error)
	DescribeRepositories(ctx context.Context, input *ecr.DescribeRepositoriesInput, opts ...func(*ecr.Options)) (*ecr.DescribeRepositoriesOutput, error)
	DeleteRepository(ctx context.Context, input *ecr.DeleteRepositoryInput, opts ...func(*ecr.Options)) (*ecr.DeleteRepositoryOutput, error)
	ListTagsForResource(ctx context.Context, input *ecr.ListTagsForResourceInput, opts ...func(*ecr.Options)) (*ecr.ListTagsForResourceOutput, error)
	TagResource(ctx context.Context, input *ecr.TagResourceInput, opts ...func(*ecr.Options)) (*ecr.TagResourceOutput, error)
	PutImageTagMutability(ctx context.Context, input *ecr.PutImageTagMutabilityInput, opts ...func(*ecr.Options)) (*ecr.PutImageTagMutabilityOutput, error)
	PutImageScanningConfiguration(ctx context.Context, input *ecr.PutImageScanningConfigurationInput, opts ...func(*ecr.Options)) (*ecr.PutImageScanningConfigurationOutput, error)
	UntagResource(ctx context.Context, input *ecr.UntagResourceInput, opts ...func(*ecr.Options)) (*ecr.UntagResourceOutput, error)
}

RepositoryClient is the external client used for ECR Custom Resource

type RepositoryPolicyClient

type RepositoryPolicyClient interface {
	SetRepositoryPolicy(ctx context.Context, input *ecr.SetRepositoryPolicyInput, opts ...func(*ecr.Options)) (*ecr.SetRepositoryPolicyOutput, error)
	DeleteRepositoryPolicy(ctx context.Context, input *ecr.DeleteRepositoryPolicyInput, opts ...func(*ecr.Options)) (*ecr.DeleteRepositoryPolicyOutput, error)
	GetRepositoryPolicy(ctx context.Context, input *ecr.GetRepositoryPolicyInput, opts ...func(*ecr.Options)) (*ecr.GetRepositoryPolicyOutput, error)
}

RepositoryPolicyClient is the external client used for Repository Policy Resource

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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