added
probe task
This commit is contained in:
37
proxy/meta/meta_probe_task_type.go
Normal file
37
proxy/meta/meta_probe_task_type.go
Normal file
@@ -0,0 +1,37 @@
|
||||
package meta
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"git.loafle.net/overflow/commons_go/model/timestamp"
|
||||
"strconv"
|
||||
)
|
||||
|
||||
|
||||
const (
|
||||
PROBE_TASK_TYPE_DISOCVERY = 1
|
||||
|
||||
)
|
||||
var metaProbeTaskTypeMap = map[int]string{
|
||||
1: "DISOCVERY",
|
||||
}
|
||||
|
||||
|
||||
type MetaProbeTaskType struct {
|
||||
Id json.Number `json:"id,Number,omitempty"`
|
||||
Name string `json:"name,omitempty"`
|
||||
Description string `json:"description,omitempty"`
|
||||
CreateDate timestamp.Timestamp `json:"createDate,omitempty"`
|
||||
}
|
||||
|
||||
func NewMetaProbeTaskType(types int) *MetaProbeTaskType {
|
||||
|
||||
str := metaProbeTaskTypeMap[types]
|
||||
|
||||
if len(str) <= 0 {
|
||||
return nil
|
||||
}
|
||||
return &MetaProbeTaskType{
|
||||
Id:json.Number(strconv.Itoa(types)),
|
||||
Name:str,
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user