mirror of
https://github.com/eosswedenorg/thalos
synced 2026-06-18 04:40:03 +02:00
21 lines
582 B
Go
21 lines
582 B
Go
package ship
|
|
|
|
import (
|
|
"github.com/mitchellh/mapstructure"
|
|
"github.com/shufflingpixels/antelope-go/chain"
|
|
)
|
|
|
|
type ContractRow struct {
|
|
Code chain.Name `mapstructure:"code"`
|
|
Scope chain.Name `mapstructure:"scope"`
|
|
Table chain.Name `mapstructure:"table"`
|
|
PrimaryKey string `mapstructure:"primary_key"`
|
|
Payer chain.Name `mapstructure:"payer"`
|
|
Value chain.Bytes `mapstructure:"value"`
|
|
}
|
|
|
|
func DecodeContractRow(v map[string]interface{}) (*ContractRow, error) {
|
|
out := &ContractRow{}
|
|
err := mapstructure.WeakDecode(v, out)
|
|
return out, err
|
|
}
|