model

package
v0.1.0-alpha Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NftQuery = iota
	NativeTxRecordQuery
	Erc20TxRecordQuery
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Attr

type Attr struct {
	TraitType string      `json:"trait_type"`
	Value     interface{} `json:"value"`
}

type BatchMintQueue

type BatchMintQueue struct {
	Reqs []BatchMintReq
	// contains filtered or unexported fields
}

func (*BatchMintQueue) Clear

func (q *BatchMintQueue) Clear()

func (*BatchMintQueue) Len

func (q *BatchMintQueue) Len() int

func (*BatchMintQueue) Push

func (q *BatchMintQueue) Push(x BatchMintReq)

func (*BatchMintQueue) Remove

func (q *BatchMintQueue) Remove(i int) BatchMintReq

type BatchMintReq

type BatchMintReq struct {
	Uuid     string `json:"uuid"`
	TokenID  int64  `json:"token_id"`
	TokenURI string `json:"token_uri"`
}

type CacheData

type CacheData struct {
	Type        string                 `json:"type"`
	GameId      string                 `json:"gameId"`
	BlockNumber string                 `json:"block_number"`
	TokenId     string                 `json:"token_id"`
	Image       string                 `json:"image"`
	Description string                 `json:"description"`
	SpikeInfo   SpikeInfo              `json:"spike_info"`
	Attributes  map[string]interface{} `json:"attributes"`
}

type Metadata

type Metadata struct {
	Name        string    `json:"name"`
	Description string    `json:"description"`
	Image       string    `json:"image"`
	ExternalUrl string    `json:"external_url"`
	Fid         string    `json:"fid"`
	Mid         string    `json:"mid"`
	SpikeInfo   SpikeInfo `json:"spike_info"`
	Attribute   []Attr    `json:"attributes"`
}

type NftOwner

type NftOwner struct {
	Id              string `json:"id" gorm:"primaryKey;column:id;type:varchar(200)"`
	OwnerAddress    string `json:"owner_address" gorm:"column:owner_address;type:varchar(200)"`
	ContractAddress string `json:"contract_address" gorm:"column:contract_address;type:varchar(200)"`
	UpdateTime      int64  `json:"update_time" gorm:"column:update_time;comment:nft owner update time;type:int;default:null"`
	TokenId         int64  `json:"token_id" gorm:"column:token_id;comment:erc721 tx tokenId;type:bigint;default:null"`
}

func (NftOwner) TableName

func (NftOwner) TableName() string

type QueryAction

type QueryAction func(ctx context.Context) error

type QueryRequest

type QueryRequest struct {
	Ctx    context.Context
	Work   QueryAction
	Tp     TaskType
	Done   chan Result
	Weight int
}

type QueryRequestQueue

type QueryRequestQueue []*QueryRequest

func (QueryRequestQueue) Len

func (q QueryRequestQueue) Len() int

func (*QueryRequestQueue) Push

func (q *QueryRequestQueue) Push(x *QueryRequest)

func (*QueryRequestQueue) Remove

func (q *QueryRequestQueue) Remove(i int) *QueryRequest

type Result

type Result struct {
	R   interface{}
	Err error
}

type SpikeInfo

type SpikeInfo struct {
	Version string `json:"version"`
	Tp      string `json:"type"`
	Url     string `json:"url"`
}

type SpikeTx

type SpikeTx struct {
	OrderId         string `json:"order_id" gorm:"primaryKey;column:order_id;type:varchar(200)"`
	Uuid            string `json:"uuid" gorm:"column:uuid;type:varchar(200)"`
	From            string `json:"from" gorm:"column:from;type:varchar(200)"`
	To              string `json:"to" gorm:"column:to;type:varchar(200)"`
	ContractAddress string `json:"contract_address" gorm:"column:contract_address;type:varchar(200)"`
	TxHash          string `json:"tx_hash" gorm:"column:tx_hash;type:varchar(200)"`
	Status          int    `json:"status" gorm:"column:status;type:int"`
	NotifyStatus    int64  `json:"notify_status" gorm:"column:notify_status;type:int"`
	CreateTime      int64  `json:"create_time" gorm:"column:create_time;comment:game order time;type:int;default:null"`
	PayTime         int64  `json:"pay_time" gorm:"column:pay_time;comment:blockchain tx time;type:int;default:null"`
	Amount          string `json:"amount" gorm:"column:amount;comment:erc20 tx amount;type:varchar(200)"`
	TokenId         int64  `json:"token_id" gorm:"column:token_id;comment:erc721 tx tokenId;type:bigint;default:null"`
	Cb              string `json:"cb" gorm:"column:cb;comment:game cb;type:varchar(200)"`
}

func (SpikeTx) TableName

func (SpikeTx) TableName() string

type TaskType

type TaskType int

func (TaskType) String

func (t TaskType) String() string

type WithdrawNFTQueue

type WithdrawNFTQueue struct {
	Reqs []WithdrawNFTReq
	// contains filtered or unexported fields
}

func (*WithdrawNFTQueue) Clear

func (q *WithdrawNFTQueue) Clear()

func (*WithdrawNFTQueue) Len

func (q *WithdrawNFTQueue) Len() int

func (*WithdrawNFTQueue) Push

func (q *WithdrawNFTQueue) Push(x WithdrawNFTReq)

func (*WithdrawNFTQueue) Remove

func (q *WithdrawNFTQueue) Remove(i int) WithdrawNFTReq

type WithdrawNFTReq

type WithdrawNFTReq struct {
	Uuid         string         `json:"uuid"`
	TokenId      int64          `json:"token_id"`
	ToAddress    common.Address `json:"to_address"`
	TokenAddress common.Address `json:"token_address"`
}

type WithdrawTokenQueue

type WithdrawTokenQueue struct {
	Reqs []WithdrawTokenReq
	// contains filtered or unexported fields
}

func (*WithdrawTokenQueue) Clear

func (q *WithdrawTokenQueue) Clear()

func (*WithdrawTokenQueue) Len

func (q *WithdrawTokenQueue) Len() int

func (*WithdrawTokenQueue) Push

func (*WithdrawTokenQueue) Remove

type WithdrawTokenReq

type WithdrawTokenReq struct {
	Uuid         string         `json:"uuid"`
	ToAddress    common.Address `json:"to_address"`
	Amount       string         `json:"amount"`
	TokenAddress common.Address `json:"token_address"`
}

Jump to

Keyboard shortcuts

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