theceloclient

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2021 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NameTheCelo = "the_celo_client"
)

Variables

This section is empty.

Functions

func New

func New(url string) (*client, error)

Types

type Approval

type Approval struct {
	Address   string `json:"address"`
	Timestamp string `json:"timestamp"`
}

type Client

type Client interface {
	base.Client

	GetAllProposals() (*Proposals, error)
	GetProposalByProposalId(string) (*ProposalDetails, error)
}

type Dequeue

type Dequeue struct {
	Address   string `json:"address"`
	Timestamp int64  `json:"timestamp"`
}

type Executed

type Executed struct {
	From            string `json:"from"`
	Timestamp       string `json:"timestamp"`
	BlockNumber     string `json:"block_number"`
	TransactionHash string `json:"transaction_hash"`
}

type ProposalDetails

type ProposalDetails struct {
	Status         string   `json:"status"`
	Timespan       int64    `json:"timespan"`
	Title          string   `json:"title"`
	DescriptionUrl string   `json:"descriptionUrl"`
	Proposer       Proposer `json:"proposer"`
	Upvoted        Upvoted  `json:"upvoted"`
	Dequeue        Dequeue  `json:"dequeue"`
	Approval       Approval `json:"approval"`
	Voted          Voted    `json:"voted"`
	Executed       Executed `json:"executed"`
}

type ProposalItems

type ProposalItems map[string]ProposalDetails

type Proposals

type Proposals struct {
	Items ProposalItems `json:"items"`
}

type Proposer

type Proposer struct {
	Address   string         `json:"address"`
	Deposit   types.Quantity `json:"deposit"`
	Timestamp int64          `json:"timestamp"`
}

type Upvoted

type Upvoted struct {
	Peoples int64 `json:"peoples"`
	Upvotes int64 `json:"upvotes"`
}

type Voted

type Voted struct {
	Peoples int64          `json:"peoples"`
	Weight  types.Quantity `json:"weight"`
}

Jump to

Keyboard shortcuts

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