[DEPRECATED] Go implementation of plcbundle
at main 1.2 kB view raw
1package plcbundle 2 3import ( 4 "time" 5 6 "tangled.org/atscan.net/plcbundle-go/internal/plcclient" 7) 8 9// Bundle represents a PLC bundle (public version) 10type Bundle struct { 11 BundleNumber int 12 StartTime time.Time 13 EndTime time.Time 14 Operations []plcclient.PLCOperation 15 DIDCount int 16 Hash string 17 CompressedSize int64 18 UncompressedSize int64 19} 20 21// BundleInfo provides metadata about a bundle 22type BundleInfo struct { 23 BundleNumber int `json:"bundle_number"` 24 StartTime time.Time `json:"start_time"` 25 EndTime time.Time `json:"end_time"` 26 OperationCount int `json:"operation_count"` 27 DIDCount int `json:"did_count"` 28 Hash string `json:"hash"` 29 CompressedSize int64 `json:"compressed_size"` 30 UncompressedSize int64 `json:"uncompressed_size"` 31} 32 33// IndexStats provides statistics about the bundle index 34type IndexStats struct { 35 BundleCount int 36 FirstBundle int 37 LastBundle int 38 TotalSize int64 39 MissingBundles []int 40} 41 42// Helper to convert internal bundle to public 43func toBundlePublic(_ interface{}) *Bundle { 44 // Implement conversion from internal bundle to public Bundle 45 return &Bundle{} // placeholder 46}