| 14 | ) |
| 15 | |
| 16 | type DataBuilder struct { |
| 17 | Type DataUploadType |
| 18 | Hash []byte |
| 19 | Size int64 |
| 20 | ChunkCount int32 |
| 21 | |
| 22 | // chunkIndex is the index of the next chunk to be added. |
| 23 | chunkIndex int32 |
| 24 | mu sync.Mutex |
| 25 | data []byte |
| 26 | } |
| 27 | |
| 28 | func NewDataBuilder(req *DataUpload) (*DataBuilder, error) { |
| 29 | if len(req.DataHash) != 32 { |
nothing calls this directly
no outgoing calls
no test coverage detected