In an effort to abstract the data types Aurum supports for storage in blocks, a Serializable interface should be made. This interface would support two functions: Serialize and Deserialize.
The Serialize function should return a []byte and an error.
The Deserialize function should take a []byte as a parameter and return an error.
As far as organization goes, this can go into a package called interfaces.
In an effort to abstract the data types Aurum supports for storage in blocks, a
Serializable
interface should be made. This interface would support two functions:Serialize
andDeserialize
.The
Serialize
function should return a[]byte
and anerror
. TheDeserialize
function should take a[]byte
as a parameter and return anerror
.As far as organization goes, this can go into a package called
interfaces
.Resource on go interfaces: https://gobyexample.com/interfaces