Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { Version string `yaml:"version"` Port int `yaml:"port"` // Port on which the server should run Domain string `yaml:"domain"` // URL of the server domain (example: https://example.com or localhost:8080) Database *Database `yaml:"database"` Storage *Storage `yaml:"storage"` AllowedContentTypes []mediateq.ContentType `yaml:"allowed_content_types"` MaxFileSizeBytes int64 `yaml:"max_file_size_bytes"` DeleteAllowed bool `yaml:"delete_allowed"` DefaultImageSize ImageSize `yaml:"default_image_size"` ThumbnailSizes []mediateq.ThumbnailSize `yaml:"thumbnail_sizes"` }
Config is the global configuration object of mediateq server
func (*Config) IsContentTypeAllowed ¶
func (c *Config) IsContentTypeAllowed(contentType mediateq.ContentType) bool
IsContentTypeAllowed function searches the allowed content Types slice for the given content type and returns true if it is found, or false if it is not.
func (*Config) ParseAndValidate ¶
type ImageSize ¶
ImageSize represent a size of an image. To preserve aspect ratio of the original image only the width should set (height should be 0)
type Storage ¶
type Storage struct { Type mediateq.StorageType `yaml:"type"` // The type of storage used by the to read and write files UploadPath string `yaml:"upload_path"` // Path to the folder were files should be uploaded }
Click to show internal directories.
Click to hide internal directories.