MCPcopy Create free account
hub / github.com/PasarGuard/node / ToTypedMessage

Function ToTypedMessage

backend/xray/api/message.go:8–17  ·  view source on GitHub ↗
(account proto.Message)

Source from the content-addressed store, hash-verified

6)
7
8func ToTypedMessage(account proto.Message) (*serial.TypedMessage, error) {
9 data, err := proto.Marshal(account)
10 if err != nil {
11 return nil, err
12 }
13 return &serial.TypedMessage{
14 Type: string(proto.MessageName(account)),
15 Value: data,
16 }, nil
17}

Callers 10

MessageMethod · 0.85
MessageMethod · 0.85
MessageMethod · 0.85
MessageMethod · 0.85
MessageMethod · 0.85
MessageMethod · 0.85
AddInboundUserMethod · 0.85
RemoveInboundUserMethod · 0.85
AddOutboundUserMethod · 0.85
RemoveOutboundUserMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected