uploaders

package
v0.1.8 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2026 License: GPL-3.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	S3BucketParamName         = "BUCKET"
	S3FolderTemplateParamName = "FOLDER_TEMPLATE"
)
View Source
const (
	WebhookURLParamName    = "URL"
	WebhookMethodParamName = "METHOD"
)

Variables

View Source
var All = make(all)
View Source
var S3 = Uploader{
	Name: "s3",
	Parameters: append(aws.Parameters,
		v1beta1.ParameterDefinition{
			Name:        S3BucketParamName,
			Description: "PipelineName of the S3 bucket to upload to.",
			Required:    true,
		},
		v1beta1.ParameterDefinition{
			Name: S3FolderTemplateParamName,
			Description: "Template for the folder structure in the S3 bucket. " +
				"Supports placeholders like .PipelineName, .TargetID, .TargetVersion . " +
				"Using '/' in the template will create nested folders. " +
				"Defaults to '.PipelineName' .",
			Required: false,
			Default:  ptr.To(""),
		}),
	FileSecrets: aws.FileSecrets,
	Upload:      uploadS3,
}
View Source
var Webhooks = Uploader{
	Name: "webhook",
	Parameters: []v1beta1.ParameterDefinition{
		{
			Name:        WebhookURLParamName,
			Description: "URL of the webhook to send data to.",
			Required:    true,
		},
		{
			Name:        WebhookMethodParamName,
			Description: "The HTTP method to use for the webhook request. Defaults to PUT.",
			Required:    false,
			Default:     ptr.To("PUT"),
		},
	},
	Upload: uploadWebhook,
}

Functions

func GenerateObjects added in v0.1.2

func GenerateObjects(image, secretName string) []*v1beta1.ClusterUploader

Types

type Uploader

type Uploader struct {
	Name       string
	Parameters []v1beta1.ParameterDefinition
	Upload     func(
		ctx context.Context,
		metadata input.PipelineMetadata,
		params map[string]string,
		files []string,
	) error
	EnvironmentSecrets   []definitions.EnvironmentSecret
	FileSecrets          []definitions.FileSecret
	EnvironmentVariables []corev1.EnvVar
}

Jump to

Keyboard shortcuts

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