asset

package
v1.26.0 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package asset provides functionality to manage static assets.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Upload

func Upload(fs afero.Fs, source, destination string, opts *UploadOpts) ([]string, error)

Upload uploads static assets to Cloud Storage and returns uploaded file URLs.

Types

type UploadFunc

type UploadFunc func(dest string, contents io.Reader) (url string, err error)

UploadFunc is the function signature to upload contents to a destination.

type UploadOpts

type UploadOpts struct {
	Reincludes []string   // Relative path under source to reinclude files that are excluded in the upload.
	Excludes   []string   // Relative path under source to exclude in the upload.
	UploadFn   UploadFunc // Custom implementation on how to upload the contents under a file. Defaults to S3UploadFn.
}

Jump to

Keyboard shortcuts

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