mirror of
https://codeberg.org/cunicu/cunicu.git
synced 2025-09-27 05:06:02 +08:00
17 lines
365 B
Go
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()
|
|
}
|