models

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2023 License: MIT Imports: 0 Imported by: 0

Documentation

Overview

Package models provides primitives to interact with the openapi HTTP API.

Code generated by github.com/deepmap/oapi-codegen version v1.12.5-0.20230118012357-f4cf8f9a5703 DO NOT EDIT.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Address

type Address = string

Address defines model for Address.

type AddressFilter

type AddressFilter = Address

AddressFilter defines model for AddressFilter.

type AddressParam

type AddressParam = AddressFilter

AddressParam defines model for addressParam.

type CountResponse

type CountResponse struct {
	Total Counter `json:"total"`
}

CountResponse defines model for CountResponse.

type Counter

type Counter = uint64

Counter defines model for Counter.

type Dag

type Dag struct {
	Hash             Hash      `json:"hash"`
	Level            Counter   `json:"level"`
	Sender           Address   `json:"sender"`
	Timestamp        Timestamp `json:"timestamp"`
	TransactionCount Counter   `json:"transactionCount"`
}

Dag defines model for Dag.

type DagsPaginatedResponse

type DagsPaginatedResponse = PaginatedResponse

DagsPaginatedResponse defines model for DagsPaginatedResponse.

type GetAddressDagsParams

type GetAddressDagsParams struct {
	// Pagination Pagination
	Pagination PaginationParam `form:"pagination" json:"pagination"`
}

GetAddressDagsParams defines parameters for GetAddressDags.

type GetAddressPbftsParams

type GetAddressPbftsParams struct {
	// Pagination Pagination
	Pagination PaginationParam `form:"pagination" json:"pagination"`
}

GetAddressPbftsParams defines parameters for GetAddressPbfts.

type GetAddressTransactionsParams

type GetAddressTransactionsParams struct {
	// Pagination Pagination
	Pagination PaginationParam `form:"pagination" json:"pagination"`
}

GetAddressTransactionsParams defines parameters for GetAddressTransactions.

type GetValidatorParams

type GetValidatorParams struct {
	// Week Week to filter by
	Week *WeekParam `form:"week,omitempty" json:"week,omitempty"`
}

GetValidatorParams defines parameters for GetValidator.

type GetValidatorsParams

type GetValidatorsParams struct {
	// Week Week to filter by
	Week *WeekParam `form:"week,omitempty" json:"week,omitempty"`

	// Pagination Pagination
	Pagination PaginationParam `form:"pagination" json:"pagination"`
}

GetValidatorsParams defines parameters for GetValidators.

type GetValidatorsTotalParams

type GetValidatorsTotalParams struct {
	// Week Week to filter by
	Week *WeekParam `form:"week,omitempty" json:"week,omitempty"`
}

GetValidatorsTotalParams defines parameters for GetValidatorsTotal.

type Hash

type Hash = string

Hash defines model for Hash.

type LastTimestamp

type LastTimestamp = uint64

LastTimestamp defines model for LastTimestamp.

type PaginatedResponse

type PaginatedResponse struct {
	End     Counter `json:"end"`
	HasNext bool    `json:"hasNext"`
	Start   Counter `json:"start"`
	Total   Counter `json:"total"`
}

PaginatedResponse defines model for PaginatedResponse.

type PaginationFilter

type PaginationFilter struct {
	Limit uint64  `json:"limit"`
	Start *uint64 `json:"start"`
}

PaginationFilter defines model for PaginationFilter.

type PaginationParam

type PaginationParam = PaginationFilter

PaginationParam defines model for paginationParam.

type Pbft

type Pbft struct {
	Author           Address   `json:"author"`
	Hash             Hash      `json:"hash"`
	Number           Counter   `json:"number"`
	PbftHash         Hash      `json:"pbftHash"`
	Timestamp        Timestamp `json:"timestamp"`
	TransactionCount Counter   `json:"transactionCount"`
}

Pbft defines model for Pbft.

type PbftsPaginatedResponse

type PbftsPaginatedResponse = PaginatedResponse

PbftsPaginatedResponse defines model for PbftsPaginatedResponse.

type Period

type Period struct {
	EndDate   Timestamp `json:"endDate"`
	HasNext   bool      `json:"hasNext"`
	StartDate Timestamp `json:"startDate"`
}

Period defines model for Period.

type StatsResponse

type StatsResponse struct {
	DagsCount                Counter        `json:"dagsCount"`
	LastDagTimestamp         *LastTimestamp `json:"lastDagTimestamp" rlp:"nil"`
	LastPbftTimestamp        *LastTimestamp `json:"lastPbftTimestamp" rlp:"nil"`
	LastTransactionTimestamp *LastTimestamp `json:"lastTransactionTimestamp" rlp:"nil"`
	PbftCount                Counter        `json:"pbftCount"`
	TransactionsCount        Counter        `json:"transactionsCount"`
}

StatsResponse defines model for StatsResponse.

type Timestamp

type Timestamp = uint64

Timestamp defines model for Timestamp.

type Transaction

type Transaction struct {
	BlockNumber      Counter         `json:"blockNumber"`
	From             Address         `json:"from"`
	GasPrice         Counter         `json:"gasPrice"`
	GasUsed          Counter         `json:"gasUsed"`
	Hash             Hash            `json:"hash"`
	Nonce            Counter         `json:"nonce"`
	Status           bool            `json:"status"`
	Timestamp        Timestamp       `json:"timestamp"`
	To               Address         `json:"to"`
	TransactionIndex Counter         `json:"transactionIndex"`
	Type             TransactionType `json:"type"`
	Value            string          `json:"value"`
}

Transaction defines model for Transaction.

type TransactionType

type TransactionType uint8

TransactionType defines model for Transaction.Type.

const (
	ContractCall     TransactionType = 1
	ContractCreation TransactionType = 2
	Transfer         TransactionType = 0
)

Defines values for TransactionType.

type TransactionsPaginatedResponse

type TransactionsPaginatedResponse = PaginatedResponse

TransactionsPaginatedResponse defines model for TransactionsPaginatedResponse.

type Validator

type Validator struct {
	Address   Address `json:"address"`
	PbftCount Counter `json:"pbftCount"`
	Rank      uint64  `json:"rank" rlp:"-"`
}

Validator defines model for Validator.

type ValidatorsPaginatedResponse

type ValidatorsPaginatedResponse = PaginatedResponse

ValidatorsPaginatedResponse defines model for ValidatorsPaginatedResponse.

type Week

type Week struct {
	Week *int32 `json:"week"`
	Year *int32 `json:"year"`
}

Week defines model for Week.

type WeekParam

type WeekParam = Week

WeekParam defines model for weekParam.

type WeekResponse

type WeekResponse struct {
	EndDate   Timestamp `json:"endDate"`
	HasNext   bool      `json:"hasNext"`
	StartDate Timestamp `json:"startDate"`
	Week      *int32    `json:"week"`
	Year      *int32    `json:"year"`
}

WeekResponse defines model for WeekResponse.

Jump to

Keyboard shortcuts

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