daemon: use per-interface features

Signed-off-by: Steffen Vogel <post@steffenvogel.de>
This commit is contained in:
Steffen Vogel
2022-09-30 08:32:26 +02:00
parent 70e437d9a6
commit 92a7ad2f7f
99 changed files with 3510 additions and 2599 deletions

View File

@@ -0,0 +1,16 @@
package hooks
import (
"github.com/stv0g/cunicu/pkg/core"
coreproto "github.com/stv0g/cunicu/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()
}