github.com/0chain/gosdk@v1.17.11/zboxcore/allocationchange/change.go (about) 1 package allocationchange 2 3 import ( 4 "github.com/0chain/gosdk/zboxcore/fileref" 5 ) 6 7 type change struct { 8 Size int64 `json:"size"` 9 NumBlocks int64 `json:"num_of_blocks"` 10 Operation string `json:"operation"` 11 } 12 13 type AllocationChange interface { 14 ProcessChange(rootRef *fileref.Ref, fileIDMeta map[string]string) error 15 GetAffectedPath() []string 16 GetSize() int64 17 } 18 19 type EmptyFileChange struct { 20 change 21 } 22 23 func (ch *EmptyFileChange) ProcessChange(rootRef *fileref.Ref, _ map[string]string) (err error) { 24 return 25 } 26 27 func (ch *EmptyFileChange) GetAffectedPath() []string { 28 return []string{} 29 } 30 31 func (ch *EmptyFileChange) GetSize() int64 { 32 return 0 33 }