mirror of
https://codeberg.org/cunicu/cunicu.git
synced 2025-10-07 01:33:05 +08:00
daemon: use per-interface features
Signed-off-by: Steffen Vogel <post@steffenvogel.de>
This commit is contained in:
16
pkg/daemon/feature/hooks/marshal.go
Normal file
16
pkg/daemon/feature/hooks/marshal.go
Normal 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()
|
||||
}
|
Reference in New Issue
Block a user