file

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2021 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Metadata

type Metadata struct {
	Version     int64
	Filename    string
	ContentType string
	Size        string
}

type Options

type Options struct {
	BaseURL         string
	MetadataBackend app.RemovableBackend
	FileBackend     app.RemovableFastBackend
	Logger          *zap.Logger
}

type Service

type Service struct {
	Options
}

func NewService

func NewService(option Options) (*Service, error)

func (*Service) RetrieveRoute

func (s *Service) RetrieveRoute(r chi.Router) http.Handler

RetrieveRoute returns a mountable router for retrieving files. Alternatively, it can mount directly to the provided router.

func (*Service) SaveRoute

func (s *Service) SaveRoute(r chi.Router) http.Handler

SaveRoute returns a mountable router for saving file. Alternatively, it can mount directly to the provided router

Jump to

Keyboard shortcuts

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