Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( ErrAssetNotFound = internalmedia.ErrAssetNotFound ErrRenditionMissing = internalmedia.ErrRenditionMissing )
Re-exported errors from the internal media package.
Functions ¶
func CloneAttachments ¶
func CloneAttachments(src map[string][]*Attachment) map[string][]*Attachment
CloneAttachments performs a deep copy of a resolved media attachment map.
func NormalizeMany ¶
func NormalizeMany(assets map[string]*interfaces.MediaAsset) map[string]*Attachment
NormalizeMany converts multiple resolved assets into attachments keyed by identifier.
Types ¶
type Attachment ¶
type Attachment = internalmedia.Attachment
Re-exported types from the internal media package.
func CloneAttachment ¶
func CloneAttachment(att *Attachment) *Attachment
CloneAttachment copies an attachment and its nested resources.
func Normalize ¶
func Normalize(asset *interfaces.MediaAsset) *Attachment
Normalize converts a resolved media asset into an Attachment DTO.
type Binding ¶
type Binding = internalmedia.Binding
Re-exported types from the internal media package.
type BindingSet ¶
type BindingSet = internalmedia.BindingSet
Re-exported types from the internal media package.
func CloneBindingSet ¶
func CloneBindingSet(src BindingSet) BindingSet
CloneBindingSet performs a deep copy of the binding set to avoid shared references.
type ResolveOptions ¶
type ResolveOptions = internalmedia.ResolveOptions
Re-exported types from the internal media package.
type Resource ¶
type Resource = internalmedia.Resource
Re-exported types from the internal media package.
type Service ¶
type Service = internalmedia.Service
Re-exported types from the internal media package.
func NewNoOpService ¶
func NewNoOpService() Service
NewNoOpService returns a media service that always returns empty results.
func NewService ¶
func NewService(provider interfaces.MediaProvider, opts ...ServiceOption) Service
NewService constructs a media helper service that delegates to the configured provider.
type ServiceOption ¶
type ServiceOption = internalmedia.ServiceOption
Re-exported types from the internal media package.
func WithCache ¶
func WithCache(cache interfaces.CacheProvider, ttl time.Duration) ServiceOption
WithCache configures a cache provider and default TTL for resolved attachments.
func WithDefaultCacheTTL ¶
func WithDefaultCacheTTL(ttl time.Duration) ServiceOption
WithDefaultCacheTTL sets the fallback TTL applied when ResolveOptions do not specify one.
func WithDefaultSignedURLTTL ¶
func WithDefaultSignedURLTTL(ttl time.Duration) ServiceOption
WithDefaultSignedURLTTL sets the fallback TTL used when signed URLs are requested without an explicit expiry.