Documentation ¶
Overview ¶
Package file provides a imageserver.Server implementation that get the Image from a file.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Server ¶
type Server struct { // Root is the directory where images are loaded from. Root string // Identify identifies the Image format. // By default, it uses IdentifyMime(). Identify func(pth string, data []byte) (format string, err error) }
Server is a imageserver.Server implementation that get the Image from a file.
It takes the "source" param and loads it from the Root directory. It expects a slash separated path.
func (*Server) Get ¶
func (srv *Server) Get(params imageserver.Params) (*imageserver.Image, error)
Get implements imageserver.Server.
Click to show internal directories.
Click to hide internal directories.