Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FileService ¶
FileService represents a service for serving files from the local filesystem.
func NewFileService ¶
func NewFileService() *FileService
NewFileService returns a new instance of FileService.
func (*FileService) CreateFile ¶
CreateFile creates a new file with the contents of r.
func (*FileService) FindFileByName ¶
func (s *FileService) FindFileByName(ctx context.Context, name string) (*peapod.File, io.ReadCloser, error)
FindFileByName returns a file and a reader to its contents. The read must be closed by the caller.
func (*FileService) GenerateName ¶
func (s *FileService) GenerateName(ext string) string
GenerateName returns a randomly generated name with the given extension.
Click to show internal directories.
Click to hide internal directories.