MCPcopy Create free account
hub / github.com/LagrangeDev/LagrangeGo / BuildContent

Method BuildContent

message/build.go:241–256  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

239}
240
241func (e *FileElement) BuildContent() []byte {
242 content, _ := proto.Marshal(&message.FileExtra{
243 File: &message.NotOnlineFile{
244 FileSize: proto.Int64(int64(e.FileSize)),
245 FileType: proto.Int32(0),
246 FileUuid: proto.String(e.FileUUID),
247 FileMd5: e.FileMd5,
248 FileName: proto.String(e.FileName),
249 Subcmd: proto.Int32(1),
250 DangerEvel: proto.Int32(0),
251 ExpireTime: proto.Int32(int32(time.Now().Add(7 * 24 * time.Hour).Unix())),
252 FileHash: proto.String(e.FileHash),
253 },
254 })
255 return content
256}
257
258func (e *MarketFaceElement) BuildElement() []*message.Elem {
259 mFace := &message.MarketFace{

Callers

nothing calls this directly

Calls 4

MarshalFunction · 0.92
Int64Function · 0.92
Int32Function · 0.92
StringFunction · 0.92

Tested by

no test coverage detected