Documentation ¶
Index ¶
- func GetMimeType(file *File) (string, error)
- func IsAudioFile(file *File) bool
- func IsImage(mimetype string) bool
- func IsImageFile(file *File) bool
- func IsTextFile(file *File) bool
- func IsVideoFile(file *File) bool
- type File
- type GeoInformation
- type Item
- func (item *Item) Files() []*File
- func (item *Item) FolderName() string
- func (item *Item) GetFile(fileRoute route.Route) *File
- func (item *Item) IsFileCollection() bool
- func (item *Item) IsPhysical() bool
- func (item *Item) IsVirtual() bool
- func (item *Item) Route() route.Route
- func (item *Item) String() string
- type ItemType
- type MetaData
- type SortItemsBy
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetMimeType ¶ added in v0.10.0
GetMimeType returns the mime type if the given file model.
func IsAudioFile ¶ added in v0.10.0
IsAudioFile returns true if the supplied file model is an audio file.
func IsImageFile ¶ added in v0.10.0
IsImageFile returns true if the supplied file model is an image.
func IsTextFile ¶ added in v0.10.0
IsTextFile returns true if the supplied file model is a text file.
func IsVideoFile ¶ added in v0.10.0
IsVideoFile returns true if the supplied file model is a video file.
Types ¶
type File ¶
type File struct {
dataaccess.File
}
A File represents a file ressource that is associated with an Item.
type GeoInformation ¶
type Item ¶
type Item struct { Type ItemType Title string Description string Content string Markdown string Hash string MetaData MetaData // contains filtered or unexported fields }
An Item represents a single document.
func (*Item) FolderName ¶
func (*Item) GetFile ¶
Get the file which matches the supplied route. Returns nil if there is no matching file.
func (*Item) IsFileCollection ¶
func (*Item) IsPhysical ¶
type MetaData ¶
type MetaData struct { Language string CreationDate time.Time LastModifiedDate time.Time Tags []string Aliases []string Author string GeoInformation GeoInformation }
MetaData defines meta-attributes of repository items.
func NewMetaData ¶
func NewMetaData() *MetaData
NewMetaData creates a new instance of the the MetaData struct.
type SortItemsBy ¶
func (SortItemsBy) Sort ¶
func (by SortItemsBy) Sort(items []*Item)
Click to show internal directories.
Click to hide internal directories.