Documentation ¶
Index ¶
- Variables
- func AggregateKey(key [][32]byte) []byte
- func BytesToFields(encoding []byte, schemaTypePair mudhelpers.SchemaTypePair, ...) *[]Field
- func GetBoolFromTable(db *Database, w *World, rowID string, tableName string) bool
- func GetInt64UsingBytes(db *Database, w *World, rowID [32]byte, tableName string) (int64, error)
- func GetInt64UsingString(db *Database, w *World, rowID string, tableName string) (int64, error)
- func GetRows(db *Database, w *World, tableName string) map[string][]Field
- func SeparatorOffset(maxLenght int, wordLength int) int
- type AddressField
- type ArrayField
- type BoolField
- type BytesField
- type Database
- func (db *Database) AddEvent(tableName string, key string, fields *[]Field)
- func (db *Database) AddRow(table *Table, key []byte, fields *[]Field) MudEvent
- func (db *Database) AddTxSent(tx UnconfirmedTransaction)
- func (db *Database) DeleteRow(table *Table, key []byte) MudEvent
- func (db *Database) GetDefaultWorld() *World
- func (db *Database) GetRow(table *Table, key string) ([]Field, error)
- func (db *Database) GetRowNoMempool(table *Table, key string) ([]Field, error)
- func (db *Database) GetRowUsingBytes(table *Table, key []byte) ([]Field, error)
- func (db *Database) GetRows(table *Table) map[string][]Field
- func (db *Database) GetTable(worldID string, tableID string) *Table
- func (db *Database) GetWorld(worldID string) *World
- func (db *Database) SetDefaultWorld(worldID string)
- func (db *Database) SetField(table *Table, key []byte, event *mudhelpers.StorecoreStoreSetField) MudEvent
- func (db *Database) SetUpdateHandler(handler func(table string, key string, fields *[]Field))
- func (db Database) ToStringList(maxLenght int) []string
- type Event
- type Field
- func BytesToFieldWithDefaults(encoding []byte, schemaTypePair mudhelpers.SchemaTypePair, index uint8, ...) (*[]Field, Field)
- func GetRowFieldsUsingBytes(db *Database, w *World, rowID [32]byte, tableName string) ([]Field, error)
- func GetRowFieldsUsingString(db *Database, w *World, rowID string, tableName string) ([]Field, error)
- func GetRowFromIDUsingBytes(db *Database, w *World, rowID [32]byte, tableName string) (Field, string, error)
- func GetRowFromIDUsingString(db *Database, w *World, rowID string, tableName string) (Field, string, error)
- type FieldData
- type IntField
- type MudEvent
- type StringField
- type Table
- type TableMetadata
- type TableSchema
- type UintField
- type UnconfirmedTransaction
- type World
Constants ¶
This section is empty.
Variables ¶
View Source
var SystemTables = []string{
"schema",
"StoreMetadata",
"Hooks",
"NamespaceOwner",
"InstalledModules",
"ResourceAccess",
"Systems",
"FunctionSelectors",
"SystemRegistry",
"ResourceType",
"KeysWithValue",
}
Functions ¶
func AggregateKey ¶
func BytesToFields ¶
func BytesToFields(encoding []byte, schemaTypePair mudhelpers.SchemaTypePair, fieldnames *[]string) *[]Field
func GetBoolFromTable ¶
func GetInt64UsingBytes ¶
func GetInt64UsingString ¶
func SeparatorOffset ¶
Types ¶
type AddressField ¶
func NewAddressField ¶
func NewAddressField(encoding []byte) AddressField
func (AddressField) String ¶
func (f AddressField) String() string
func (AddressField) Type ¶
func (f AddressField) Type() string
type ArrayField ¶
type ArrayField struct {
Data []FieldData
}
func NewArrayField ¶
func NewArrayField(size int) ArrayField
func (ArrayField) String ¶
func (f ArrayField) String() string
func (ArrayField) Type ¶
func (f ArrayField) Type() string
type BytesField ¶
type BytesField struct {
Data []byte
}
func NewBytesField ¶
func NewBytesField(data []byte) BytesField
func (BytesField) String ¶
func (f BytesField) String() string
func (BytesField) Type ¶
func (f BytesField) Type() string
type Database ¶
type Database struct { Worlds map[string]*World Events []Event LastUpdate time.Time LastHeight uint64 ChainID string UnconfirmedTransactions []UnconfirmedTransaction // contains filtered or unexported fields }
func NewDatabase ¶
func NewDatabase() *Database
func (*Database) AddTxSent ¶
func (db *Database) AddTxSent(tx UnconfirmedTransaction)
func (*Database) GetDefaultWorld ¶
func (*Database) GetRowNoMempool ¶
func (*Database) GetRowUsingBytes ¶
func (*Database) SetDefaultWorld ¶
func (*Database) SetField ¶
func (db *Database) SetField(table *Table, key []byte, event *mudhelpers.StorecoreStoreSetField) MudEvent
func (*Database) SetUpdateHandler ¶
func (Database) ToStringList ¶
type Field ¶
func BytesToFieldWithDefaults ¶
func BytesToFieldWithDefaults(encoding []byte, schemaTypePair mudhelpers.SchemaTypePair, index uint8, fieldnames *[]string) (*[]Field, Field)
func GetRowFieldsUsingBytes ¶
func GetRowFieldsUsingString ¶
func GetRowFromIDUsingBytes ¶
func GetRowFromIDUsingString ¶
type FieldData ¶
func BytesToDynamicField ¶
func BytesToDynamicField(schemaType mudhelpers.SchemaType, encodingSlice []byte) FieldData
func BytesToStaticField ¶
func BytesToStaticField(schemaType mudhelpers.SchemaType, encoding []byte, bytesOffset uint64) FieldData
func FieldWithDefautValue ¶
func FieldWithDefautValue(schemaType mudhelpers.SchemaType) FieldData
type StringField ¶
type StringField struct {
Data string
}
func NewStringField ¶
func NewStringField(data []byte) StringField
func NewStringFieldFromValue ¶
func NewStringFieldFromValue(value string) StringField
func (StringField) String ¶
func (f StringField) String() string
func (StringField) Type ¶
func (f StringField) Type() string
type Table ¶
type Table struct { Metadata *TableMetadata Schema *TableSchema Rows *map[string][]Field }
type TableMetadata ¶
type TableSchema ¶
type TableSchema struct { FieldNames *[]string KeyNames *[]string Schema *mudhelpers.SchemaTypeKV NamedFields *map[string]mudhelpers.SchemaType }
type UnconfirmedTransaction ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.