本文整理匯總了Golang中github.com/cayleygraph/cayley/graph/proto.LogDelta.Timestamp方法的典型用法代碼示例。如果您正苦於以下問題:Golang LogDelta.Timestamp方法的具體用法?Golang LogDelta.Timestamp怎麽用?Golang LogDelta.Timestamp使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類github.com/cayleygraph/cayley/graph/proto.LogDelta
的用法示例。
在下文中一共展示了LogDelta.Timestamp方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Golang代碼示例。
示例1: deltaToProto
func deltaToProto(delta graph.Delta) proto.LogDelta {
var newd proto.LogDelta
newd.ID = uint64(delta.ID.Int())
newd.Action = int32(delta.Action)
newd.Timestamp = delta.Timestamp.UnixNano()
newd.Quad = proto.MakeQuad(delta.Quad)
return newd
}
示例2: deltaToProto
func deltaToProto(delta graph.Delta) proto.LogDelta {
var newd proto.LogDelta
newd.ID = uint64(delta.ID.Int())
newd.Action = int32(delta.Action)
newd.Timestamp = delta.Timestamp.UnixNano()
newd.Quad = &proto.Quad{
Subject: delta.Quad.Subject,
Predicate: delta.Quad.Predicate,
Object: delta.Quad.Object,
Label: delta.Quad.Label,
}
return newd
}