Documentation ¶
Index ¶
Constants ¶
View Source
const ( // DefaultFormat is the default image format DefaultFormat = "png" // DefaultQuality is the default quality for processed images DefaultQuality = 95 // DefaultUserAgent is the default user-agent header to fetch images from URL with. // n.b. application version later appended to this. DefaultUserAgent = "picfit" // DefaultMimetypeDetector method to use DefaultMimetypeDetector = "extension" // DefaultPort is the default port of the application server DefaultPort = 3001 // DefaultShardWidth is the default shard width DefaultShardWidth = 0 // DefaultShardDepth is the default shard depth DefaultShardDepth = 0 // DefaultShardRestOnly is the default shard rest behaviour DefaultShardRestOnly = true )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AllowedSize ¶
AllowedSize is a struct used in the allowed_sizes option
type Config ¶
type Config struct { AllowedHeaders []string `mapstructure:"allowed_headers"` AllowedMethods []string `mapstructure:"allowed_methods"` AllowedOrigins []string `mapstructure:"allowed_origins"` Debug bool Engine *engineconfig.Config KVStore *store.Config Logger logger.Config Options *Options Port int SecretKey string `mapstructure:"secret_key"` Sentry *Sentry Shard *Shard Storage *storage.Config }
Config is a struct to load configuration flags
func LoadFromContent ¶
LoadFromContent creates a Config struct from a config content
type Options ¶
type Options struct { AllowedIPAddresses []string `mapstructure:"allowed_ip_addresses"` AllowedSizes []AllowedSize `mapstructure:"allowed_sizes"` DefaultUserAgent string `mapstructure:"default_user_agent"` EnableCascadeDelete bool `mapstructure:"enable_cascade_delete"` EnableDelete bool `mapstructure:"enable_delete"` EnableHealth bool `mapstructure:"enable_health"` EnablePprof bool `mapstructure:"enable_pprof"` EnableStats bool `mapstructure:"enable_stats"` EnableUpload bool `mapstructure:"enable_upload"` EnablePrometheus bool `mapstructure:"enable_prometheus"` MimetypeDetector string `mapstructure:"mimetype_detector"` FreeMemoryInterval int `mapstructure:"free_memory_interval"` TransformTimeout int `mapstructure:"transform_timeout"` }
Options is a struct to add options to the application
Click to show internal directories.
Click to hide internal directories.