degendb

package
v0.7.4 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Accounts

type Accounts struct {
	// Twitter is the Twitter username for this degen
	Twitter string `bson:"twitter,omitempty" json:"twitter"`

	// Telegram is the Telegram username for this degen
	Telegram string `bson:"telegram,omitempty" json:"telegram"`

	// ChatID is the Telegram chat ID for this degen
	TelegramChatID int64 `bson:"telegram_chat_id,omitempty" json:"telegram_chat_id"`
}

type Attribute

type Attribute struct {
	// Name is the name of the attribute
	Name string `json:"name"`

	// Value is the value of the attribute
	Value interface{} `json:"value"`
}

type Collection

type Collection struct {
	// ID is the unique identifier for this collection
	ID primitive.ObjectID `bson:"_id,omitempty" json:"id,omitempty"`

	// Address is the address of the contract
	Address common.Address `bson:"address,omitempty" json:"address,omitempty"`

	// Name is the name of the collection
	Name string `bson:"name,omitempty" json:"name,omitempty"`

	// Slugs are the collection slugs of the collection
	Slugs Slugs `bson:"slugs,omitempty" json:"slugs,omitempty"`

	// Description is the description of the collection
	Description string `bson:"description,omitempty" json:"description,omitempty"`

	// TotalSupply is the total supply of the collection
	TotalSupply int `bson:"total_supply,omitempty" json:"total_supply,omitempty"`

	// ImageURL is the URL of the image of the collection
	ImageURL string `bson:"image_url,omitempty" json:"image_url,omitempty"`

	// ExternalURL is the URL of the collection
	ExternalURL string `bson:"external_url,omitempty" json:"external_url,omitempty"`

	// CreatedAt is the time this collection was created
	CreatedAt time.Time `bson:"created_at,omitempty" json:"created_at,omitempty"`
	// UpdatedAt is the time this collection was last updated
	UpdatedAt time.Time `bson:"updated_at,omitempty" json:"updated_at,omitempty"`
}

type Degen

type Degen struct {
	// ID is the unique identifier for this degen
	ID primitive.ObjectID `bson:"_id,omitempty" json:"id"`

	// Name is the name of the degen
	Name string `bson:"name,omitempty" json:"name"`

	// Accounts contains other accounts of this degen
	Accounts Accounts `bson:"accounts,omitempty" json:"accounts"`

	// Wallets is a list of wallet addresses associated with this degen
	Wallets []Wallet `bson:"wallets,omitempty" json:"wallets"`

	// Tags is a list of tags associated with this degen
	Tags []Tag `bson:"tags,omitempty" json:"tags"`

	// CreatedAt is the time this degen was created
	CreatedAt time.Time `bson:"created_at,omitempty" json:"created_at"`

	// UpdatedAt is the time this degen was last updated
	UpdatedAt time.Time `bson:"updated_at,omitempty" json:"updated_at"`
}

type DegenDB

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

func NewDegenDB

func NewDegenDB() *DegenDB

func (*DegenDB) AddCollectionToken

func (ddb *DegenDB) AddCollectionToken(collections interface{}, tokens interface{})

type Rank

type Rank struct {
	// OpenSea is the OpenSea rank of the token
	OpenSea int64 `bson:"opensea,omitempty" json:"opensea"`

	// Blur is the Blur rank of the token
	Blur int64 `bson:"blur,omitempty" json:"blur"`
}

type Slugs

type Slugs struct {
	// OpenSea is the OpenSea slug of the token
	OpenSea string `bson:"opensea,omitempty" json:"opensea"`

	// Blur is the Blur slug of the token
	Blur string `bson:"blur,omitempty" json:"blur"`
}

type Tag

type Tag string

type Token

type Token struct {
	// ID is the unique identifier for this token
	ID primitive.ObjectID `bson:"_id,omitempty" json:"id"`

	// Collection is the collection this token belongs to
	Collection Collection `bson:"collection,omitempty" json:"collection"`

	// CollectionSlugs are the collection slugs of the collection this token belongs to
	CollectionSlugs Slugs `bson:"collection_slugs,omitempty" json:"collection_slugs"`

	// ContractAddress is the address of the contract this token belongs to
	ContractAddress string `bson:"contract_address,omitempty" json:"contract_address"`

	// Token ID used as in the collection
	TokenID int64 `bson:"token_id,omitempty" json:"token_id"`

	// Name is the name of the token
	Name string `bson:"name,omitempty" json:"name"`

	// Ranks are the ranks of the token
	Rank Rank `bson:"ranks,omitempty" json:"ranks"`

	// Score is the score of the token calculated via the open-rarity algorithm
	Score float64 `bson:"score,omitempty" json:"score"`

	// Metadata is the metadata of the token
	Metadata []Attribute `bson:"metadata,omitempty" json:"metadata"`

	// CreatedAt is the time this token was created
	CreatedAt time.Time `bson:"created_at,omitempty" json:"created_at"`

	// UpdatedAt is the time this token was last updated
	UpdatedAt time.Time `bson:"updated_at,omitempty" json:"updated_at"`
}

type Wallet

type Wallet struct {
	// ID is the unique identifier for this wallet
	ID primitive.ObjectID `bson:"_id,omitempty" json:"id"`

	// Address is the wallet address
	Address common.Address `bson:"address" json:"address"`

	// Tags is a list of tags associated with this wallet
	Tags []Tag `bson:"tags,omitempty" json:"tags"`

	// LastSeen is the time this wallet was last seen
	LastSeen int64 `bson:"last_seen,omitempty" json:"last_seen"`

	// CreatedAt is the time this wallet was created
	CreatedAt int64 `bson:"created_at,omitempty" json:"created_at"`

	// UpdatedAt is the time this wallet was last updated
	UpdatedAt int64 `bson:"updated_at,omitempty" json:"updated_at"`
}

Jump to

Keyboard shortcuts

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