Documentation
¶
Index ¶
- type ClientData
- type ClientImage
- type Link
- type NetworkImages
- type NetworkInfo
- type NetworkMetadata
- type NetworkStats
- type NetworksData
- type Service
- func (s *Service) GetActiveNetworks() []string
- func (s *Service) GetAdminRoles() map[string]string
- func (s *Service) GetAllClients() []string
- func (s *Service) GetAllNetworks() []string
- func (s *Service) GetCLClients() []string
- func (s *Service) GetClientBranch(clientName string) string
- func (s *Service) GetClientDisplayName(clientName string) string
- func (s *Service) GetClientDocsURL(clientName string) string
- func (s *Service) GetClientLatestVersion(clientName string) string
- func (s *Service) GetClientLogo(clientName string) string
- func (s *Service) GetClientRepository(clientName string) string
- func (s *Service) GetClientType(clientName string) string
- func (s *Service) GetClientWebsiteURL(clientName string) string
- func (s *Service) GetConsensusClients() []string
- func (s *Service) GetELClients() []string
- func (s *Service) GetExecutionClients() []string
- func (s *Service) GetInactiveNetworks() []string
- func (s *Service) GetNetwork(networkName string) *NetworkInfo
- func (s *Service) GetNetworkStatus(networkName string) string
- func (s *Service) GetNetworksOfType(networkType string) []string
- func (s *Service) GetTeamRole(clientName string) string
- func (s *Service) IsCLClient(clientName string) bool
- func (s *Service) IsELClient(clientName string) bool
- func (s *Service) IsPreProductionClient(clientName string) bool
- func (s *Service) Start(ctx context.Context)
- func (s *Service) Stop()
- type ServiceConfig
- type ServiceURLs
- type ToolImage
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"`
Logo string `json:"logo"`
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 ¶
ClientImage represents a client docker image.
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 ¶
GetActiveNetworks returns all active networks sorted alphabetically.
func (*Service) GetAdminRoles ¶
GetAdminRoles returns all admin roles.
func (*Service) GetAllClients ¶
GetAllClients returns all known client names.
func (*Service) GetAllNetworks ¶
GetAllNetworks returns all networks regardless of status.
func (*Service) GetCLClients ¶
GetCLClients returns all consensus layer client names.
func (*Service) GetClientBranch ¶
GetClientBranch returns the default branch for a client.
func (*Service) GetClientDisplayName ¶
GetClientDisplayName returns the display name for a client.
func (*Service) GetClientDocsURL ¶
GetClientDocsURL returns the documentation URL for a client.
func (*Service) GetClientLatestVersion ¶
GetClientLatestVersion returns the latest version for a client.
func (*Service) GetClientLogo ¶
GetClientLogo returns the logo URL for a client.
func (*Service) GetClientRepository ¶
GetClientRepository returns the repository for a client.
func (*Service) GetClientType ¶
GetClientType returns the type for a client (consensus or execution).
func (*Service) GetClientWebsiteURL ¶
GetClientWebsiteURL returns the website URL for a client.
func (*Service) GetConsensusClients ¶
GetConsensusClients returns all consensus clients from the remote data.
func (*Service) GetELClients ¶
GetELClients returns all execution layer client names.
func (*Service) GetExecutionClients ¶
GetExecutionClients returns all execution clients from the remote data.
func (*Service) GetInactiveNetworks ¶ added in v0.0.27
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 ¶
GetNetworkStatus returns the status of a network.
func (*Service) GetNetworksOfType ¶
GetNetworksOfType returns all networks of a specific type.
func (*Service) GetTeamRole ¶
GetTeamRole returns the team role for a client.
func (*Service) IsCLClient ¶
IsCLClient checks if a client is a consensus layer client.
func (*Service) IsELClient ¶
IsELClient checks if a client is an execution layer client.
func (*Service) IsPreProductionClient ¶
IsPreProductionClient checks if a client is a pre-production client.
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.