(ctx context.Context, oref waveobj.ORef, fileName string, data []byte)
| 772 | } |
| 773 | |
| 774 | func doWFSAppend(ctx context.Context, oref waveobj.ORef, fileName string, data []byte) error { |
| 775 | err := filestore.WFS.AppendData(ctx, oref.OID, fileName, data) |
| 776 | if err != nil { |
| 777 | return err |
| 778 | } |
| 779 | wps.Broker.Publish(wps.WaveEvent{ |
| 780 | Event: wps.Event_BlockFile, |
| 781 | Scopes: []string{ |
| 782 | oref.String(), |
| 783 | }, |
| 784 | Data: &wps.WSFileEventData{ |
| 785 | ZoneId: oref.OID, |
| 786 | FileName: fileName, |
| 787 | FileOp: wps.FileOp_Append, |
| 788 | Data64: base64.StdEncoding.EncodeToString(data), |
| 789 | }, |
| 790 | }) |
| 791 | return nil |
| 792 | } |
| 793 | |
| 794 | func handleAppendJobFile(ctx context.Context, jobId string, fileName string, data []byte) error { |
| 795 | err := doWFSAppend(ctx, waveobj.MakeORef(waveobj.OType_Job, jobId), fileName, data) |
no test coverage detected