func GetDeviceMetadata(ctx context.Context) (metadata *Metadata, ok bool) {
	metadata, ok = ctx.Value(metadataKey).(*Metadata)
	return
}
GetDeviceMetadata returns the device metadata from the context if any.
package device
import (
	"context"
	"net/http"
)
type key int
const (
	idKey key = iota
	metadataKey
)
func GetID(ctx context.Context) (id ID, ok bool) {
	id, ok = ctx.Value(idKey).(ID)
	return
}
func WithID(parent context.Context, id ID) context.Context {
	return context.WithValue(parent, idKey, id)
}
func WithIDRequest(id ID, original *http.Request) *http.Request {
	return original.WithContext(
		WithID(original.Context(), id),
	)
}
func WithDeviceMetadata(parent context.Context, metadata *Metadata) context.Context {
	return context.WithValue(parent, metadataKey, metadata)
}