gen

package
v0.0.0-...-76fd6e2 Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Category

type Category struct {
	ID   int32
	Name string
}

type Collection

type Collection struct {
	Token         string
	Owner         string
	Name          string
	Description   string
	Metadata      pqtype.NullRawMessage
	Category      int32
	CreatedAt     sql.NullTime
	LastSyncBlock int64
}

type ConsiderationItem

type ConsiderationItem struct {
	ID          int64
	OrderHash   string
	ItemType    int32
	Token       string
	Identifier  string
	Amount      sql.NullString
	StartAmount sql.NullString
	EndAmount   sql.NullString
	Recipient   string
}

type DBTX

type DBTX interface {
	ExecContext(context.Context, string, ...interface{}) (sql.Result, error)
	PrepareContext(context.Context, string) (*sql.Stmt, error)
	QueryContext(context.Context, string, ...interface{}) (*sql.Rows, error)
	QueryRowContext(context.Context, string, ...interface{}) *sql.Row
}

type Event

type Event struct {
	ID        int32
	Name      string
	Token     string
	TokenID   string
	Quantity  sql.NullInt32
	Type      sql.NullString
	Price     sql.NullString
	From      string
	To        sql.NullString
	Date      sql.NullTime
	TxHash    sql.NullString
	OrderHash sql.NullString
}

type FullTextSearchParams

type FullTextSearchParams struct {
	Q        sql.NullString
	IsHidden sql.NullBool
	Owner    sql.NullString
	Token    sql.NullString
	Offset   int32
	Limit    int32
}

type FullTextSearchRow

type FullTextSearchRow struct {
	BlockNumber string
	Token       string
	Identifier  string
	Owner       string
	IsHidden    bool
	Image       interface{}
	Name        interface{}
	Description interface{}
	OrderHash   sql.NullString
	ItemType    sql.NullInt32
	StartPrice  sql.NullString
	EndPrice    sql.NullString
	StartTime   sql.NullString
	EndTime     sql.NullString
}

type GetCollectionParams

type GetCollectionParams struct {
	Token    sql.NullString
	Owner    sql.NullString
	Name     sql.NullString
	Category sql.NullString
	Offset   int32
	Limit    int32
}

type GetCollectionRow

type GetCollectionRow struct {
	Token       string
	Owner       string
	Name        string
	Category    string
	Description string
	Metadata    pqtype.NullRawMessage
	CreatedAt   sql.NullTime
}

type GetEventParams

type GetEventParams struct {
	Name      sql.NullString
	Token     sql.NullString
	TokenID   sql.NullString
	Type      sql.NullString
	Address   sql.NullString
	StartDate sql.NullString
	EndDate   sql.NullString
}

type GetEventRow

type GetEventRow struct {
	Name        string
	Token       string
	TokenID     string
	Quantity    sql.NullInt32
	Type        sql.NullString
	Price       sql.NullString
	From        string
	To          sql.NullString
	Date        sql.NullTime
	TxHash      sql.NullString
	NftImage    string
	NftName     string
	EndTime     sql.NullString
	IsCancelled sql.NullBool
	IsFulfilled sql.NullBool
	OrderHash   sql.NullString
}

type GetExpiredOrderRow

type GetExpiredOrderRow struct {
	Name        string
	OrderHash   string
	EndTime     sql.NullString
	IsCancelled bool
	IsInvalid   bool
	Offerer     string
}

type GetNftParams

type GetNftParams struct {
	Token      string
	Identifier string
}

type GetNotificationParams

type GetNotificationParams struct {
	Address  sql.NullString
	IsViewed sql.NullBool
}

type GetNotificationRow

type GetNotificationRow struct {
	IsViewed  sql.NullBool
	Info      string
	EventName string
	OrderHash string
	Address   string
	Token     string
	TokenID   string
	Quantity  sql.NullInt32
	Type      sql.NullString
	Price     sql.NullString
	From      string
	To        sql.NullString
	Date      sql.NullTime
	Owner     string
	NftImage  string
	NftName   string
}

type GetOfferParams

type GetOfferParams struct {
	Owner sql.NullString
	From  sql.NullString
}

type GetOfferRow

type GetOfferRow struct {
	Name        string
	Token       string
	TokenID     string
	Quantity    sql.NullInt32
	NftImage    string
	NftName     string
	Type        sql.NullString
	OrderHash   sql.NullString
	Price       sql.NullString
	Owner       string
	From        string
	StartTime   sql.NullString
	EndTime     sql.NullString
	IsFulfilled sql.NullBool
	IsCancelled sql.NullBool
	IsExpired   bool
}

type GetOrderParams

type GetOrderParams struct {
	OrderHash               sql.NullString
	Offerer                 sql.NullString
	IsCancelled             sql.NullBool
	IsFulfilled             sql.NullBool
	IsInvalid               sql.NullBool
	ConsiderationToken      sql.NullString
	ConsiderationIdentifier sql.NullString
	OfferToken              sql.NullString
	OfferIdentifier         sql.NullString
}

