aggregator

package
v0.3.4 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2024 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SubjectDaoCreated = "aggregator.dao.created"
	SubjectDaoUpdated = "aggregator.dao.updated"
)
View Source
const (
	DelegateActionSet    = "set"
	DelegateActionClear  = "clear"
	DelegateActionExpire = "expire"
)
View Source
const (
	SubjectProposalCreated = "aggregator.proposal.created"
	SubjectProposalUpdated = "aggregator.proposal.updated"
	SubjectProposalDeleted = "aggregator.proposal.deleted"
)
View Source
const (
	SubjectDelegateUpsert = "aggregator.delegate.updated"
)
View Source
const (
	SubjectVoteCreated = "aggregator.vote.created"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type DaoHandler

type DaoHandler = events.Handler[DaoPayload]

type DaoPayload

type DaoPayload struct {
	ID             string            `json:"id"`
	Name           string            `json:"name"`
	Private        bool              `json:"private"`
	About          string            `json:"about"`
	Avatar         string            `json:"avatar"`
	Terms          string            `json:"terms"`
	Location       string            `json:"location"`
	Website        string            `json:"website"`
	Twitter        string            `json:"twitter"`
	Github         string            `json:"github"`
	Coingecko      string            `json:"coingecko"`
	Email          string            `json:"email"`
	Network        string            `json:"network"`
	Symbol         string            `json:"symbol"`
	Skin           string            `json:"skin"`
	Domain         string            `json:"domain"`
	Strategies     []StrategyPayload `json:"strategies"`
	Admins         []string          `json:"admins"`
	Members        []string          `json:"members"`
	Moderators     []string          `json:"moderators"`
	Filters        []FilterPayload   `json:"filters"`
	Plugins        interface{}       `json:"plugins"`
	Voting         VotingPayload     `json:"voting"`
	Categories     []string          `json:"categories"`
	Validation     ValidationPayload `json:"validation"`
	VoteValidation ValidationPayload `json:"vote_validation"`
	Treasures      []TreasuryPayload `json:"treasures"`
	FollowersCount int               `json:"followers_count"`
	ProposalsCount int               `json:"proposals_count"`
	Guidelines     string            `json:"guidelines"`
	Template       string            `json:"template"`
	ParentID       string            `json:"parent_id"`
	Verified       bool              `json:"verified"`
}

type DelegateHandler added in v0.3.3

type DelegateHandler = events.Handler[DelegatePayload]

type DelegatePayload added in v0.3.3

type DelegatePayload struct {
	Action          string      `json:"action"`
	AddressFrom     string      `json:"address_from"`
	OriginalSpaceID string      `json:"original_space_id"`
	ChainID         string      `json:"chain_id"`
	BlockNumber     int         `json:"block_number"`
	BlockTimestamp  int         `json:"block_timestamp"`
	Delegations     Delegations `json:"delegations"`
}

type DelegationDetails added in v0.3.3

type DelegationDetails struct {
	Address string `json:"address"`
	Weight  int    `json:"weight"`
}

type Delegations added in v0.3.3

type Delegations struct {
	Details    []DelegationDetails `json:"details"`
	Expiration int                 `json:"expiration"`
}

type FilterPayload

type FilterPayload struct {
	MinScore    float32 `json:"min_score"`
	OnlyMembers bool    `json:"only_members"`
}

type ProposalHandler

type ProposalHandler = events.Handler[ProposalPayload]

type ProposalPayload

type ProposalPayload struct {
	ID               string            `json:"id"`
	Ipfs             string            `json:"ipfs"`
	Author           string            `json:"author"`
	Created          int               `json:"created"`
	DaoID            string            `json:"dao_id"`
	Network          string            `json:"network"`
	Symbol           string            `json:"symbol"`
	Type             string            `json:"type"`
	Strategies       []StrategyPayload `json:"strategies"`
	Validation       ValidationPayload `json:"validation"`
	Plugins          interface{}       `json:"plugins"`
	Title            string            `json:"title"`
	Body             string            `json:"body"`
	Discussion       string            `json:"discussion"`
	Choices          []string          `json:"choices"`
	Start            int               `json:"start"`
	End              int               `json:"end"`
	Quorum           float64           `json:"quorum"`
	Privacy          string            `json:"privacy"`
	Snapshot         string            `json:"snapshot"`
	State            string            `json:"state"`
	Link             string            `json:"link"`
	App              string            `json:"app"`
	Scores           []float32         `json:"scores"`
	ScoresByStrategy interface{}       `json:"scores_by_strategy"`
	ScoresState      string            `json:"scores_state"`
	ScoresTotal      float32           `json:"scores_total"`
	ScoresUpdated    int               `json:"scores_updated"`
	Votes            int               `json:"votes"`
	Flagged          bool              `json:"flagged"`
}

type StrategyPayload

type StrategyPayload struct {
	Name    string                 `json:"name"`
	Network string                 `json:"network"`
	Params  map[string]interface{} `json:"params"`
}

type TreasuryPayload

type TreasuryPayload struct {
	Name    string `json:"name"`
	Address string `json:"address"`
	Network string `json:"network"`
}

type ValidationPayload

type ValidationPayload struct {
	Name   string                 `json:"name"`
	Params map[string]interface{} `json:"params"`
}

type VotePayload

type VotePayload struct {
	ID            string          `json:"id"`
	Ipfs          string          `json:"ipfs"`
	Voter         string          `json:"voter"`
	Created       int             `json:"created"`
	OriginalDaoID string          `json:"original_dao_id"`
	ProposalID    string          `json:"proposal_id"`
	Choice        json.RawMessage `json:"choice"`
	Reason        string          `json:"reason"`
	App           string          `json:"app"`
	Vp            float64         `json:"vp"`
	VpByStrategy  []float64       `json:"vp_by_strategy"`
	VpState       string          `json:"vp_state"`
}

type VotesHandler

type VotesHandler = events.Handler[VotesPayload]

type VotesPayload

type VotesPayload []VotePayload

type VotingPayload

type VotingPayload struct {
	Delay       int     `json:"delay"`
	Period      int     `json:"period"`
	Type        string  `json:"type"`
	Quorum      float32 `json:"quorum"`
	Blind       bool    `json:"blind"`
	HideAbstain bool    `json:"hide_abstain"`
	Privacy     string  `json:"privacy"`
	Aliased     bool    `json:"aliased"`
}

Jump to

Keyboard shortcuts

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