Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Parse ¶
Parse pare given url using appropriate parser it set object Key, Bucket, Parent and transforms
func RegisterParser ¶
RegisterParser add new kind of function to map of decoders
Types ¶
type FileObject ¶
type FileObject struct { Uri *url.URL `json:"uri"` // original request path Bucket string `json:"bucket"` // request matched bucket Key string `json:"key"` // storage path for file with leading slash Transforms transforms.Transforms `json:"transforms"` // list of transform that should be performed Storage config.Storage `json:"storage"` // selected storage that should be used Parent *FileObject // original image for transformed image CheckParent bool // boolen if we should always check if parent exists // contains filtered or unexported fields }
FileObject is representing parsed request for image or file
func NewFileObject ¶
NewFileObject create new instance of FileObject uri is request URL mortConfig should be pointer to current buckets config
func NewFileObjectFromPath ¶
func NewFileObjectFromPath(path string, mortConfig *config.Config) (*FileObject, error)
NewFileObjectFromPath create new instance of FileObject path should be request path mortConfig should be pointer to current buckets config
func (*FileObject) HasParent ¶
func (o *FileObject) HasParent() bool
HasParent inform if object has parent
func (*FileObject) HasTransform ¶
func (o *FileObject) HasTransform() bool
HasTransform inform if object has transform
Click to show internal directories.
Click to hide internal directories.