Versions in this module Expand all Collapse all v0 v0.1.1 Mar 13, 2014 Changes in this version + var BlankImage = &Image + type FileSystemImageSource struct + Config *SourceConfig + Logger *Logger + func (s *FileSystemImageSource) GetImage(request *ImageSourceOptions) *Image type Image + func NewImageFromFile(file *os.File) (*Image, error) type ImageSource + func NewFileSystemImageSourceWithConfig(config *SourceConfig) ImageSource type ImageSourceType + const IMAGE_SOURCE_TYPE_FILESYSTEM type SourceConfig + Directory string v0.1.0 Mar 13, 2014 Changes in this version + const STARTUP_TEMPLATE_STRING + func RegisterSource(sourceType ImageSourceType, factory ImageSourceFactoryFunction) + type Config struct + RouteConfigs []*RouteConfig + ServerConfig *ServerConfig + func NewConfigFromFile(filepath string) *Config + type Halfshell struct + Config *Config + Logger *Logger + Pid int + Routes []*Route + Server *Server + func NewWithConfig(config *Config) *Halfshell + func (h *Halfshell) Run() + type HalfshellRequest struct + ProcessorOptions *ImageProcessorOptions + Route *Route + SourceOptions *ImageSourceOptions + Timestamp time.Time + type HalfshellResponseWriter struct + Size int + Status int + func (hw *HalfshellResponseWriter) SetHeader(name, value string) + func (hw *HalfshellResponseWriter) Write(data []byte) (int, error) + func (hw *HalfshellResponseWriter) WriteError(message string, status int) + func (hw *HalfshellResponseWriter) WriteHeader(status int) + func (hw *HalfshellResponseWriter) WriteImage(image *Image) + type Image struct + Bytes []byte + MimeType string + func NewImageFromHTTPResponse(httpResponse *http.Response) (*Image, error) + type ImageDimensions struct + Height uint64 + Width uint64 + func (d ImageDimensions) AspectRatio() float64 + func (d ImageDimensions) String() string + type ImageProcessor interface + ProcessImage func(*Image, *ImageProcessorOptions) *Image + func NewImageProcessorWithConfig(config *ProcessorConfig) ImageProcessor + type ImageProcessorOptions struct + BlurRadius float64 + Dimensions ImageDimensions + type ImageSource interface + GetImage func(*ImageSourceOptions) *Image + func NewImageSourceWithConfig(config *SourceConfig) ImageSource + func NewS3ImageSourceWithConfig(config *SourceConfig) ImageSource + type ImageSourceFactoryFunction func(*SourceConfig) ImageSource + type ImageSourceOptions struct + Path string + type ImageSourceType string + const IMAGE_SOURCE_TYPE_S3 + type Logger struct + Name string + func NewLogger(nameFormat string, v ...interface{}) *Logger + func (l *Logger) Debug(format string, v ...interface{}) + func (l *Logger) Error(format string, v ...interface{}) + func (l *Logger) Info(format string, v ...interface{}) + func (l *Logger) Log(level, format string, v ...interface{}) + func (l *Logger) Warn(format string, v ...interface{}) + type ProcessorConfig struct + DefaultImageHeight uint64 + DefaultImageWidth uint64 + ImageCompressionQuality uint64 + MaintainAspectRatio bool + MaxBlurRadiusPercentage float64 + MaxImageHeight uint64 + MaxImageWidth uint64 + Name string + type Route struct + ImagePathIndex int + Name string + Pattern *regexp.Regexp + Processor ImageProcessor + Source ImageSource + Statter Statter + func NewRouteWithConfig(config *RouteConfig) *Route + func (p *Route) ShouldHandleRequest(r *http.Request) bool + func (p *Route) SourceAndProcessorOptionsForRequest(r *http.Request) (*ImageSourceOptions, *ImageProcessorOptions) + type RouteConfig struct + ImagePathIndex int + Name string + Pattern *regexp.Regexp + ProcessorConfig *ProcessorConfig + SourceConfig *SourceConfig + type S3ImageSource struct + Config *SourceConfig + Logger *Logger + func (s *S3ImageSource) GetImage(request *ImageSourceOptions) *Image + type Server struct + Logger *Logger + Routes []*Route + func NewServerWithConfigAndRoutes(config *ServerConfig, routes []*Route) *Server + func (s *Server) ImageRequestHandler(w *HalfshellResponseWriter, r *HalfshellRequest) + func (s *Server) LogRequest(w *HalfshellResponseWriter, r *HalfshellRequest) + func (s *Server) NewHalfshellRequest(r *http.Request) *HalfshellRequest + func (s *Server) NewHalfshellResponseWriter(w http.ResponseWriter) *HalfshellResponseWriter + func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request) + type ServerConfig struct + Port uint64 + ReadTimeout uint64 + WriteTimeout uint64 + type SourceConfig struct + Name string + S3AccessKey string + S3Bucket string + S3SecretKey string + Type ImageSourceType + type Statter interface + RegisterRequest func(*HalfshellResponseWriter, *HalfshellRequest) + func NewStatterWithConfig(config *RouteConfig) Statter