models

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: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EnumTask

type EnumTask string
const (
	TaskNewCollection EnumTask = "TaskNewCollection"
	TaskNewErc721     EnumTask = "TaskNewErc721"
)

type GetNftReq

type GetNftReq struct {
	ContractAddr string `query:"contract_addr"`
	TokenId      string `param:"tokenId"`
}

type GetNftsReq

type GetNftsReq struct {
	ContractAddr string `query:"contract_addr" validate:"omitempty,eth_addr"`
	Owner        string `query:"owner" validate:"omitempty,eth_addr"`
	Offset       int32  `query:"offset" validate:"gte=0"`
}

type GetNftsRes

type GetNftsRes struct {
	Nfts   []Nft `json:"nfts"`
	Limit  int32 `json:"limit"`
	Offset int32 `json:"offset"`
}

type HTTPError

type HTTPError struct {
	Code int
	Err  error
}

func NewHTTPError

func NewHTTPError(code int, err error) *HTTPError

func (*HTTPError) Error

func (e *HTTPError) Error() string

type Listing

type Listing struct {
	ListingId    *big.Int       `json:"listing_id"`
	ContractAddr common.Address `json:"contract_addr"`
	TokenId      *big.Int       `json:"token_id"`
	Seller       common.Address `json:"seller"`
	Price        *big.Int       `json:"price"`
}

type NewCollectionTask

type NewCollectionTask struct {
	Address common.Address `json:"address"`
}

type NewErc721Task

type NewErc721Task struct {
	Token      common.Address `json:"token"`
	Identifier *big.Int       `json:"idientifier"`
}

type Nft

type Nft struct {
	TokenId      *big.Int       `json:"token_id"`
	ContractAddr common.Address `json:"contract_addr"`
	Owner        common.Address `json:"owner"`
	Listing      *NftListing    `json:"listing,omitempty"`
	Metadata     *NftMetadata   `json:"metadata,omitempty"`
}

type NftListing

type NftListing struct {
	ListingId *big.Int       `json:"listing_id"`
	Seller    common.Address `json:"seller"`
	Price     *big.Int       `json:"price"`
}

type NftMetadata

type NftMetadata struct {
	Name        string `json:"name"`
	Description string `json:"description"`
	Image       string `json:"image"`
}

type NftTransfer

type NftTransfer struct {
	Token      common.Address
	Identifier *big.Int
	From       common.Address
	To         common.Address
}

type Response

type Response struct {
	Data      any  `json:"data,omitempty"`
	IsSuccess bool `json:"is_success"`
	Error     any  `json:"error,omitempty"`
}

Jump to

Keyboard shortcuts

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