dashboard

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2021 License: Apache-2.0, BSD-2-Clause Imports: 29 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseTemplateParams added in v0.1.0

type BaseTemplateParams struct {
	NavPages    []Tab
	Breadcrumbs []Tab
	Path        string
	MyNetworkID string
	Version     string
}

type BlobField added in v0.1.0

type BlobField struct {
	Key   []byte
	Value []byte
}

type ChainAccountTemplateParams added in v0.1.0

type ChainAccountTemplateParams struct {
	BaseTemplateParams

	ChainID *iscp.ChainID
	AgentID *iscp.AgentID

	Balances colored.Balances
}

type ChainBlobTemplateParams added in v0.1.0

type ChainBlobTemplateParams struct {
	BaseTemplateParams

	ChainID *iscp.ChainID
	Hash    hashing.HashValue

	Blob []BlobField
}

type ChainBlockTemplateParams added in v0.2.0

type ChainBlockTemplateParams struct {
	BaseTemplateParams
	ChainID          *iscp.ChainID
	Index            uint32
	LatestBlockIndex uint32
	Block            *blocklog.BlockInfo
	Receipts         []*blocklog.RequestReceipt
	Events           []string
}

type ChainContractTemplateParams added in v0.1.0

type ChainContractTemplateParams struct {
	BaseTemplateParams

	ChainID *iscp.ChainID
	Hname   iscp.Hname

	ContractRecord *root.ContractRecord
	OwnerFee       uint64
	ValidatorFee   uint64
	FeeColor       colored.Color
	Log            []string
	RootInfo       RootInfo
}

type ChainListTemplateParams added in v0.1.0

type ChainListTemplateParams struct {
	BaseTemplateParams
	Chains []*ChainOverview
}

type ChainOverview added in v0.1.0

type ChainOverview struct {
	ChainRecord *registry.ChainRecord
	RootInfo    RootInfo
	Error       error
}

type ChainTemplateParams added in v0.1.0

type ChainTemplateParams struct {
	BaseTemplateParams

	ChainID *iscp.ChainID

	Record      *registry.ChainRecord
	LatestBlock *LatestBlock
	RootInfo    RootInfo
	Accounts    []*iscp.AgentID
	TotalAssets colored.Balances
	Blobs       map[hashing.HashValue]uint32
	Committee   *chain.CommitteeInfo
}

type ConfigTemplateParams added in v0.1.0

type ConfigTemplateParams struct {
	BaseTemplateParams
	Configuration map[string]interface{}
}

type Dashboard added in v0.2.0

type Dashboard struct {
	// contains filtered or unexported fields
}

func Init added in v0.1.0

func Init(server *echo.Echo, waspServices WaspServices, log *logger.Logger) *Dashboard

func (*Dashboard) BaseParams added in v0.2.0

func (d *Dashboard) BaseParams(c echo.Context, breadcrumbs ...Tab) BaseTemplateParams

func (*Dashboard) Stop added in v0.2.0

func (d *Dashboard) Stop()

type ErrorTemplateParams added in v0.2.0

type ErrorTemplateParams struct {
	BaseTemplateParams
	Code       int
	StatusText string
	Message    string
}

type LatestBlock added in v0.2.0

type LatestBlock struct {
	Index uint32
	Info  *blocklog.BlockInfo
}

type Peer added in v0.2.0

type Peer struct {
	NumUsers int
	NetID    string
	IsAlive  bool
}

type PeeringStats added in v0.2.0

type PeeringStats struct {
	Peers        []Peer
	TrustedPeers []TrustedPeer
}

type PeeringTemplateParams added in v0.1.0

type PeeringTemplateParams struct {
	BaseTemplateParams
	*PeeringStats
}

type RootInfo added in v0.1.0

type RootInfo struct {
	ChainID *iscp.ChainID

	OwnerID          *iscp.AgentID
	OwnerIDDelegated *iscp.AgentID

	Description string
	Contracts   map[iscp.Hname]*root.ContractRecord

	FeeColor            colored.Color
	DefaultOwnerFee     uint64
	DefaultValidatorFee uint64
}

type Tab added in v0.1.0

type Tab struct {
	Path       string
	Title      string
	Href       string
	Breadcrumb bool
}

type TrustedPeer added in v0.2.0

type TrustedPeer struct {
	NetID  string
	PubKey ed25519.PublicKey
}

type WaspServices added in v0.2.0

type WaspServices interface {
	ConfigDump() map[string]interface{}
	ExploreAddressBaseURL() string
	PeeringStats() (*PeeringStats, error)
	MyNetworkID() string
	GetChainRecords() ([]*registry.ChainRecord, error)
	GetChainRecord(chainID *iscp.ChainID) (*registry.ChainRecord, error)
	GetChainCommitteeInfo(chainID *iscp.ChainID) (*chain.CommitteeInfo, error)
	CallView(chainID *iscp.ChainID, scName, fname string, params dict.Dict) (dict.Dict, error)
}

Jump to

Keyboard shortcuts

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