type InsertCollectionParams

type InsertCollectionParams struct {
	Token       string
	Owner       string
	Name        string
	Description string
	Category    int32
	Metadata    pqtype.NullRawMessage
}

type InsertEventParams

type InsertEventParams struct {
	Name      string
	Token     string
	TokenID   string
	Quantity  sql.NullInt32
	Type      sql.NullString
	Price     sql.NullString
	From      string
	To        sql.NullString
	TxHash    sql.NullString
	OrderHash sql.NullString
}

type InsertNotificationParams

type InsertNotificationParams struct {
	Info      string
	EventName string
	OrderHash string
	Address   string
}

type InsertOrderConsiderationItemParams

type InsertOrderConsiderationItemParams struct {
	OrderHash   string
	ItemType    int32
	Token       string
	Identifier  string
	Amount      sql.NullString
	StartAmount sql.NullString
	EndAmount   sql.NullString
	Recipient   string
}

type InsertOrderOfferItemParams

type InsertOrderOfferItemParams struct {
	OrderHash   string
	ItemType    int32
	Token       string
	Identifier  string
	Amount      sql.NullString
	StartAmount sql.NullString
	EndAmount   sql.NullString
}

type InsertOrderParams

type InsertOrderParams struct {
	OrderHash   string
	Offerer     string
	Recipient   sql.NullString
	Salt        sql.NullString
	StartTime   sql.NullString
	EndTime     sql.NullString
	Signature   sql.NullString
	IsValidated bool
	IsCancelled bool
	IsFulfilled bool
}

type ListNftWithListingParams

type ListNftWithListingParams struct {
	ItemType     int32
	Now          sql.NullString
	LimitListing int32
	IsHidden     sql.NullBool
	Owner        sql.NullString
	Token        sql.NullString
	Identifier   sql.NullString
	OffsetNft    int32
	LimitNft     int32
}

type Marketplace

type Marketplace struct {
	LastSyncBlock int64
}

type MarketplaceSetting

type MarketplaceSetting struct {
	ID          int32
	Marketplace string
	Beneficiary string
	Royalty     string
}

type Nft

type Nft struct {
	Token       string
	Identifier  string
	Owner       string
	TokenUri    sql.NullString
	Metadata    pqtype.NullRawMessage
	IsBurned    bool
	IsHidden    bool
	BlockNumber string
	TxIndex     int64
}

type Notification

type Notification struct {
	ID        int32
	Info      string
	EventName string
	OrderHash string
	Address   string
	IsViewed  sql.NullBool
}

type OfferItem

type OfferItem struct {
	ID          int64
	OrderHash   string
	ItemType    int32
	Token       string
	Identifier  string
	Amount      sql.NullString
	StartAmount sql.NullString
	EndAmount   sql.NullString
}

type Order

type Order struct {
	OrderHash   string
	Offerer     string
	Recipient   sql.NullString
	Salt        sql.NullString
	StartTime   sql.NullString
	EndTime     sql.NullString
	Signature   sql.NullString
	IsCancelled bool
	IsValidated bool
	IsFulfilled bool
	IsInvalid   bool
}

type Queries

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

func New

func New(db DBTX) *Queries

func Prepare

func Prepare(ctx context.Context, db DBTX) (*Queries, error)

func (*Queries) Close

func (q *Queries) Close() error

func (*Queries) FullTextSearch

func (q *Queries) FullTextSearch(ctx context.Context, arg FullTextSearchParams) ([]FullTextSearchRow, error)

func (*Queries) GetCategoryByName

func (q *Queries) GetCategoryByName(ctx context.Context, name string) (Category, error)

func (*Queries) GetCollection

func (q *Queries) GetCollection(ctx context.Context, arg GetCollectionParams) ([]GetCollectionRow, error)

func (*Queries) GetCollectionLastSyncBlock

func (q *Queries) GetCollectionLastSyncBlock(ctx context.Context, token string) (int64, error)

func (*Queries) GetEvent

func (q *Queries) GetEvent(ctx context.Context, arg GetEventParams) ([]GetEventRow, error)

func (*Queries) GetExpiredOrder

func (q *Queries) GetExpiredOrder(ctx context.Context, now sql.NullString) ([]GetExpiredOrderRow, error)

func (*Queries) GetMarketplaceLastSyncBlock

func (q *Queries) GetMarketplaceLastSyncBlock(ctx context.Context) (int64, error)

func (*Queries) GetMarketplaceSettings

func (q *Queries) GetMarketplaceSettings(ctx context.Context, marketplace string) (MarketplaceSetting, error)

func (*Queries) GetNft

func (q *Queries) GetNft(ctx context.Context, arg GetNftParams) (Nft, error)

