AllEncodingsForWrites is the list of encodings that can create new blocks.
()
| 115 | |
| 116 | // AllEncodingsForWrites is the list of encodings that can create new blocks. |
| 117 | func AllEncodingsForWrites() []VersionedEncoding { |
| 118 | var writeable []VersionedEncoding |
| 119 | for _, enc := range AllEncodings() { |
| 120 | if enc.WritesSupported() { |
| 121 | writeable = append(writeable, enc) |
| 122 | } |
| 123 | } |
| 124 | return writeable |
| 125 | } |
| 126 | |
| 127 | // OpenBlock for reading in the backend. It automatically chooses the encoding for the given block. |
| 128 | func OpenBlock(meta *backend.BlockMeta, r backend.Reader) (common.BackendBlock, error) { |