Documentation ¶
Index ¶
- func GetMainAccount(account sql.NullString, alias string) string
- type AccountPair
- type AggregatedEventsList
- type Block
- type BlockAttrs
- type BlocksList
- type ByAddress
- type CountEvents
- type CountEventsAttrs
- type CountEventsByAddress
- type DiffEntry
- type Event
- type EventAttrs
- type EventsList
- type Exclusion
- type ExclusionList
- type ExclusionListAttributes
- type ExclusionListData
- type FirstObservedApproval
- type Key
- type LastObservedApproval
- type LayerZeroData
- type LayerZeroList
- type Links
- type ListDiff
- type ListDiffAttributes
- type ListDiffData
- type ObservedApprovals
- type Payment
- type PaymentAttrs
- type PaymentRelationships
- type PaymentsList
- type RelationMap
- type Relationship
- type RootAttributes
- type RootList
- type RootListData
- type RootMembershipPeriod
- type RootMembershipPeriodAttrs
- type RootMembershipPeriodList
- type RootNodeApprovals
- type RootNodeApprovalsAttrs
- type RootNodeApprovalsList
- type RootNodeBreakdown
- type SummaryMetrics
- type SummaryMetricsAttrs
- type SummaryMetricsList
- type SystemContract
- type SystemContractAttributes
- type SystemContractList
- type Transaction
- type TransactionAttrs
- type TransactionResponse
- type TransactionsList
- type Version
- type VersionList
- type VotingsList
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetMainAccount ¶ added in v1.0.0
func GetMainAccount(account sql.NullString, alias string) string
Types ¶
type AccountPair ¶ added in v1.0.0
type AggregatedEventsList ¶ added in v1.0.0
type AggregatedEventsList struct { Data CountEvents `json:"data"` Links *Links `json:"links,omitempty"` }
func PopulateAggregatedEventsList ¶ added in v1.0.0
func PopulateAggregatedEventsList(aggregatedEvents data.CountVotingEvents) *AggregatedEventsList
PopulateAggregatedEventsList from data layer.
type Block ¶
type Block struct { ID string `json:"id"` Type string `json:"type"` Attributes BlockAttrs `json:"attributes"` }
type BlockAttrs ¶
type BlocksList ¶
func PopulateBlocksList ¶
func PopulateBlocksList(blocks []data.Block) *BlocksList
PopulateBlocksList from data layer.
type ByAddress ¶ added in v1.0.0
type ByAddress struct { Account string `json:"mainAccount"` FirstObservedApproval FirstObservedApproval `json:"firstObservedApproval"` LastObservedApproval LastObservedApproval `json:"lastObservedApproval"` ObservedApprovals []ObservedApprovals `json:"observedApprovals"` }
type CountEvents ¶ added in v1.0.0
type CountEvents struct { ID string `json:"id"` Type string `json:"type"` Attributes CountEventsAttrs `json:"attributes"` }
type CountEventsAttrs ¶ added in v1.0.0
type CountEventsAttrs struct { TotalCounts map[string]uint64 `json:"total"` CountsByAddress []CountEventsByAddress `json:"byAddress"` }
type CountEventsByAddress ¶ added in v1.0.0
type DiffEntry ¶ added in v1.0.0
type DiffEntry struct { Name string `json:"name"` Diff []AccountPair `json:"diff"` }
type Event ¶ added in v1.0.0
type Event struct { ID string `json:"id"` Type string `json:"type"` Attributes EventAttrs `json:"attributes"` }
type EventAttrs ¶ added in v1.0.0
type EventsList ¶ added in v1.0.0
func PopulateEventsList ¶ added in v1.0.0
func PopulateEventsList(events []data.VotingEvent) *EventsList
type Exclusion ¶ added in v1.0.0
type Exclusion struct { AccountPair StartBlock uint64 `json:"start_block"` EndBlock *uint64 `json:"end_block"` }
type ExclusionList ¶ added in v1.0.0
type ExclusionList struct {
Data ExclusionListData `json:"data"`
}
func PopulateExclusionList ¶ added in v1.0.0
func PopulateExclusionList(l data.NodeExclusionList, percentage float32) ExclusionList
type ExclusionListAttributes ¶ added in v1.0.0
type ExclusionListData ¶ added in v1.0.0
type ExclusionListData struct { ID string `json:"id"` Type string `json:"type"` Attributes ExclusionListAttributes `json:"attributes"` }
type FirstObservedApproval ¶ added in v1.0.0
type LastObservedApproval ¶ added in v1.0.0
type LayerZeroData ¶ added in v1.0.0
type LayerZeroData struct { Root []RootList `json:"root"` Exclusion []ExclusionList `json:"exclusion"` }
type LayerZeroList ¶ added in v1.0.0
type LayerZeroList struct {
Data LayerZeroData `json:"data"`
}
func PopulateLayerZeroList ¶ added in v1.0.0
func PopulateLayerZeroList(root []RootList, exclusion []ExclusionList) LayerZeroList
type ListDiff ¶ added in v1.0.0
type ListDiff struct {
Data ListDiffData `json:"data"`
}
func PopulateListDiff ¶ added in v1.0.0
func PopulateListDiff(listA, listB []AccountPair, listType, listAName, listBName string) ListDiff
type ListDiffAttributes ¶ added in v1.0.0
type ListDiffAttributes struct {
Result []DiffEntry `json:"result"`
}
type ListDiffData ¶ added in v1.0.0
type ListDiffData struct { ID string `json:"id"` Type string `json:"type"` Attributes ListDiffAttributes `json:"attributes"` }
type ObservedApprovals ¶ added in v1.0.0
type ObservedApprovals struct { Alias string `json:"alias"` FirstObservedApproval FirstObservedApproval `json:"firstObservedApproval"` LastObservedApproval LastObservedApproval `json:"lastObservedApproval"` }
type Payment ¶
type Payment struct { ID string `json:"id"` Type string `json:"type"` Attributes PaymentAttrs `json:"attributes"` Relationships *PaymentRelationships `json:"relationships,omitempty"` }
type PaymentAttrs ¶
type PaymentRelationships ¶
type PaymentRelationships struct {
Transaction *Relationship `json:"transaction,omitempty"`
}
type PaymentsList ¶
type PaymentsList struct { Data []Payment `json:"data"` Links *Links `json:"links,omitempty"` Included RelationMap `json:"included,omitempty"` }
func PopulatePaymentsList ¶
func PopulatePaymentsList(payments []data.Payment) *PaymentsList
PopulatePaymentsList creates a tx list response.
type RelationMap ¶
type RelationMap map[Key]interface{}
func (RelationMap) MarshalJSON ¶
func (m RelationMap) MarshalJSON() ([]byte, error)
type Relationship ¶
type Relationship struct {
Data Key `json:"data"`
}
type RootAttributes ¶ added in v1.0.0
type RootAttributes struct { Status string `json:"status"` Timestamp time.Time `json:"timestamp"` Signers []AccountPair `json:"signers"` Roots []AccountPair `json:"roots"` ActiveRootPercentage float32 `json:"active_root_percentage,omitempty"` }
type RootList ¶ added in v1.0.0
type RootList struct {
Data RootListData `json:"data"`
}
func PopulateRootList ¶ added in v1.0.0
func PopulateRootList(l data.RootNodeList, percentage float32) RootList
type RootListData ¶ added in v1.0.0
type RootListData struct { ID string `json:"id"` Type string `json:"type"` Attributes RootAttributes `json:"attributes"` }
type RootMembershipPeriod ¶ added in v1.0.0
type RootMembershipPeriod struct { ID string `json:"id"` Type string `json:"type"` Attributes RootMembershipPeriodAttrs `json:"attributes"` }
type RootMembershipPeriodAttrs ¶ added in v1.0.0
type RootMembershipPeriodList ¶ added in v1.0.0
type RootMembershipPeriodList struct { Data []RootMembershipPeriod `json:"data"` Links *Links `json:"links,omitempty"` }
func PopulateRootMembershipPeriodList ¶ added in v1.0.0
func PopulateRootMembershipPeriodList(rootsMemberships []data.RootsMembership) *RootMembershipPeriodList
PopulateRootMembershipPeriodList from data layer.
type RootNodeApprovals ¶ added in v1.0.0
type RootNodeApprovals struct { ID string `json:"id"` Type string `json:"type"` Attributes RootNodeApprovalsAttrs `json:"attributes"` }
type RootNodeApprovalsAttrs ¶ added in v1.0.0
type RootNodeApprovalsList ¶ added in v1.0.0
type RootNodeApprovalsList struct { Data RootNodeApprovals `json:"data"` Links *Links `json:"links,omitempty"` }
func PopulateRootNodeApprovalsList ¶ added in v1.0.0
func PopulateRootNodeApprovalsList(approvals data.RootNodeBreakdown) *RootNodeApprovalsList
type RootNodeBreakdown ¶ added in v1.0.0
type SummaryMetrics ¶
type SummaryMetrics struct { ID string `json:"id"` Type string `json:"metrics"` Attributes SummaryMetricsAttrs `json:"attributes"` }
type SummaryMetricsAttrs ¶
type SummaryMetricsList ¶
type SummaryMetricsList struct { Data []SummaryMetrics `json:"data"` Links *Links `json:"links,omitempty"` }
func PopulateSummaryMetricsList ¶
func PopulateSummaryMetricsList(metrics []data.SummaryMetrics) *SummaryMetricsList
PopulateMetricsList from data layer.
type SystemContract ¶ added in v1.0.0
type SystemContract struct { ID string `json:"id"` Type string `json:"key"` Attributes SystemContractAttributes `json:"attributes"` }
func PopulateSystemContract ¶ added in v1.0.0
func PopulateSystemContract(i *data.SystemContract) SystemContract
type SystemContractAttributes ¶ added in v1.0.0
type SystemContractList ¶ added in v1.0.0
type SystemContractList struct { Data []SystemContract `json:"data"` Links *Links `json:"links,omitempty"` }
func PopulateSysContractsList ¶ added in v1.0.0
func PopulateSysContractsList(l []data.SystemContract) SystemContractList
type Transaction ¶
type Transaction struct { ID string `json:"id"` Type string `json:"type"` Attributes TransactionAttrs `json:"attributes"` }
type TransactionAttrs ¶
type TransactionAttrs struct { Block uint64 `json:"block_id"` Sender string `json:"sender"` Recipient *string `json:"recipient"` Value string `json:"value"` Nonce uint64 `json:"nonce"` GasPrice string `json:"gas_price"` Gas uint64 `json:"gas"` Input string `json:"input"` Timestamp int64 `json:"timestamp"` }
type TransactionResponse ¶
type TransactionResponse struct { Data Transaction `json:"data"` Links *Links `json:"links,omitempty"` }
func PopulateTransactionResponse ¶
func PopulateTransactionResponse(tx *data.Transaction) *TransactionResponse
type TransactionsList ¶
type TransactionsList struct { Data []Transaction `json:"data"` Links *Links `json:"links,omitempty"` }
func PopulateTransactionsList ¶
func PopulateTransactionsList(txs []data.Transaction) *TransactionsList
PopulateTransactionsList creates a tx list response.
type VersionList ¶
type VersionList struct {
Data Version `json:"data"`
}
func PopulateVersion ¶
func PopulateVersion(version string) *VersionList
type VotingsList ¶
type VotingsList struct { Data []interface{} `json:"data"` Links *Links `json:"links,omitempty"` }
func PopulateVotingsList ¶
func PopulateVotingsList(votings []interface{}) *VotingsList
Click to show internal directories.
Click to hide internal directories.