upload

package
v0.0.0-...-db1a339 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const UPLOAD_MAX_SIZE = 102400000 // 100 MB

Variables

View Source
var ErrInvalidToken error = goastorage.Unauthorized("invalid token")

Functions

func NewService

func NewService(
	logger logr.Logger,
	config Config,
	uploadMaxSize int,
	tokenVerifier auth.TokenVerifier,
) (s *serviceImpl, err error)

Types

type Config

type Config struct {
	URL       string
	Region    string
	Endpoint  string
	PathStyle bool
	Profile   string
	Key       string
	Secret    string
	Token     string
	Bucket    string
}

func (Config) Validate

func (c Config) Validate() error

Validate implements config.ConfigurationValidator.

type Service

type Service interface {
	Upload(ctx context.Context, payload *goaupload.UploadPayload, req io.ReadCloser) error

	Bucket() *blob.Bucket
	Close() error
}

Directories

Path Synopsis
Package fake is a generated GoMock package.
Package fake is a generated GoMock package.

Jump to

Keyboard shortcuts

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