Documentation ¶
Index ¶
- Constants
- Variables
- type Gateway
- type GatewayService
- func (g *GatewayService) GetReceiptByTransactionHash(ctx context.Context, txnHash common.Hash) (sqlstore.Receipt, bool, error)
- func (g *GatewayService) GetTableMetadata(ctx context.Context, id tables.TableID) (sqlstore.TableMetadata, error)
- func (g *GatewayService) RunReadQuery(ctx context.Context, statement string) (*tableland.TableData, error)
- type InstrumentedGateway
- func (g *InstrumentedGateway) GetReceiptByTransactionHash(ctx context.Context, hash common.Hash) (sqlstore.Receipt, bool, error)
- func (g *InstrumentedGateway) GetTableMetadata(ctx context.Context, id tables.TableID) (sqlstore.TableMetadata, error)
- func (g *InstrumentedGateway) RunReadQuery(ctx context.Context, statement string) (*tableland.TableData, error)
Constants ¶
View Source
const ( // DefaultMetadataImage is the default image for table's metadata. DefaultMetadataImage = "https://bafkreifhuhrjhzbj4onqgbrmhpysk2mop2jimvdvfut6taiyzt2yqzt43a.ipfs.dweb.link" // DefaultAnimationURL is an empty string. It means that the attribute will not appear in the JSON metadata. DefaultAnimationURL = "" )
Variables ¶
View Source
var ErrTableNotFound = errors.New("table not found")
ErrTableNotFound indicates that the table doesn't exist.
Functions ¶
This section is empty.
Types ¶
type Gateway ¶
type Gateway interface { RunReadQuery(ctx context.Context, stmt string) (*tableland.TableData, error) GetTableMetadata(context.Context, tables.TableID) (sqlstore.TableMetadata, error) GetReceiptByTransactionHash(context.Context, common.Hash) (sqlstore.Receipt, bool, error) }
Gateway defines the gateway operations.
func NewGateway ¶
func NewGateway( parser parsing.SQLValidator, stores map[tableland.ChainID]sqlstore.SystemStore, extURLPrefix string, metadataRendererURI string, animationRendererURI string, ) (Gateway, error)
NewGateway creates a new gateway service.
func NewInstrumentedGateway ¶
NewInstrumentedGateway creates a new InstrumentedGateway.
type GatewayService ¶
type GatewayService struct {
// contains filtered or unexported fields
}
GatewayService implements the Gateway interface using SQLStore.
func (*GatewayService) GetReceiptByTransactionHash ¶
func (g *GatewayService) GetReceiptByTransactionHash( ctx context.Context, txnHash common.Hash, ) (sqlstore.Receipt, bool, error)
GetReceiptByTransactionHash returns a receipt by transaction hash.
func (*GatewayService) GetTableMetadata ¶
func (g *GatewayService) GetTableMetadata(ctx context.Context, id tables.TableID) (sqlstore.TableMetadata, error)
GetTableMetadata returns table's metadata fetched from SQLStore.
func (*GatewayService) RunReadQuery ¶
func (g *GatewayService) RunReadQuery(ctx context.Context, statement string) (*tableland.TableData, error)
RunReadQuery allows the user to run SQL.
type InstrumentedGateway ¶
type InstrumentedGateway struct {
// contains filtered or unexported fields
}
InstrumentedGateway implements the Gateway interface using SQLStore.
func (*InstrumentedGateway) GetReceiptByTransactionHash ¶
func (g *InstrumentedGateway) GetReceiptByTransactionHash( ctx context.Context, hash common.Hash, ) (sqlstore.Receipt, bool, error)
GetReceiptByTransactionHash implements system.SystemService.
func (*InstrumentedGateway) GetTableMetadata ¶
func (g *InstrumentedGateway) GetTableMetadata( ctx context.Context, id tables.TableID, ) (sqlstore.TableMetadata, error)
GetTableMetadata returns table's metadata fetched from SQLStore.
func (*InstrumentedGateway) RunReadQuery ¶
func (g *InstrumentedGateway) RunReadQuery(ctx context.Context, statement string) (*tableland.TableData, error)
RunReadQuery allows the user to run SQL.
Click to show internal directories.
Click to hide internal directories.