s3uploader

package
v0.19.783 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2026 License: AGPL-3.0 Imports: 15 Imported by: 0

README

template-go-library

This is a template for creating a new go library.

Usage

When you create a new repository in infra-github set the template field to template-go-library:

module "my-go-library" {
  source = "./modules/repository"

  name          = "my-go-library"
  description   = "Go library"
  topics        = ["go-lib", ]
  from_template = "template-go-library"
}

Once you have created your repository, be sure to make an initial release and tag, named v0.0.1. This is required because each release of a library will look up the previous tag and use it to create the next tag.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewS3Uploader

func NewS3Uploader(v *validator.Validate, opts ...uploaderOptions) (*s3Uploader, error)

func WithAssumeRoleARN

func WithAssumeRoleARN(s string) uploaderOptions

WithAssumeRoleARN sets the ARN of the role to assume

func WithAssumeSessionName

func WithAssumeSessionName(s string) uploaderOptions

WithAssumeSessionName sets the session name of the assume

func WithBucketName

func WithBucketName(s string) uploaderOptions

WithBucketName sets the bucket name

func WithCredentials

func WithCredentials(creds *credentials.Config) uploaderOptions

WithCredentials sets the credentials

func WithPrefix

func WithPrefix(s string) uploaderOptions

WithPrefix sets the session name of the assume

Types

type Uploader

type Uploader interface {
	// uploadFile writes the data in the file into the output s3 blob and returns SHA256 checksum
	UploadFile(context.Context, string, string) (string, error)

	// uploadBlob writes the data in the byte slice into the output s3 blob
	UploadBlob(context.Context, []byte, string) error
}

uploader is the interface for uploading data into output runs directory

Jump to

Keyboard shortcuts

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