micro/config/source/service/util.go

19 lines
379 B
Go
Raw Normal View History

package service
2020-01-16 19:10:15 +03:00
import (
"time"
"github.com/micro/go-micro/v2/config/source"
proto "github.com/micro/go-micro/v2/config/source/service/proto"
2020-01-16 19:10:15 +03:00
)
func toChangeSet(c *proto.ChangeSet) *source.ChangeSet {
return &source.ChangeSet{
Data: []byte(c.Data),
2020-01-16 19:10:15 +03:00
Checksum: c.Checksum,
Format: c.Format,
Timestamp: time.Unix(c.Timestamp, 0),
Source: c.Source,
}
}