cartographoor

package
v0.0.39 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2025 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClientData

type ClientData struct {
	Name          string `json:"name"`
	DisplayName   string `json:"displayName"`
	Repository    string `json:"repository"`
	Type          string `json:"type"`
	Branch        string `json:"branch"`
	LatestVersion string `json:"latestVersion"`
	WebsiteURL    string `json:"websiteUrl"`
	DocsURL       string `json:"docsUrl"`
}

ClientData represents the structure of a client in the networks.json file.

type ClientImage

type ClientImage struct {
	Name    string `json:"name"`
	Version string `json:"version"`
}

ClientImage represents a client docker image.

type Link struct {
	Title string `json:"title"`
	URL   string `json:"url"`
}

Link represents a hyperlink with title and URL.

type NetworkImages

type NetworkImages struct {
	URL     string        `json:"url,omitempty"`
	Clients []ClientImage `json:"clients,omitempty"`
	Tools   []ToolImage   `json:"tools,omitempty"`
}

NetworkImages contains image information for a network.

type NetworkInfo

type NetworkInfo struct {
	Name          string        `json:"name"`
	Description   string        `json:"description,omitempty"`
	Repository    string        `json:"repository,omitempty"`
	Path          string        `json:"path,omitempty"`
	URL           string        `json:"url,omitempty"`
	Status        string        `json:"status"` // "active" or "inactive"
	LastUpdated   string        `json:"lastUpdated,omitempty"`
	ChainID       int64         `json:"chainId,omitempty"`
	GenesisConfig interface{}   `json:"genesisConfig,omitempty"`
	ServiceURLs   ServiceURLs   `json:"serviceUrls,omitempty"`
	Images        NetworkImages `json:"images,omitempty"`
}

NetworkInfo represents information about a specific network.

type NetworkMetadata

type NetworkMetadata struct {
	DisplayName string       `json:"displayName"`
	Description string       `json:"description"`
	Links       []Link       `json:"links"`
	Image       string       `json:"image"`
	Stats       NetworkStats `json:"stats"`
}

NetworkMetadata represents metadata about network types.

type NetworkStats

type NetworkStats struct {
	TotalNetworks    int      `json:"totalNetworks"`
	ActiveNetworks   int      `json:"activeNetworks"`
	InactiveNetworks int      `json:"inactiveNetworks"`
	NetworkNames     []string `json:"networkNames"`
}

NetworkStats contains statistics about a network type.

type NetworksData

type NetworksData struct {
	NetworkMetadata map[string]NetworkMetadata `json:"networkMetadata,omitempty"`
	Networks        map[string]NetworkInfo     `json:"networks"`
	Clients         map[string]ClientData      `json:"clients"`
	LastUpdate      string                     `json:"lastUpdate,omitempty"`
	Duration        float64                    `json:"duration,omitempty"`
	Providers       []interface{}              `json:"providers,omitempty"`
}

NetworksData represents the structure of the networks.json file.

type Service

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

Service provides access to cartographoor data with automatic updates from a remote source.

func NewService

func NewService(ctx context.Context, config ServiceConfig) (*Service, error)

NewService creates a new cartographoor service.

func (*Service) GetActiveNetworks

func (s *Service) GetActiveNetworks() []string

GetActiveNetworks returns all active networks sorted alphabetically.

func (*Service) GetAdminRoles

func (s *Service) GetAdminRoles() map[string]string

GetAdminRoles returns all admin roles.

func (*Service) GetAllClients

func (s *Service) GetAllClients() []string

GetAllClients returns all known client names.

func (*Service) GetAllNetworks

func (s *Service) GetAllNetworks() []string

GetAllNetworks returns all networks regardless of status.

func (*Service) GetCLClients

func (s *Service) GetCLClients() []string

GetCLClients returns all consensus layer client names.

func (*Service) GetClientBranch

func (s *Service) GetClientBranch(clientName string) string

GetClientBranch returns the default branch for a client.

func (*Service) GetClientDisplayName

func (s *Service) GetClientDisplayName(clientName string) string

GetClientDisplayName returns the display name for a client.

