You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
35 lines
509 B
35 lines
509 B
package model |
|
|
|
import ( |
|
"time" |
|
|
|
xtime "go-common/library/time" |
|
) |
|
|
|
// ES . |
|
type ES struct { |
|
Addr string |
|
} |
|
|
|
// Offset . |
|
type Offset struct { |
|
OffID int64 |
|
OffTime xtime.Time |
|
ReviewID int64 |
|
ReviewTime int64 |
|
} |
|
|
|
// OffsetID . |
|
func (o *Offset) OffsetID() int64 { |
|
return o.OffID - o.ReviewID |
|
} |
|
|
|
// OffsetTime . |
|
func (o *Offset) OffsetTime() string { |
|
return time.Unix(int64(o.OffTime), 0).Format("2006-01-02 15:04:05") |
|
} |
|
|
|
// var . |
|
var ( |
|
ExistsAction = map[string]bool{"repair": true, "all": true} |
|
)
|
|
|