mirror of
https://github.com/imgproxy/imgproxy.git
synced 2025-12-23 22:11:10 +02:00
23 lines
527 B
Go
23 lines
527 B
Go
package monitoring
|
|
|
|
// Metadata key names
|
|
const (
|
|
MetaSourceImageURL = "imgproxy.source_image_url"
|
|
MetaSourceImageOrigin = "imgproxy.source_image_origin"
|
|
MetaOptions = "imgproxy.options"
|
|
)
|
|
|
|
// Meta represents a set of metadata key-value pairs.
|
|
type Meta map[string]any
|
|
|
|
// Filter creates a copy of Meta with only the specified keys.
|
|
func (m Meta) Filter(only ...string) Meta {
|
|
filtered := make(Meta)
|
|
for _, key := range only {
|
|
if value, ok := m[key]; ok {
|
|
filtered[key] = value
|
|
}
|
|
}
|
|
return filtered
|
|
}
|