model

package
v0.0.0-...-a196282 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2024 License: Apache-2.0, MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RangeWeek     sr = 0
	RangeMonth    sr = 1
	RangeHalfYear sr = 2
	RangeYear     sr = 3
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Event

type Event struct {
	State     State     `json:"state"`
	TxID      string    `db:"tx_id" json:"tx_id"`
	ProverID  string    `db:"prover_id" json:"prover_id"`
	Tag       string    `json:"tag"`
	Timestamp time.Time `json:"timestamp"`
}

type State

type State uint8
const (
	StateUnknown   State = 0
	StateSubmitted State = 1
	StateProving   State = 2
	StateVerifying State = 3
	StateComplete  State = 4
)

func ParseState

func ParseState(r string) (State, error)

func (*State) MarshalJSON

func (s *State) MarshalJSON() ([]byte, error)

func (*State) Scan

func (s *State) Scan(value interface{}) error

func (*State) String

func (s *State) String() string

func (*State) UnmarshalJSON

func (s *State) UnmarshalJSON(data []byte) error

func (*State) Value

func (s *State) Value() (driver.Value, error)

type Stats

type Stats struct {
	RegisteredUsers      uint64  `json:"registered_users"`
	ProofsGenerated      uint64  `json:"proofs_generated"`
	ProversDeployed      uint64  `json:"programs"`
	ProofsVerified       uint64  `json:"proofs_verified"`
	RegisteredUsersDelta float64 `json:"registered_users_delta"`
	ProofsGeneratedDelta float64 `json:"proofs_generated_delta"`
	ProversDeployedDelta float64 `json:"programs_delta"`
	ProofsVerifiedDelta  float64 `json:"proofs_verified_delta"`
}

type StatsRange

type StatsRange interface {
	String() string
	// contains filtered or unexported methods
}

func ParseStatsRange

func ParseStatsRange(r string) (StatsRange, error)

func SupportedStatsRanges

func SupportedStatsRanges() []StatsRange

type TxInfo

type TxInfo struct {
	State    State         `json:"state"`
	Duration time.Duration `json:"duration"`
	TxID     string        `json:"tx_id"`
	UserID   string        `json:"user_id"`
	ProverID string        `json:"prover_id"`
	Log      []TxLogEvent  `json:"log"`
}

type TxLogEvent

type TxLogEvent struct {
	State     State     `json:"state"`
	IDType    string    `json:"id_type"`
	ID        string    `json:"id"`
	Timestamp time.Time `json:"timestamp"`
}

Jump to

Keyboard shortcuts

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