model/meta/MetaTargetHostType.go

37 lines
769 B
Go
Raw Normal View History

2018-08-12 10:46:46 +00:00
package meta
type MetaTargetHostType struct {
MetaTargetType
}
type MetaTargetHostTypeEnum int
const (
MetaTargetHostTypeEnumUNKNOWN MetaTargetHostTypeEnum = iota + 1
)
var (
metaTargetHostTypeEnumID = map[MetaTargetHostTypeEnum]string{
MetaTargetHostTypeEnumUNKNOWN: "UNKNOWN",
}
metaTargetHostTypeEnumKey = map[string]MetaTargetHostTypeEnum{
"UNKNOWN": MetaTargetHostTypeEnumUNKNOWN,
}
)
func (e MetaTargetHostTypeEnum) String() string {
return metaTargetHostTypeEnumID[e]
}
func ToMetaTargetHostTypeEnum(v *MetaTargetHostType) MetaTargetHostTypeEnum {
return metaTargetHostTypeEnumKey[v.Key]
}
func ToMetaTargetHostType(v MetaTargetHostTypeEnum) *MetaTargetHostType {
m := &MetaTargetHostType{}
m.Key = metaTargetHostTypeEnumID[v]
return m
}