storage

package module
v0.0.0-...-1673907 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2020 License: MIT Imports: 10 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Setup

func Setup(builder component.Builder)

Setup configures package services

Types

type FileRef

type FileRef string

FileRef is a reference to a storage file

type Service

type Service interface {
	// Upload new file
	Upload(filename FileRef, source io.Reader) (FileRef, error)

	// Download existing file
	Download(file FileRef) (io.ReadCloser, error)

	// List existing files
	List() ([]FileRef, error)

	// Delete existing file
	Delete(file FileRef) error
}

Service defines methods to read, write and manage storage files

func GetService

func GetService(c di.Container) Service

GetService returns an implementation Service from DI container

Jump to

Keyboard shortcuts

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