s3uploadclient

package
v0.94.2 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2022 License: Apache-2.0 Imports: 16 Imported by: 1

Documentation

Index

Constants

View Source
const MaxS3CreationTimeout = time.Duration(time.Second * 30)
View Source
const MaxUploadSize = 20 * 1024 * 1024 // 20MB

Variables

This section is empty.

Functions

This section is empty.

Types

type Options

type Options struct {
	BucketName      string
	BucketLocation  string
	AccessKeyID     string
	SecretAccessKey string
	UseSSL          bool
}

type S3UploadClient

type S3UploadClient struct {
	// contains filtered or unexported fields
}

func NewS3UploadClient

func NewS3UploadClient(endpoint string, s3Options Options) (*S3UploadClient, error)

func (*S3UploadClient) UploadFile

func (s *S3UploadClient) UploadFile(w http.ResponseWriter, r *http.Request)

type UploadResponse

type UploadResponse struct {
	Files []UploadedFile `json:"Files"`
}

type UploadedFile

type UploadedFile struct {
	Key string `json:"key"`
}

Jump to

Keyboard shortcuts

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