func (*Service) GetClientDocsURL

func (s *Service) GetClientDocsURL(clientName string) string

GetClientDocsURL returns the documentation URL for a client.

func (*Service) GetClientLatestVersion

func (s *Service) GetClientLatestVersion(clientName string) string

GetClientLatestVersion returns the latest version for a client.

func (s *Service) GetClientLogo(clientName string) string

GetClientLogo returns the logo URL for a client.

func (*Service) GetClientRepository

func (s *Service) GetClientRepository(clientName string) string

GetClientRepository returns the repository for a client.

func (*Service) GetClientType

func (s *Service) GetClientType(clientName string) string

GetClientType returns the type for a client (consensus or execution).

func (*Service) GetClientWebsiteURL

func (s *Service) GetClientWebsiteURL(clientName string) string

GetClientWebsiteURL returns the website URL for a client.

func (*Service) GetConsensusClients

func (s *Service) GetConsensusClients() []string

GetConsensusClients returns all consensus clients from the remote data.

func (*Service) GetELClients

func (s *Service) GetELClients() []string

GetELClients returns all execution layer client names.

func (*Service) GetExecutionClients

func (s *Service) GetExecutionClients() []string

GetExecutionClients returns all execution clients from the remote data.

func (*Service) GetInactiveNetworks added in v0.0.27

func (s *Service) GetInactiveNetworks() []string

GetInactiveNetworks returns all inactive networks sorted alphabetically.

func (*Service) GetNetwork

func (s *Service) GetNetwork(networkName string) *NetworkInfo

GetNetwork returns information about a specific network.

func (*Service) GetNetworkStatus

func (s *Service) GetNetworkStatus(networkName string) string

GetNetworkStatus returns the status of a network.

func (*Service) GetNetworksOfType

func (s *Service) GetNetworksOfType(networkType string) []string

GetNetworksOfType returns all networks of a specific type.

func (*Service) GetTeamRole

func (s *Service) GetTeamRole(clientName string) string

GetTeamRole returns the team role for a client.

func (*Service) IsCLClient

func (s *Service) IsCLClient(clientName string) bool

IsCLClient checks if a client is a consensus layer client.

func (*Service) IsELClient

func (s *Service) IsELClient(clientName string) bool

IsELClient checks if a client is an execution layer client.

func (*Service) IsPreProductionClient

func (s *Service) IsPreProductionClient(clientName string) bool

IsPreProductionClient checks if a client is a pre-production client.

func (*Service) Start

func (s *Service) Start(ctx context.Context)

Start begins the periodic refresh of cartographoor data.

func (*Service) Stop

func (s *Service) Stop()

Stop halts the periodic refresh of cartographoor data.

type ServiceConfig

type ServiceConfig struct {
	SourceURL       string
	RefreshInterval time.Duration
	Logger          *logrus.Logger
	HTTPClient      *http.Client
}

ServiceConfig contains the configuration for the cartographoor service.

type ServiceURLs

type ServiceURLs struct {
	JSONRPC        string `json:"jsonRpc,omitempty"`
	BeaconRPC      string `json:"beaconRpc,omitempty"`
	Explorer       string `json:"explorer,omitempty"`
	BeaconExplorer string `json:"beaconExplorer,omitempty"`
	Forkmon        string `json:"forkmon,omitempty"`
	Assertoor      string `json:"assertoor,omitempty"`
	Dora           string `json:"dora,omitempty"`
	CheckpointSync string `json:"checkpointSync,omitempty"`
	Blobscan       string `json:"blobscan,omitempty"`
	BlobArchive    string `json:"blobArchive,omitempty"`
	Ethstats       string `json:"ethstats,omitempty"`
	DevnetSpec     string `json:"devnetSpec,omitempty"`
	Forky          string `json:"forky,omitempty"`
	Tracoor        string `json:"tracoor,omitempty"`
}

ServiceURLs contains URLs to various services for a network.

type ToolImage

type ToolImage struct {
	Name    string `json:"name"`
	Version string `json:"version"`
}

ToolImage represents a tool docker image.

Jump to

Keyboard shortcuts

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