Documentation ¶
Index ¶
- Constants
- func CreateLogger(module string, logfile string, loglevel string) (log *logging.Logger, lf *os.File)
- func DefaultCertificate() (*tls.Certificate, error)
- func KeyPair(domain string, expiration time.Time) ([]byte, []byte, error)
- func ListenAndServeHTTP3(addr string, certs []tls.Certificate, handler http.Handler) error
- func MimeRelevance(mimetype string) (relevance int)
- func PemCert(privKey *rsa.PrivateKey, domain string, expiration time.Time) ([]byte, error)
- func UniqueId() string
- type FFProbe
- type ImagickIdentify
- type Indexer
- func (idx *Indexer) GetImageMetadata(filename string) (width, height, duration int64, mimetype, sub string, ...)
- func (idx *Indexer) GetMetadata(filename string, _type, subtype, mimetype string) (width, height, duration int64, _mimetype, sub string, ...)
- func (idx *Indexer) GetType(filename string) (_type, subtype, mimetype string, metadata map[string]interface{}, err error)
- func (idx *Indexer) GetVideoMetadata(filename string) (width, height, duration int64, mimetype, sub string, ...)
- func (idx *Indexer) SetMediaHandler(mh *MediaHandler)
- type MediaHandler
- func (s *MediaHandler) DoPanic(writer http.ResponseWriter, status int, message string, jsonresult bool)
- func (mh *MediaHandler) DoPanicf(writer http.ResponseWriter, status int, message string, jsonresult bool, ...)
- func (mh *MediaHandler) FileOpenRead(path string, opts filesystem.FileGetOptions) (filesystem.ReadSeekerCloser, os.FileInfo, error)
- func (mh *MediaHandler) FileWrite(path string, reader io.Reader, size int64, opts filesystem.FilePutOptions) error
- func (mh *MediaHandler) GetCache(collection, signature, action, paramstr string) (*database.Cache, error)
- func (mh *MediaHandler) GetFS(path string) (filesystem.FileSystem, string, string, error)
- func (mh *MediaHandler) ServeContent(w http.ResponseWriter, r *http.Request, path string)
- func (mh *MediaHandler) ServeHTTP(resp http.ResponseWriter, req *http.Request)
- func (mh *MediaHandler) SetRoutes(router *mux.Router) error
- type ParamBuilder
- type SF
- type SFFiles
- type SFIdentifier
- type SFMatches
- type ServerHTTP3
- type SideStream
- type Siegfried
Constants ¶
View Source
const DefaultDomain = "TRAEFIK DEFAULT CERT"
DefaultDomain Traefik domain for the default certificate.
Variables ¶
This section is empty.
Functions ¶
func CreateLogger ¶
func DefaultCertificate ¶
func DefaultCertificate() (*tls.Certificate, error)
DefaultCertificate generates random TLS certificates.
func ListenAndServeHTTP3 ¶
func MimeRelevance ¶
holistic function to give some mimetypes a relevance
Types ¶
type FFProbe ¶
type FFProbe struct {
// contains filtered or unexported fields
}
func NewFFProbe ¶
func NewFFProbe(mh *MediaHandler, command string) (*FFProbe, error)
func (*FFProbe) GetMetadata ¶
func (*FFProbe) SetMediaHandler ¶
func (fp *FFProbe) SetMediaHandler(mh *MediaHandler)
type ImagickIdentify ¶
type ImagickIdentify struct {
// contains filtered or unexported fields
}
func NewImagickIdentify ¶
func NewImagickIdentify(mh *MediaHandler, identify, convert string) (*ImagickIdentify, error)
func (*ImagickIdentify) GetMetadata ¶
func (*ImagickIdentify) SetMediaHandler ¶
func (ii *ImagickIdentify) SetMediaHandler(mh *MediaHandler)
type Indexer ¶
type Indexer struct { Siegfried *Siegfried // contains filtered or unexported fields }
func NewIndexer ¶
func (*Indexer) GetImageMetadata ¶
func (*Indexer) GetMetadata ¶
func (*Indexer) GetVideoMetadata ¶
func (*Indexer) SetMediaHandler ¶
func (idx *Indexer) SetMediaHandler(mh *MediaHandler)
type MediaHandler ¶
type MediaHandler struct {
// contains filtered or unexported fields
}
func NewMediaHandler ¶
func NewMediaHandler( prefix string, mdb *database.MediaDatabase, idx *Indexer, pbx ParamBuilder, tempdir string, log *logging.Logger, fss []filesystem.FileSystem, actions []media.Action) (*MediaHandler, error)
func (*MediaHandler) DoPanic ¶
func (s *MediaHandler) DoPanic(writer http.ResponseWriter, status int, message string, jsonresult bool)
func (*MediaHandler) DoPanicf ¶
func (mh *MediaHandler) DoPanicf(writer http.ResponseWriter, status int, message string, jsonresult bool, a ...interface{})
func (*MediaHandler) FileOpenRead ¶
func (mh *MediaHandler) FileOpenRead(path string, opts filesystem.FileGetOptions) (filesystem.ReadSeekerCloser, os.FileInfo, error)
func (*MediaHandler) FileWrite ¶
func (mh *MediaHandler) FileWrite(path string, reader io.Reader, size int64, opts filesystem.FilePutOptions) error
func (*MediaHandler) GetCache ¶
func (mh *MediaHandler) GetCache(collection, signature, action, paramstr string) (*database.Cache, error)
func (*MediaHandler) GetFS ¶
func (mh *MediaHandler) GetFS(path string) (filesystem.FileSystem, string, string, error)
func (*MediaHandler) ServeContent ¶
func (mh *MediaHandler) ServeContent(w http.ResponseWriter, r *http.Request, path string)
func (*MediaHandler) ServeHTTP ¶
func (mh *MediaHandler) ServeHTTP(resp http.ResponseWriter, req *http.Request)
type ParamBuilder ¶
type SFIdentifier ¶
type ServerHTTP3 ¶
type ServerHTTP3 struct {
// contains filtered or unexported fields
}
func NewServerHTTP3 ¶
func (*ServerHTTP3) ListenAndServeHTTP3 ¶
func (s *ServerHTTP3) ListenAndServeHTTP3(cert, key string, mh *MediaHandler) error
func (*ServerHTTP3) Shutdown ¶
func (s *ServerHTTP3) Shutdown(ctx context.Context)
type SideStream ¶
type SideStream struct {
// contains filtered or unexported fields
}
func NewSideStream ¶
func NewSideStream(tempfolder string, size int) (*SideStream, error)
func (*SideStream) Clear ¶
func (ss *SideStream) Clear()
func (*SideStream) Close ¶
func (ss *SideStream) Close()
func (*SideStream) GetBytes ¶
func (ss *SideStream) GetBytes() []byte
func (*SideStream) GetSHA256 ¶
func (ss *SideStream) GetSHA256() string
func (*SideStream) Open ¶
func (ss *SideStream) Open() (string, error)
type Siegfried ¶
type Siegfried struct {
// contains filtered or unexported fields
}
func NewSiegfried ¶
func NewSiegfried(mh *MediaHandler, urlstring string) (*Siegfried, error)
func (*Siegfried) SetMediaHandler ¶
func (sf *Siegfried) SetMediaHandler(mh *MediaHandler)
Click to show internal directories.
Click to hide internal directories.