2020-01-17 23:53:33 +08:00
|
|
|
package service
|
2020-01-17 00:10:15 +08:00
|
|
|
|
|
|
|
import (
|
|
|
|
"time"
|
|
|
|
|
2020-01-30 14:39:00 +03:00
|
|
|
"github.com/micro/go-micro/v2/config/source"
|
|
|
|
proto "github.com/micro/go-micro/v2/config/source/service/proto"
|
2020-01-17 00:10:15 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
func toChangeSet(c *proto.ChangeSet) *source.ChangeSet {
|
|
|
|
return &source.ChangeSet{
|
2020-03-14 00:44:55 +03:00
|
|
|
Data: []byte(c.Data),
|
2020-01-17 00:10:15 +08:00
|
|
|
Checksum: c.Checksum,
|
|
|
|
Format: c.Format,
|
|
|
|
Timestamp: time.Unix(c.Timestamp, 0),
|
|
|
|
Source: c.Source,
|
|
|
|
}
|
|
|
|
}
|