Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FileUploader ¶
type FileUploader interface { // UploadFile uploads the file read by the given Reader and give it a name as specified. UploadFile(ctx context.Context, r io.Reader, name string) error // Path returns the full path of the file in the storage backend used. Path(base string) string // Delete deletes the given file. Delete(ctx context.Context, name string) error }
FileUploader uploads files to a storage service.
func NewGCSFileUploader ¶
func NewGCSFileUploader(ctx context.Context, bucket string) (FileUploader, error)
NewGCSFileUploader creates a new FileUploader that uses Google Cloud Storage.
Click to show internal directories.
Click to hide internal directories.