1
0
mirror of https://github.com/rancher/types.git synced 2025-06-29 23:16:48 +00:00
types/mapper/status.go
Darren Shepherd e76df53327 Move mappers
2017-11-29 14:37:09 -07:00

38 lines
741 B
Go

package mapper
import (
"github.com/rancher/norman/types"
"github.com/rancher/types/status"
)
type Status struct {
}
func (s Status) FromInternal(data map[string]interface{}) {
status.Set(data)
}
func (s Status) ToInternal(data map[string]interface{}) {
}
func (s Status) ModifySchema(schema *types.Schema, schemas *types.Schemas) error {
schema.ResourceFields["state"] = types.Field{
CodeName: "State",
Type: "string",
}
schema.ResourceFields["transitioning"] = types.Field{
CodeName: "Transitioning",
Type: "enum",
Options: []string{
"yes",
"no",
"error",
},
}
schema.ResourceFields["transitioningMessage"] = types.Field{
CodeName: "TransitioningMessage",
Type: "string",
}
return nil
}