github.com/ipld/go-ipld-prime@v0.21.0/traversal/patch/patch.ipldsch (about) 1 # Op represents the kind of operation to perfrom 2 # The current set is based on the JSON Patch specification 3 # We may end up adding more operations in the future 4 type Op enum { 5 | add 6 | remove 7 | replace 8 | move 9 | copy 10 | test 11 } 12 13 # Operation and OperationSequence are the types that describe operations (but not what to apply them on). 14 # See the Instruction type for describing both operations and what to apply them on. 15 type Operation struct { 16 op Op 17 path String 18 value optional Any 19 from optional String 20 } 21 22 type OperationSequence [Operation] 23 24 type Instruction struct { 25 startAt Link 26 operations OperationSequence 27 # future: optional field for adl signalling and/or other lenses 28 } 29 30 type InstructionResult union { 31 | Error "error" 32 | Link "result" 33 } representation keyed 34 35 type Error struct { 36 code String # enum forthcoming 37 message String 38 details {String:String} 39 }