(topic *Topic)
| 935 | } |
| 936 | |
| 937 | func pbTopicSerializeToDesc(topic *Topic) *pbx.TopicDesc { |
| 938 | if topic == nil { |
| 939 | return nil |
| 940 | } |
| 941 | return &pbx.TopicDesc{ |
| 942 | CreatedAt: timeToInt64(&topic.created), |
| 943 | UpdatedAt: timeToInt64(&topic.updated), |
| 944 | Defacs: &pbx.DefaultAcsMode{ |
| 945 | Auth: topic.accessAuth.String(), |
| 946 | Anon: topic.accessAnon.String(), |
| 947 | }, |
| 948 | SeqId: int32(topic.lastID), |
| 949 | DelId: int32(topic.delID), |
| 950 | Public: interfaceToBytes(topic.public), |
| 951 | Trusted: interfaceToBytes(topic.trusted), |
| 952 | } |
| 953 | } |
| 954 | |
| 955 | func pbTopicSubSliceSerialize(subs []MsgTopicSub) []*pbx.TopicSub { |
| 956 | if len(subs) == 0 { |
no test coverage detected
searching dependent graphs…