api

package
v0.0.0-...-d124ba8 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2019 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetFileContentType

func GetFileContentType(f http.File) (string, error)

func HandleDirList

func HandleDirList(w http.ResponseWriter, r *http.Request, f http.File)

func HandleFileMeta

func HandleFileMeta(w http.ResponseWriter, r *http.Request, f http.File)

Types

type DirectoryFile

type DirectoryFile struct {
	Name string `json:"name"`
}

type DirectoryListing

type DirectoryListing struct {
	Files []DirectoryFile `json:"files"`
}

type FileMeta

type FileMeta struct {
	Name        string `json:"name"`
	Size        int64  `json:"size"`
	ContentType string `json:"content_type"`
}

func (*FileMeta) ForFile

func (fm *FileMeta) ForFile(f http.File) error

type ImageFileMeta

type ImageFileMeta struct {
	FileMeta
	EXIF map[string]string `json:"exif"`
}

ImageFileMeta Extends FileMeta with a [string]string map for EXIF attributes

func (*ImageFileMeta) ForFile

func (fm *ImageFileMeta) ForFile(f http.File) error

ForFile get meta data for file

Jump to

Keyboard shortcuts

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