uploaders

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2026 License: GPL-3.0 Imports: 17 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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.",
		},
		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' .",
			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.",
		},
		{
			Name:        WebhookMethodParamName,
			Description: "The HTTP method to use for the webhook request. Defaults to PUT.",
			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