1
0
mirror of https://github.com/imgproxy/imgproxy.git synced 2025-12-23 22:11:10 +02:00
Files
imgproxy/monitoring/meta.go
2025-10-01 20:05:06 +02:00

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
}