Documentation
¶
Index ¶
- func JSONMarshal(v interface{}) (driver.Value, error)
- func JSONUnmarshal(value interface{}, v interface{}) error
- type Activity
- type ActivityType
- type Asset
- type AssetMetadata
- type Campaign
- type CampaignContent
- type CampaignInsertion
- type CampaignShare
- type CampaignShares
- type Claim
- type Comment
- type CommentInput
- type CommentInvestment
- type CommentInvestments
- type Frontpage
- type InvestmentAmounts
- type InvestmentAmountsList
- type LP
- type Odds
- type Outcome
- type OutcomeIds
- type OutcomeList
- type Pnl
- type Position
- type PriceEvent
- type PriceMetadata
- type Profile
- type Settings
- type Share
- type TrackedTradingContract
- type UnclaimedCampaign
- type Wallet
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func JSONMarshal ¶
func JSONUnmarshal ¶
func JSONUnmarshal(value interface{}, v interface{}) error
Types ¶
type Activity ¶
type Activity struct {
// Transaction hash of the activity.
TxHash string `json:"txHash"`
// Address of the recipient involved in the activity.
Recipient string `json:"recipient"`
// Pool address associated with the activity.
PoolAddress string `json:"poolAddress"`
// Amount of the asset being transferred from.
FromAmount int `json:"fromAmount"`
// Symbol of the asset being transferred from.
FromSymbol string `json:"fromSymbol"`
// Amount of the asset being transferred to.
ToAmount int `json:"toAmount"`
// Symbol of the asset being transferred to.
ToSymbol string `json:"toSymbol"`
// Type of the activity (buy, sell).
Type ActivityType `json:"type"`
// ID of the outcome associated with the activity.
OutcomeID string `json:"outcomeId"`
// ID of the campaign associated with the activity.
CampaignID string `json:"campaignId"`
// Total volume of the activity.
TotalVolume int `json:"totalVolume"`
// Timestamp of when the activity was created.
CreatedAt time.Time `json:"createdAt"`
// Content of the campaign associated with the activity.
CampaignContent CampaignContent `json:"campaignContent"`
}
type ActivityType ¶
type ActivityType string
const ( ActivityTypeBuy ActivityType = "buy" ActivityTypeSell ActivityType = "sell" )
type AssetMetadata ¶
type Campaign ¶
type Campaign struct {
ID string `gorm:"primaryKey"`
CreatedAt time.Time `gorm:"autoCreateTime"`
UpdatedAt time.Time `gorm:"autoUpdateTime"`
Content CampaignContent `json:"content"`
TotalVolume int `json:"totalVolume"`
InvestmentAmounts InvestmentAmountsList `json:"investmentAmounts" gorm:"type:jsonb"`
LiquidityVested int `json:"liquidityVested"`
Odds Odds `json:"odds" gorm:"type:jsonb"`
}
type CampaignContent ¶
type CampaignContent struct {
// Name of the campaign.
Name string `json:"name"`
// Description of the campaign in simple text.
Description string `json:"description"`
// Picture of the campaign as base64 string.
Picture *string `json:"picture"`
// Categories associated with this campaign.
Categories []string `json:"categories"`
// Number to salt the identifier (id of the campaigns) of the outcome
Seed int `json:"seed"`
// Creator of the campaign.
Creator *Wallet `json:"creator"`
// Defines the method used to determine the winner of a campaign.
Settlement string `json:"settlement"`
// Oracle description defines under which conditions campaigns conclude if infra market used as settlement source
OracleDescription *string `json:"oracleDescription"`
// Oracle URLs are helper sources for documents when the infrastructure market is used as a settlement source.
OracleUrls []*string `json:"oracleUrls"`
// Pool address to purchase shares, and to receive the cost function.
PoolAddress string `json:"poolAddress"`
// Outcomes associated with this campaign.
Outcomes OutcomeList `json:"outcomes"`
// Ending date of the campaign. Unix timestamp in miliseconds.
Ending int `json:"ending"`
// Starting date of the campaign. Unix timestamp in miliseconds.
Starting int `json:"starting"`
// X/Twitter username.
X *string `json:"x"`
// Telegram username.
Telegram *string `json:"telegram"`
// Web url
Web *string `json:"web"`
// If any outcome declared as winner, it returns bytes8 id
Winner *string `json:"winner"`
// IsDpm for markets it is true, for amms false
IsDpm *bool `json:"isDpm"`
// IsDppm market?
IsDppm *bool `json:"isDppm"`
// PriceMetadata that's used for displaying to the frontend in a structured way.
PriceMetadata *PriceMetadata `json:"priceMetadata"`
}
func (*CampaignContent) Scan ¶
func (content *CampaignContent) Scan(value interface{}) error
type CampaignInsertion ¶
type CampaignShare ¶
type CampaignShare struct {
}
func (*CampaignShare) Scan ¶
func (cs *CampaignShare) Scan(value interface{}) error
type CampaignShares ¶
type CampaignShares []*CampaignShare
func (*CampaignShares) Scan ¶
func (css *CampaignShares) Scan(value interface{}) error
type CommentInput ¶
type CommentInvestment ¶
type CommentInvestments ¶
type CommentInvestments []*CommentInvestment
func (*CommentInvestments) Scan ¶
func (ccs *CommentInvestments) Scan(value interface{}) error
type InvestmentAmounts ¶
func (*InvestmentAmounts) Scan ¶
func (ai *InvestmentAmounts) Scan(value interface{}) error
type InvestmentAmountsList ¶
type InvestmentAmountsList []*InvestmentAmounts
func (*InvestmentAmountsList) Scan ¶
func (ai *InvestmentAmountsList) Scan(value interface{}) error
type Outcome ¶
type Outcome struct {
// Name of this campaign.
Name string `json:"name"`
// Picture of the outcome as base64 string.
Picture *string `json:"picture"`
// Number to salt the identifier of the outcome
Seed int `json:"seed"`
// Identifier hex encoded associated with this outcome. Used to derive addresses.
// Is of the form keccak256(name . description . seed)[:8]
Identifier string `json:"identifier"`
Share *Share `json:"share"`
}
type OutcomeIds ¶
type OutcomeIds []string
func (*OutcomeIds) Scan ¶
func (ois *OutcomeIds) Scan(value interface{}) error
type OutcomeList ¶
type OutcomeList []Outcome
func (*OutcomeList) Scan ¶
func (ol *OutcomeList) Scan(value interface{}) error
type Position ¶
type Position struct {
CampaignId string `json:"campaignId"`
Content CampaignContent `json:"content"`
}
type PriceEvent ¶
type PriceMetadata ¶
type Share ¶
type Share struct {
Address string `json:"address"`
}
Share representing the outcome of the current amount.
type TrackedTradingContract ¶
type TrackedTradingContract struct {
BlockHash string `json:"block_hash"`
TransactionHash string `json:"transaction_hash"`
TradingAddr string `json:"trading_addr"`
}
TrackedTradingContract that was created by the NewTrading event.
type UnclaimedCampaign ¶
Click to show internal directories.
Click to hide internal directories.