github.com/s7techlab/cckit@v0.10.5/extensions/debug/doc.md (about) 1 # Protocol Documentation 2 <a name="top"></a> 3 4 ## Table of Contents 5 6 - [debug/debug_state.proto](#debug/debug_state.proto) 7 - [CompositeKey](#extensions.debug.CompositeKey) 8 - [CompositeKeys](#extensions.debug.CompositeKeys) 9 - [Prefix](#extensions.debug.Prefix) 10 - [Prefixes](#extensions.debug.Prefixes) 11 - [PrefixesMatchCount](#extensions.debug.PrefixesMatchCount) 12 - [PrefixesMatchCount.MatchesEntry](#extensions.debug.PrefixesMatchCount.MatchesEntry) 13 - [Value](#extensions.debug.Value) 14 15 - [DebugStateService](#extensions.debug.DebugStateService) 16 17 - [Scalar Value Types](#scalar-value-types) 18 19 20 21 <a name="debug/debug_state.proto"></a> 22 <p align="right"><a href="#top">Top</a></p> 23 24 ## debug/debug_state.proto 25 26 27 28 <a name="extensions.debug.CompositeKey"></a> 29 30 ### CompositeKey 31 State key 32 33 34 | Field | Type | Label | Description | 35 | ----- | ---- | ----- | ----------- | 36 | key | [string](#string) | repeated | | 37 38 39 40 41 42 43 <a name="extensions.debug.CompositeKeys"></a> 44 45 ### CompositeKeys 46 State keys 47 48 49 | Field | Type | Label | Description | 50 | ----- | ---- | ----- | ----------- | 51 | keys | [CompositeKey](#extensions.debug.CompositeKey) | repeated | | 52 53 54 55 56 57 58 <a name="extensions.debug.Prefix"></a> 59 60 ### Prefix 61 State key prefix 62 63 64 | Field | Type | Label | Description | 65 | ----- | ---- | ----- | ----------- | 66 | key | [string](#string) | repeated | parts of key | 67 68 69 70 71 72 73 <a name="extensions.debug.Prefixes"></a> 74 75 ### Prefixes 76 77 78 79 | Field | Type | Label | Description | 80 | ----- | ---- | ----- | ----------- | 81 | prefixes | [Prefix](#extensions.debug.Prefix) | repeated | | 82 83 84 85 86 87 88 <a name="extensions.debug.PrefixesMatchCount"></a> 89 90 ### PrefixesMatchCount 91 State key prefix match count 92 93 94 | Field | Type | Label | Description | 95 | ----- | ---- | ----- | ----------- | 96 | matches | [PrefixesMatchCount.MatchesEntry](#extensions.debug.PrefixesMatchCount.MatchesEntry) | repeated | | 97 98 99 100 101 102 103 <a name="extensions.debug.PrefixesMatchCount.MatchesEntry"></a> 104 105 ### PrefixesMatchCount.MatchesEntry 106 107 108 109 | Field | Type | Label | Description | 110 | ----- | ---- | ----- | ----------- | 111 | key | [string](#string) | | | 112 | value | [uint32](#uint32) | | | 113 114 115 116 117 118 119 <a name="extensions.debug.Value"></a> 120 121 ### Value 122 State value 123 124 125 | Field | Type | Label | Description | 126 | ----- | ---- | ----- | ----------- | 127 | key | [string](#string) | repeated | | 128 | value | [bytes](#bytes) | | | 129 | json | [string](#string) | | | 130 131 132 133 134 135 136 137 138 139 140 141 142 <a name="extensions.debug.DebugStateService"></a> 143 144 ### DebugStateService 145 Debug state service 146 allows to directly manage chaincode state 147 148 | Method Name | Request Type | Response Type | Description | 149 | ----------- | ------------ | ------------- | ------------| 150 | Clean | [Prefixes](#extensions.debug.Prefixes) | [PrefixesMatchCount](#extensions.debug.PrefixesMatchCount) | Clear all state or, if prefixes are defined, only prefix matched | 151 | ListKeys | [Prefix](#extensions.debug.Prefix) | [CompositeKeys](#extensions.debug.CompositeKeys) | Get keys list, returns all keys or, if prefixes are defined, only prefix matched | 152 | GetState | [CompositeKey](#extensions.debug.CompositeKey) | [Value](#extensions.debug.Value) | Get state value by key | 153 | PutState | [Value](#extensions.debug.Value) | [Value](#extensions.debug.Value) | Put state value | 154 | DeleteState | [CompositeKey](#extensions.debug.CompositeKey) | [Value](#extensions.debug.Value) | Delete state value | 155 156 157 158 159 160 ## Scalar Value Types 161 162 | .proto Type | Notes | C++ | Java | Python | Go | C# | PHP | Ruby | 163 | ----------- | ----- | --- | ---- | ------ | -- | -- | --- | ---- | 164 | <a name="double" /> double | | double | double | float | float64 | double | float | Float | 165 | <a name="float" /> float | | float | float | float | float32 | float | float | Float | 166 | <a name="int32" /> int32 | Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint32 instead. | int32 | int | int | int32 | int | integer | Bignum or Fixnum (as required) | 167 | <a name="int64" /> int64 | Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint64 instead. | int64 | long | int/long | int64 | long | integer/string | Bignum | 168 | <a name="uint32" /> uint32 | Uses variable-length encoding. | uint32 | int | int/long | uint32 | uint | integer | Bignum or Fixnum (as required) | 169 | <a name="uint64" /> uint64 | Uses variable-length encoding. | uint64 | long | int/long | uint64 | ulong | integer/string | Bignum or Fixnum (as required) | 170 | <a name="sint32" /> sint32 | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s. | int32 | int | int | int32 | int | integer | Bignum or Fixnum (as required) | 171 | <a name="sint64" /> sint64 | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s. | int64 | long | int/long | int64 | long | integer/string | Bignum | 172 | <a name="fixed32" /> fixed32 | Always four bytes. More efficient than uint32 if values are often greater than 2^28. | uint32 | int | int | uint32 | uint | integer | Bignum or Fixnum (as required) | 173 | <a name="fixed64" /> fixed64 | Always eight bytes. More efficient than uint64 if values are often greater than 2^56. | uint64 | long | int/long | uint64 | ulong | integer/string | Bignum | 174 | <a name="sfixed32" /> sfixed32 | Always four bytes. | int32 | int | int | int32 | int | integer | Bignum or Fixnum (as required) | 175 | <a name="sfixed64" /> sfixed64 | Always eight bytes. | int64 | long | int/long | int64 | long | integer/string | Bignum | 176 | <a name="bool" /> bool | | bool | boolean | boolean | bool | bool | boolean | TrueClass/FalseClass | 177 | <a name="string" /> string | A string must always contain UTF-8 encoded or 7-bit ASCII text. | string | String | str/unicode | string | string | string | String (UTF-8) | 178 | <a name="bytes" /> bytes | May contain any arbitrary sequence of bytes. | string | ByteString | str | []byte | ByteString | string | String (ASCII-8BIT) | 179