mirror of
https://github.com/rancher/types.git
synced 2025-06-28 06:26:49 +00:00
17 lines
478 B
Go
17 lines
478 B
Go
package mapper
|
|
|
|
import (
|
|
"github.com/rancher/norman/types"
|
|
m "github.com/rancher/norman/types/mapper"
|
|
)
|
|
|
|
func NewWorkloadTypeMapper() types.Mapper {
|
|
return &types.Mappers{
|
|
&m.Move{From: "labels", To: "workloadLabels"},
|
|
&m.Move{From: "annotations", To: "workloadAnnotations"},
|
|
&m.Move{From: "metadata/labels", To: "labels", NoDeleteFromField: true},
|
|
&m.Move{From: "metadata/annotations", To: "annotations", NoDeleteFromField: true},
|
|
&m.Drop{Field: "metadata"},
|
|
}
|
|
}
|