fs

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2023 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AwsCompletedPart

type AwsCompletedPart struct {
	// Entity tag returned when the part was uploaded.
	ETag string

	// Part number that identifies the part. This is a positive integer between
	// 1 and 10,000.
	PartNumber int64
}

func (*AwsCompletedPart) ETagPtr

func (p *AwsCompletedPart) ETagPtr() *string

func (*AwsCompletedPart) PartNumberPtr

func (p *AwsCompletedPart) PartNumberPtr() *int64

type Config

type Config struct {
	URLEncryptionKey string `json:"urlEncryptionKey"`
	RetryCount       int    `json:"retryCount"`
}

type DownloadHandler

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

func (*DownloadHandler) Handle

func (c *DownloadHandler) Handle(ctx vatel.Context) error

func (*DownloadHandler) Input

func (c *DownloadHandler) Input() interface{}

type FileSystemStorageServer

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

func NewFileSystemStorage

func NewFileSystemStorage(sud SignedURLDecoder, basePath string) *FileSystemStorageServer

func (*FileSystemStorageServer) Endpoints

func (s *FileSystemStorageServer) Endpoints() []vatel.Endpoint

func (*FileSystemStorageServer) ReadObjectTo

func (s *FileSystemStorageServer) ReadObjectTo(o *bsw.Object, w io.Writer) error

func (*FileSystemStorageServer) WriteObject

func (s *FileSystemStorageServer) WriteObject(o *bsw.Object, buf *bytes.Buffer) error

type Service

type Service struct {
	BasePath gonfig.String `cfg:"bc_storage_root_path" default:"/tmp"`
	// contains filtered or unexported fields
}

func NewFileStorageWrapper added in v0.0.2

func NewFileStorageWrapper(cfg *Config) (*Service, error)

func (*Service) CompleteMultipartUpload

func (s *Service) CompleteMultipartUpload(o *bsw.Object, uploadID string, parts []bsw.CompletedPart) error

CompleteMultipartUpload

func (*Service) DecodeSignedURL

func (s *Service) DecodeSignedURL(encodedStr string) (*bsw.Object, error)

func (*Service) PreSignGetObjectURL

func (s *Service) PreSignGetObjectURL(o *bsw.Object, timeout time.Duration) (string, error)

func (*Service) PreSignMultipartObjectURL

func (s *Service) PreSignMultipartObjectURL(o *bsw.Object, timeout time.Duration) ([]string, string, error)

func (*Service) PreSignPutObjectURL

func (s *Service) PreSignPutObjectURL(o *bsw.Object, timeout time.Duration) (string, error)

PreSignPutObjectURL returns presigned URL for PUT object request.

type SignedURLDecoder

type SignedURLDecoder interface {
	DecodeSignedURL(encodedStr string) (*bsw.Object, error)
}

type UploadHandler

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

func (*UploadHandler) Handle

func (c *UploadHandler) Handle(ctx vatel.Context) error

func (*UploadHandler) Input

func (c *UploadHandler) Input() interface{}

Jump to

Keyboard shortcuts

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