2018-04-26 07:37:59 +00:00
|
|
|
package meta
|
2018-04-12 09:38:04 +00:00
|
|
|
|
2018-05-10 09:30:39 +00:00
|
|
|
import (
|
|
|
|
"encoding/json"
|
2018-06-12 13:13:22 +00:00
|
|
|
|
2018-06-12 09:18:11 +00:00
|
|
|
"git.loafle.net/overflow/commons-go/core/util"
|
2018-05-10 09:30:39 +00:00
|
|
|
)
|
2018-04-12 09:38:04 +00:00
|
|
|
|
|
|
|
type MetaNoAuthProbeStatus struct {
|
2018-06-12 09:18:11 +00:00
|
|
|
ID json.Number `json:"id,Number,omitempty"`
|
2018-06-12 13:13:22 +00:00
|
|
|
Key string `json:"key,omitempty"`
|
2018-06-12 09:18:11 +00:00
|
|
|
Name string `json:"name,omitempty"`
|
|
|
|
CreateDate *util.Timestamp `json:"createDate,omitempty"`
|
2018-04-12 09:38:04 +00:00
|
|
|
}
|
2018-05-10 09:30:39 +00:00
|
|
|
|
2018-06-13 11:38:40 +00:00
|
|
|
type MetaNoAuthProbeStatusEnum int
|
2018-05-10 09:30:39 +00:00
|
|
|
|
|
|
|
const (
|
2018-06-13 11:38:40 +00:00
|
|
|
MetaNoAuthProbeStatusEnumACCEPT MetaNoAuthProbeStatusEnum = iota + 1
|
|
|
|
MetaNoAuthProbeStatusEnumDENY
|
|
|
|
MetaNoAuthProbeStatusEnumPROCESSING
|
2018-05-10 09:30:39 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
var (
|
2018-06-13 11:38:40 +00:00
|
|
|
metaNoAuthProbeStatusEnumID = map[MetaNoAuthProbeStatusEnum]string{
|
|
|
|
MetaNoAuthProbeStatusEnumACCEPT: "ACCEPT",
|
|
|
|
MetaNoAuthProbeStatusEnumDENY: "DENY",
|
|
|
|
MetaNoAuthProbeStatusEnumPROCESSING: "PROCESSING",
|
2018-05-10 09:30:39 +00:00
|
|
|
}
|
|
|
|
|
2018-06-13 11:38:40 +00:00
|
|
|
metaNoAuthProbeStatusEnumKey = map[string]MetaNoAuthProbeStatusEnum{
|
|
|
|
"ACCEPT": MetaNoAuthProbeStatusEnumACCEPT,
|
|
|
|
"DENY": MetaNoAuthProbeStatusEnumDENY,
|
|
|
|
"PROCESSING": MetaNoAuthProbeStatusEnumPROCESSING,
|
2018-05-10 09:30:39 +00:00
|
|
|
}
|
|
|
|
)
|
|
|
|
|
2018-06-13 11:38:40 +00:00
|
|
|
func (e MetaNoAuthProbeStatusEnum) String() string {
|
|
|
|
return metaNoAuthProbeStatusEnumID[e]
|
2018-06-13 10:02:43 +00:00
|
|
|
}
|
|
|
|
|
2018-06-13 11:38:40 +00:00
|
|
|
func ToMetaNoAuthProbeStatusEnum(v *MetaNoAuthProbeStatus) MetaNoAuthProbeStatusEnum {
|
|
|
|
return metaNoAuthProbeStatusEnumKey[v.Key]
|
2018-05-10 09:30:39 +00:00
|
|
|
}
|
|
|
|
|
2018-06-13 11:38:40 +00:00
|
|
|
func ToMetaNoAuthProbeStatus(v MetaNoAuthProbeStatusEnum) *MetaNoAuthProbeStatus {
|
2018-06-12 09:18:11 +00:00
|
|
|
return &MetaNoAuthProbeStatus{
|
2018-06-13 11:38:40 +00:00
|
|
|
Key: metaNoAuthProbeStatusEnumID[v],
|
2018-05-10 09:30:39 +00:00
|
|
|
}
|
|
|
|
}
|