impl

package
v1.0.1-beta-1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 20, 2023 License: MIT, Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewACL

func NewACL(store sqlstore.SystemStore, registry tables.TablelandTables) tableland.ACL

NewACL creates a new instance of the ACL.

func NewInstrumentedTablelandMesa

func NewInstrumentedTablelandMesa(t tableland.Tableland) (tableland.Tableland, error)

NewInstrumentedTablelandMesa creates a new InstrumentedTablelandMesa.

func NewTablelandMesa

func NewTablelandMesa(
	parser parsing.SQLValidator,
	userStore sqlstore.UserStore,
	chainStacks map[tableland.ChainID]chains.ChainStack,
) tableland.Tableland

NewTablelandMesa creates a new TablelandMesa.

Types

type InstrumentedTablelandMesa

type InstrumentedTablelandMesa struct {
	// contains filtered or unexported fields
}

InstrumentedTablelandMesa is the main implementation of Tableland spec with instrumentaion.

func (*InstrumentedTablelandMesa) GetReceipt

func (t *InstrumentedTablelandMesa) GetReceipt(
	ctx context.Context,
	chainID tableland.ChainID,
	txnHash string,
) (bool, *tableland.TxnReceipt, error)

GetReceipt returns the receipt for a txn hash.

func (*InstrumentedTablelandMesa) RelayWriteQuery

func (t *InstrumentedTablelandMesa) RelayWriteQuery(
	ctx context.Context,
	chainID tableland.ChainID,
	caller common.Address,
	stmt string,
) (tables.Transaction, error)

RelayWriteQuery allows the user to rely on the validator to wrap a write-query in a chain transaction.

func (*InstrumentedTablelandMesa) RunReadQuery

func (t *InstrumentedTablelandMesa) RunReadQuery(ctx context.Context, stmt string) (*tableland.TableData, error)

RunReadQuery allows the user to run SQL.

func (*InstrumentedTablelandMesa) SetController

func (t *InstrumentedTablelandMesa) SetController(
	ctx context.Context,
	chainID tableland.ChainID,
	caller common.Address,
	controller common.Address,
	tableID tables.TableID,
) (tables.Transaction, error)

SetController allows users to the controller for a token id.

func (*InstrumentedTablelandMesa) ValidateCreateTable

func (t *InstrumentedTablelandMesa) ValidateCreateTable(
	ctx context.Context,
	chainID tableland.ChainID,
	stmt string,
) (string, error)

ValidateCreateTable validates a CREATE TABLE statement and returns its structure hash.

func (*InstrumentedTablelandMesa) ValidateWriteQuery

func (t *InstrumentedTablelandMesa) ValidateWriteQuery(
	ctx context.Context,
	chainID tableland.ChainID,
	stmt string,
) (tables.TableID, error)

ValidateWriteQuery validates a statement that would mutate a table and returns the table ID.

type TablelandMesa

type TablelandMesa struct {
	// contains filtered or unexported fields
}

TablelandMesa is the main implementation of Tableland spec.

func (*TablelandMesa) GetReceipt

func (t *TablelandMesa) GetReceipt(
	ctx context.Context,
	chainID tableland.ChainID,
	txnHash string,
) (bool, *tableland.TxnReceipt, error)

GetReceipt returns the receipt of a processed event by txn hash.

func (*TablelandMesa) RelayWriteQuery

func (t *TablelandMesa) RelayWriteQuery(
	ctx context.Context,
	chainID tableland.ChainID,
	caller common.Address,
	statement string,
) (tables.Transaction, error)

RelayWriteQuery allows the user to rely on the validator wrapping the query in a chain transaction.

func (*TablelandMesa) RunReadQuery

func (t *TablelandMesa) RunReadQuery(ctx context.Context, statement string) (*tableland.TableData, error)

RunReadQuery allows the user to run SQL.

func (*TablelandMesa) SetController

func (t *TablelandMesa) SetController(
	ctx context.Context,
	chainID tableland.ChainID,
	caller common.Address,
	controller common.Address,
	tableID tables.TableID,
) (tables.Transaction, error)

SetController allows users to the controller for a token id.

func (*TablelandMesa) ValidateCreateTable

func (t *TablelandMesa) ValidateCreateTable(
	_ context.Context,
	chainID tableland.ChainID,
	statement string,
) (string, error)

ValidateCreateTable allows to validate a CREATE TABLE statement and also return the structure hash of it. This RPC method is stateless.

func (*TablelandMesa) ValidateWriteQuery

func (t *TablelandMesa) ValidateWriteQuery(
	ctx context.Context,
	chainID tableland.ChainID,
	statement string,
) (tables.TableID, error)

ValidateWriteQuery allows the user to validate a write query.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL