airdrop

package module
v0.0.10 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2024 License: MIT Imports: 9 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	MongoString string = os.Getenv("MONGOSTRING")
)

Functions

func DeleteAirdropFreeByID added in v0.0.3

func DeleteAirdropFreeByID(id primitive.ObjectID) error

func DeleteAirdropPaidByID added in v0.0.3

func DeleteAirdropPaidByID(id primitive.ObjectID) error

func GetAllAirdrop added in v0.0.2

func GetAllAirdrop() ([]interface{}, error)

func GetAllAirdropByName added in v0.0.10

func GetAllAirdropByName(name string) ([]interface{}, error)

func InsertAirdropFree

func InsertAirdropFree(name, task, link, level, status, backed, funds, supply, marketCap, vesting, linkClaim string, price float64, usdIncome int) (interface{}, error)

func InsertAirdropPaid

func InsertAirdropPaid(name, task, link, level, status, backed, funds, supply, marketCap, vesting, linkClaim string, price float64, usdIncome int) (interface{}, error)

func InsertOneDoc

func InsertOneDoc(collection string, doc interface{}) (interface{}, error)

func MongoConnect

func MongoConnect(dbname string) (*mongo.Database, error)

MongoConnect initializes a connection to the MongoDB server.

func UpdateAirdropFreeByID added in v0.0.3

func UpdateAirdropFreeByID(id primitive.ObjectID, name, task, link, level, status, backed, funds, supply, marketCap, vesting, linkClaim string, price float64, usdIncome int) error

func UpdateAirdropPaidByID added in v0.0.3

func UpdateAirdropPaidByID(id primitive.ObjectID, name, task, link, level, status, backed, funds, supply, marketCap, vesting, linkClaim string, price float64, usdIncome int) error

Types

type AirdropFree

type AirdropFree struct {
	ID        primitive.ObjectID `json:"id,omitempty" bson:"_id,omitempty"`
	Name      string             `json:"name,omitempty" bson:"name,omitempty"`
	Task      string             `json:"task,omitempty" bson:"task,omitempty"`
	Link      string             `json:"link,omitempty" bson:"link,omitempty"`
	Level     string             `json:"level,omitempty" bson:"level,omitempty"`
	Status    string             `json:"status,omitempty" bson:"status,omitempty"`
	Backed    string             `json:"backed,omitempty" bson:"backed,omitempty"`
	Funds     string             `json:"funds,omitempty" bson:"funds,omitempty"`
	Supply    string             `json:"supply,omitempty" bson:"supply,omitempty"`
	MarketCap string             `json:"market_cap,omitempty" bson:"market_cap,omitempty"`
	Vesting   string             `json:"vesting,omitempty" bson:"vesting,omitempty"`
	LinkClaim string             `json:"link_claim,omitempty" bson:"link_claim,omitempty"`
	Price     float64            `json:"price,omitempty" bson:"price,omitempty"`
	USDIncome int                `json:"usd_income,omitempty" bson:"usd_income,omitempty"`
	CreatedAt time.Time          `json:"created_at,omitempty" bson:"created_at,omitempty"`
	EndedAt   *time.Time         `json:"ended_at,omitempty" bson:"ended_at,omitempty"`
}

func GetAirdropFreeByID added in v0.0.2

func GetAirdropFreeByID(id primitive.ObjectID) (AirdropFree, error)

func GetAirdropFreeByName added in v0.0.4

func GetAirdropFreeByName(name string) ([]AirdropFree, error)

func GetAllAirdropFree

func GetAllAirdropFree() ([]AirdropFree, error)

type AirdropPaid

type AirdropPaid struct {
	ID        primitive.ObjectID `json:"id,omitempty" bson:"_id,omitempty"`
	Name      string             `json:"name,omitempty" bson:"name,omitempty"`
	Task      string             `json:"task,omitempty" bson:"task,omitempty"`
	Link      string             `json:"link,omitempty" bson:"link,omitempty"`
	Level     string             `json:"level,omitempty" bson:"level,omitempty"`
	Status    string             `json:"status,omitempty" bson:"status,omitempty"`
	Backed    string             `json:"backed,omitempty" bson:"backed,omitempty"`
	Funds     string             `json:"funds,omitempty" bson:"funds,omitempty"`
	Supply    string             `json:"supply,omitempty" bson:"supply,omitempty"`
	MarketCap string             `json:"market_cap,omitempty" bson:"market_cap,omitempty"`
	Vesting   string             `json:"vesting,omitempty" bson:"vesting,omitempty"`
	LinkClaim string             `json:"link_claim,omitempty" bson:"link_claim,omitempty"`
	Price     float64            `json:"price,omitempty" bson:"price,omitempty"`
	USDIncome int                `json:"usd_income,omitempty" bson:"usd_income,omitempty"`
	CreatedAt time.Time          `json:"created_at,omitempty" bson:"created_at,omitempty"`
	EndedAt   *time.Time         `json:"ended_at,omitempty" bson:"ended_at,omitempty"`
}

func GetAirdropPaidByID added in v0.0.2

func GetAirdropPaidByID(id primitive.ObjectID) (AirdropPaid, error)

func GetAirdropPaidByName added in v0.0.4

func GetAirdropPaidByName(name string) ([]AirdropPaid, error)

func GetAllAirdropPaid

func GetAllAirdropPaid() ([]AirdropPaid, error)

Jump to

Keyboard shortcuts

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