s3assets

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: May 3, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Kind is the api name for this kustomize function.
	Kind = "S3BucketTransformer"
	// DefaultS3Regexp matches s3://.* until a " or \n
	DefaultS3Regexp = `(s3:\/\/[^\n"]+)`
)

Variables

View Source
var DefaultFieldSpecs = ktypes.FsSlice{
	{
		Gvk:  resid.Gvk{Kind: "ConfigMap"},
		Path: "data",
	},
}

DefaultFieldSpecs are the kustomize locations that this function looks for s3 uris to transform by default.

Functions

func Filter

func Filter() kio.Filter

Filter implements the logic for this custom transform

Types

type BucketTransformer

type BucketTransformer struct {
	// Kind is the API name.  Must be S3BucketTransformer.
	Kind string `yaml:"kind"`

	// APIVersion is the API version.  Must be v1alpha1.
	APIVersion string `yaml:"apiVersion"`

	// Metadata defines instance metadata.
	Metadata v1alpha1.Metadata `yaml:"metadata"`

	// Spec defines the desired declarative configuration.
	Spec Spec `yaml:"spec"`
}

BucketTransformer defines our custom s3 function

func (BucketTransformer) Filter

func (f BucketTransformer) Filter(nodes []*yaml.RNode) ([]*yaml.RNode, error)

Filter applies the filter to the nodes.

type Spec

type Spec struct {
	Bucket     string         `yaml:"bucket"`
	FieldSpecs ktypes.FsSlice `yaml:"fieldSpecs"`
	Regexps    []string       `yaml:"regexps"`
	// contains filtered or unexported fields
}

Spec defines fields of our BucketTransformer

Jump to

Keyboard shortcuts

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