Documentation ¶
Index ¶
- func NewIsDuplicateMedia(ctx context.Context, srcMedia mediatype.Format) (mediatype.VisitorFunc[bool], error)
- func NewMediaExtAliases(ctx context.Context) mediatype.VisitorFunc[map[string]struct{}]
- func NewMediaMetadataFilename(_ context.Context, outDir *string, ...) mediatype.VisitorFunc[MediaMetadata]
- func NewMediaPath(ctx context.Context) mediatype.VisitorFunc[string]
- type MediaMetadata
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewIsDuplicateMedia ¶
func NewIsDuplicateMedia(ctx context.Context, srcMedia mediatype.Format) (mediatype.VisitorFunc[bool], error)
NewIsDuplicateMedia is a mediatype visitor that will determine whether 2 media formats are the same
func NewMediaExtAliases ¶
func NewMediaExtAliases(ctx context.Context) mediatype.VisitorFunc[map[string]struct{}]
NewMediaExtAliases is a mediatype visitor that will get all known media extension aliases
func NewMediaMetadataFilename ¶
func NewMediaMetadataFilename( _ context.Context, outDir *string, useLastModifiedDate, timestampAsFilename, useOutputMagicSignature bool, ) mediatype.VisitorFunc[MediaMetadata]
NewMediaMetadataFilename is a mediatype visitor that will generate metadata info on a provided media file - useLastModifiedDate: Fallback to using the last modified date if no EXIF data exists on the media - timestampAsFilename: Use the Unix EPOCH time as the output file name. - useOutputMagicSignature: Use the identified mediatype Ext as the extension of the output filename TODO(dtrejo): Rename useLastModifiedDate to fallbackToLastModifiedDate to better describe what this variable actually does.
func NewMediaPath ¶
func NewMediaPath(ctx context.Context) mediatype.VisitorFunc[string]
NewMediaPath is a mediatype visitor that will get the path from a media format
Types ¶
type MediaMetadata ¶
type MediaMetadata struct { // OutPath is an appropriate new output filename for the provided mediatype format. OutPath string Timestamp time.Time }
MediaMetadata is the return type from the MediaMetadataFilename visitor