func (*Queries) GetNotification

func (q *Queries) GetNotification(ctx context.Context, arg GetNotificationParams) ([]GetNotificationRow, error)

func (*Queries) GetOffer

func (q *Queries) GetOffer(ctx context.Context, arg GetOfferParams) ([]GetOfferRow, error)

func (*Queries) GetOrder

func (q *Queries) GetOrder(ctx context.Context, arg GetOrderParams) ([]json.RawMessage, error)

func (*Queries) InsertCategory

func (q *Queries) InsertCategory(ctx context.Context, name string) (Category, error)

func (*Queries) InsertCollection

func (q *Queries) InsertCollection(ctx context.Context, arg InsertCollectionParams) (Collection, error)

func (*Queries) InsertEvent

func (q *Queries) InsertEvent(ctx context.Context, arg InsertEventParams) (Event, error)

func (*Queries) InsertNotification

func (q *Queries) InsertNotification(ctx context.Context, arg InsertNotificationParams) (Notification, error)

func (*Queries) InsertOrder

func (q *Queries) InsertOrder(ctx context.Context, arg InsertOrderParams) (Order, error)

func (*Queries) InsertOrderConsiderationItem

func (q *Queries) InsertOrderConsiderationItem(ctx context.Context, arg InsertOrderConsiderationItemParams) (ConsiderationItem, error)

func (*Queries) InsertOrderOfferItem

func (q *Queries) InsertOrderOfferItem(ctx context.Context, arg InsertOrderOfferItemParams) (OfferItem, error)

func (*Queries) ListNftWithListing

func (q *Queries) ListNftWithListing(ctx context.Context, arg ListNftWithListingParams) ([]json.RawMessage, error)

func (*Queries) UpdateCollectionLastSyncBlock

func (q *Queries) UpdateCollectionLastSyncBlock(ctx context.Context, arg UpdateCollectionLastSyncBlockParams) error

func (*Queries) UpdateMarketplaceLastSyncBlock

func (q *Queries) UpdateMarketplaceLastSyncBlock(ctx context.Context, lastSyncBlock int64) error

func (*Queries) UpdateMarketplaceSettings

func (q *Queries) UpdateMarketplaceSettings(ctx context.Context, arg UpdateMarketplaceSettingsParams) (MarketplaceSetting, error)

func (*Queries) UpdateNft

func (q *Queries) UpdateNft(ctx context.Context, arg UpdateNftParams) (Nft, error)

func (*Queries) UpdateNotification

func (q *Queries) UpdateNotification(ctx context.Context, arg UpdateNotificationParams) (Notification, error)

func (*Queries) UpdateOrderStatus

func (q *Queries) UpdateOrderStatus(ctx context.Context, arg UpdateOrderStatusParams) ([]Order, error)

func (*Queries) UpdateOrderStatusByOffer

func (q *Queries) UpdateOrderStatusByOffer(ctx context.Context, arg UpdateOrderStatusByOfferParams) ([]Order, error)

func (*Queries) UpsertNftLatest

func (q *Queries) UpsertNftLatest(ctx context.Context, arg UpsertNftLatestParams) (Nft, error)

func (*Queries) WithTx

func (q *Queries) WithTx(tx *sql.Tx) *Queries

type UpdateCollectionLastSyncBlockParams

type UpdateCollectionLastSyncBlockParams struct {
	Token         string
	LastSyncBlock int64
}

type UpdateMarketplaceSettingsParams

type UpdateMarketplaceSettingsParams struct {
	NMarketplace sql.NullString
	NBeneficiary sql.NullString
	NRoyalty     sql.NullString
	Marketplace  string
}

type UpdateNftParams

type UpdateNftParams struct {
	IsHidden   sql.NullBool
	IsBurned   sql.NullBool
	Metadata   pqtype.NullRawMessage
	Token      string
	Identifier string
}

type UpdateNotificationParams

type UpdateNotificationParams struct {
	EventName sql.NullString
	OrderHash sql.NullString
}

type UpdateOrderStatusByOfferParams

type UpdateOrderStatusByOfferParams struct {
	IsValidated sql.NullBool
	IsCancelled sql.NullBool
	IsFulfilled sql.NullBool
	IsInvalid   sql.NullBool
	Offerer     string
	Token       string
	Identifier  string
}

type UpdateOrderStatusParams

type UpdateOrderStatusParams struct {
	IsValidated sql.NullBool
	IsCancelled sql.NullBool
	IsFulfilled sql.NullBool
	IsInvalid   sql.NullBool
	OrderHash   sql.NullString
	Offerer     sql.NullString
}

type UpsertNftLatestParams

type UpsertNftLatestParams struct {
	Token       string
	Identifier  string
	Owner       string
	IsBurned    bool
	BlockNumber string
	TxIndex     int64
	TokenUri    sql.NullString
}

Jump to

Keyboard shortcuts

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