Files
cunicu/pkg/daemon/feature/hooks/marshal.go
Steffen Vogel 92a7ad2f7f daemon: use per-interface features
Signed-off-by: Steffen Vogel <post@steffenvogel.de>
2022-10-07 18:30:50 +02:00

17 lines
385 B
Go

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()
}