archive

package
v1.0.5 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2020 License: Apache-2.0 Imports: 10 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateHandler

func CreateHandler(location string, mode os.FileMode, data []byte, isDir bool) func(resources []*asset.Resource) ([]*asset.Resource, error)

CreateHandler represents on rewrite upload create handler

func DeleteHandler

func DeleteHandler(location string) func(resources []*asset.Resource) ([]*asset.Resource, error)

DeleteHandler represents on rewrite upload delete handler

func Rewrite

func Rewrite(ctx context.Context, walker storage.Walker, URL string, upload storage.Upload, handler Modifier) error

Rewrite rewrites content

func UpdateDestination

func UpdateDestination(destination string, resources []*asset.Resource) []*asset.Resource

UpdateDestination updates resource with specified destination

func UploadHandler

func UploadHandler(toUpload []*asset.Resource) func(resources []*asset.Resource) ([]*asset.Resource, error)

UploadHandler represents on rewrite upload create handler

Types

type Modifier

type Modifier func(resources []*asset.Resource) ([]*asset.Resource, error)

Modifier represents rewrite modifier

type RewriteUploader

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

RewriteUploader represents rewrite uploaderMe

func NewRewriteUploader

func NewRewriteUploader(listener func(resources []*asset.Resource) error) *RewriteUploader

NewRewriteUploader returns new rewrite uploader

func (*RewriteUploader) Close

func (r *RewriteUploader) Close() error

Close notifies specified listener

func (*RewriteUploader) Upload

func (r *RewriteUploader) Upload(ctx context.Context, parent string, info os.FileInfo, reader io.Reader) error

Upload returns upload handler, and upload closer for batch upload or error

Jump to

Keyboard shortcuts

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