mirror of
https://codeberg.org/cunicu/cunicu.git
synced 2025-10-01 23:22:30 +08:00
17 lines
385 B
Go
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()
|
|
}
|