Clone current header
()
| 152 | |
| 153 | // Clone current header |
| 154 | func (this *FileHeader) Clone() *FileHeader { |
| 155 | return &FileHeader{ |
| 156 | Version: this.Version, |
| 157 | ModifiedAt: this.ModifiedAt, |
| 158 | ExpiresAt: this.ExpiresAt, |
| 159 | Status: this.Status, |
| 160 | HeaderSize: this.HeaderSize, |
| 161 | BodySize: this.BodySize, |
| 162 | ExpiredBodySize: this.ExpiredBodySize, |
| 163 | HeaderBlocks: this.HeaderBlocks, |
| 164 | BodyBlocks: this.BodyBlocks, |
| 165 | IsCompleted: this.IsCompleted, |
| 166 | IsWriting: this.IsWriting, |
| 167 | } |
| 168 | } |
| 169 | |
| 170 | func (this *FileHeader) Encode(hash string) ([]byte, error) { |
| 171 | headerJSON, err := json.Marshal(this) |
no outgoing calls