Files
cunicu/pkg/feat/hooks/marshal.go
2022-09-01 08:55:16 +02:00

17 lines
365 B
Go

package hooks
import (
"riasc.eu/wice/pkg/core"
coreproto "riasc.eu/wice/pkg/proto/core"
)
func marshalRedactedInterface(i *core.Interface) *coreproto.Interface {
return i.MarshalWithPeers(func(p *core.Peer) *coreproto.Peer {
return p.Marshal().Redact()
}).Redact()
}
func marshalRedactedPeer(p *core.Peer) *coreproto.Peer {
return p.Marshal().Redact()
}