Documentation
¶
Index ¶
- func EqualConfiguration(a, b Configuration) bool
- func EqualConsensusApp(a, b ConsensusApp) bool
- func EqualPrivateKey(a, b PrivateKey) bool
- func EqualService(a, b Service) bool
- func EqualStorage(a, b Storage) bool
- func MarshalTOML(a any) ([]byte, error)
- func Ptr[T any](v T) *T
- type BadgerStorage
- func (v *BadgerStorage) Copy() *BadgerStorage
- func (v *BadgerStorage) CopyAsInterface() interface{}
- func (v *BadgerStorage) Equal(u *BadgerStorage) bool
- func (v *BadgerStorage) MarshalJSON() ([]byte, error)
- func (*BadgerStorage) Type() StorageType
- func (v *BadgerStorage) UnmarshalJSON(data []byte) error
- type CometNodeKeyFile
- func (v *CometNodeKeyFile) Copy() *CometNodeKeyFile
- func (v *CometNodeKeyFile) CopyAsInterface() interface{}
- func (v *CometNodeKeyFile) Equal(u *CometNodeKeyFile) bool
- func (v *CometNodeKeyFile) MarshalJSON() ([]byte, error)
- func (*CometNodeKeyFile) Type() PrivateKeyType
- func (v *CometNodeKeyFile) UnmarshalJSON(data []byte) error
- type CometPrivValFile
- func (v *CometPrivValFile) Copy() *CometPrivValFile
- func (v *CometPrivValFile) CopyAsInterface() interface{}
- func (v *CometPrivValFile) Equal(u *CometPrivValFile) bool
- func (v *CometPrivValFile) MarshalJSON() ([]byte, error)
- func (*CometPrivValFile) Type() PrivateKeyType
- func (v *CometPrivValFile) UnmarshalJSON(data []byte) error
- type Config
- func (v *Config) Copy() *Config
- func (v *Config) CopyAsInterface() interface{}
- func (v *Config) Equal(u *Config) bool
- func (c *Config) FilePath() string
- func (c *Config) Load(b []byte, format func([]byte, any) error) error
- func (c *Config) LoadFrom(file string) error
- func (c *Config) Marshal(format func(any) ([]byte, error)) ([]byte, error)
- func (v *Config) MarshalJSON() ([]byte, error)
- func (c *Config) Save() error
- func (c *Config) SaveTo(file string) error
- func (c *Config) SetFilePath(p string)
- func (v *Config) UnmarshalJSON(data []byte) error
- type Configuration
- type ConfigurationType
- type ConsensusApp
- type ConsensusAppType
- type ConsensusService
- func (v *ConsensusService) Copy() *ConsensusService
- func (v *ConsensusService) CopyAsInterface() interface{}
- func (v *ConsensusService) Equal(u *ConsensusService) bool
- func (v *ConsensusService) MarshalJSON() ([]byte, error)
- func (c *ConsensusService) Provides() []ioc.Provided
- func (c *ConsensusService) Requires() []ioc.Requirement
- func (*ConsensusService) Type() ServiceType
- func (v *ConsensusService) UnmarshalJSON(data []byte) error
- type CoreConsensusApp
- func (v *CoreConsensusApp) Copy() *CoreConsensusApp
- func (v *CoreConsensusApp) CopyAsInterface() interface{}
- func (v *CoreConsensusApp) Equal(u *CoreConsensusApp) bool
- func (v *CoreConsensusApp) MarshalJSON() ([]byte, error)
- func (c *CoreConsensusApp) Provides() []ioc.Provided
- func (c *CoreConsensusApp) Requires() []ioc.Requirement
- func (*CoreConsensusApp) Type() ConsensusAppType
- func (v *CoreConsensusApp) UnmarshalJSON(data []byte) error
- type CoreValidatorConfiguration
- func (v *CoreValidatorConfiguration) Copy() *CoreValidatorConfiguration
- func (v *CoreValidatorConfiguration) CopyAsInterface() interface{}
- func (v *CoreValidatorConfiguration) Equal(u *CoreValidatorConfiguration) bool
- func (v *CoreValidatorConfiguration) MarshalJSON() ([]byte, error)
- func (*CoreValidatorConfiguration) Type() ConfigurationType
- func (v *CoreValidatorConfiguration) UnmarshalJSON(data []byte) error
- type DevnetConfiguration
- func (v *DevnetConfiguration) Copy() *DevnetConfiguration
- func (v *DevnetConfiguration) CopyAsInterface() interface{}
- func (v *DevnetConfiguration) Equal(u *DevnetConfiguration) bool
- func (v *DevnetConfiguration) MarshalJSON() ([]byte, error)
- func (*DevnetConfiguration) Type() ConfigurationType
- func (v *DevnetConfiguration) UnmarshalJSON(data []byte) error
- type DhtMode
- type EventsService
- func (v *EventsService) Copy() *EventsService
- func (v *EventsService) CopyAsInterface() interface{}
- func (v *EventsService) Equal(u *EventsService) bool
- func (v *EventsService) MarshalJSON() ([]byte, error)
- func (e *EventsService) Provides() []ioc.Provided
- func (e *EventsService) Requires() []ioc.Requirement
- func (*EventsService) Type() ServiceType
- func (v *EventsService) UnmarshalJSON(data []byte) error
- type FaucetService
- func (v *FaucetService) Copy() *FaucetService
- func (v *FaucetService) CopyAsInterface() interface{}
- func (v *FaucetService) Equal(u *FaucetService) bool
- func (v *FaucetService) MarshalJSON() ([]byte, error)
- func (f *FaucetService) Provides() []ioc.Provided
- func (f *FaucetService) Requires() []ioc.Requirement
- func (*FaucetService) Type() ServiceType
- func (v *FaucetService) UnmarshalJSON(data []byte) error
- type GatewayConfiguration
- func (v *GatewayConfiguration) Copy() *GatewayConfiguration
- func (v *GatewayConfiguration) CopyAsInterface() interface{}
- func (v *GatewayConfiguration) Equal(u *GatewayConfiguration) bool
- func (v *GatewayConfiguration) MarshalJSON() ([]byte, error)
- func (*GatewayConfiguration) Type() ConfigurationType
- func (v *GatewayConfiguration) UnmarshalJSON(data []byte) error
- type HttpListener
- type HttpPeerMapEntry
- func (v *HttpPeerMapEntry) Copy() *HttpPeerMapEntry
- func (v *HttpPeerMapEntry) CopyAsInterface() interface{}
- func (v *HttpPeerMapEntry) Equal(u *HttpPeerMapEntry) bool
- func (v *HttpPeerMapEntry) IsValid() error
- func (v *HttpPeerMapEntry) MarshalBinary() ([]byte, error)
- func (v *HttpPeerMapEntry) MarshalJSON() ([]byte, error)
- func (v *HttpPeerMapEntry) UnmarshalBinary(data []byte) error
- func (v *HttpPeerMapEntry) UnmarshalBinaryFrom(rd io.Reader) error
- func (v *HttpPeerMapEntry) UnmarshalJSON(data []byte) error
- type HttpService
- func (v *HttpService) Copy() *HttpService
- func (v *HttpService) CopyAsInterface() interface{}
- func (v *HttpService) Equal(u *HttpService) bool
- func (v *HttpService) MarshalJSON() ([]byte, error)
- func (h *HttpService) Provides() []ioc.Provided
- func (h *HttpService) Requires() []ioc.Requirement
- func (*HttpService) Type() ServiceType
- func (v *HttpService) UnmarshalJSON(data []byte) error
- type Instance
- type Instrumentation
- type Logging
- type LoggingRule
- type MemoryStorage
- func (v *MemoryStorage) Copy() *MemoryStorage
- func (v *MemoryStorage) CopyAsInterface() interface{}
- func (v *MemoryStorage) Equal(u *MemoryStorage) bool
- func (v *MemoryStorage) MarshalJSON() ([]byte, error)
- func (*MemoryStorage) Type() StorageType
- func (v *MemoryStorage) UnmarshalJSON(data []byte) error
- type MetricsService
- func (v *MetricsService) Copy() *MetricsService
- func (v *MetricsService) CopyAsInterface() interface{}
- func (v *MetricsService) Equal(u *MetricsService) bool
- func (v *MetricsService) MarshalJSON() ([]byte, error)
- func (m *MetricsService) Provides() []ioc.Provided
- func (m *MetricsService) Requires() []ioc.Requirement
- func (*MetricsService) Type() ServiceType
- func (v *MetricsService) UnmarshalJSON(data []byte) error
- type NetworkService
- func (v *NetworkService) Copy() *NetworkService
- func (v *NetworkService) CopyAsInterface() interface{}
- func (v *NetworkService) Equal(u *NetworkService) bool
- func (v *NetworkService) MarshalJSON() ([]byte, error)
- func (n *NetworkService) Provides() []ioc.Provided
- func (n *NetworkService) Requires() []ioc.Requirement
- func (*NetworkService) Type() ServiceType
- func (v *NetworkService) UnmarshalJSON(data []byte) error
- type P2P
- type PrivateKey
- type PrivateKeySeed
- func (v *PrivateKeySeed) Copy() *PrivateKeySeed
- func (v *PrivateKeySeed) CopyAsInterface() interface{}
- func (v *PrivateKeySeed) Equal(u *PrivateKeySeed) bool
- func (v *PrivateKeySeed) MarshalJSON() ([]byte, error)
- func (*PrivateKeySeed) Type() PrivateKeyType
- func (v *PrivateKeySeed) UnmarshalJSON(data []byte) error
- type PrivateKeyType
- type Querier
- func (v *Querier) Copy() *Querier
- func (v *Querier) CopyAsInterface() interface{}
- func (v *Querier) Equal(u *Querier) bool
- func (v *Querier) MarshalJSON() ([]byte, error)
- func (q *Querier) Provides() []ioc.Provided
- func (q *Querier) Requires() []ioc.Requirement
- func (*Querier) Type() ServiceType
- func (v *Querier) UnmarshalJSON(data []byte) error
- type RawPrivateKey
- func (v *RawPrivateKey) Copy() *RawPrivateKey
- func (v *RawPrivateKey) CopyAsInterface() interface{}
- func (v *RawPrivateKey) Equal(u *RawPrivateKey) bool
- func (v *RawPrivateKey) MarshalJSON() ([]byte, error)
- func (*RawPrivateKey) Type() PrivateKeyType
- func (v *RawPrivateKey) UnmarshalJSON(data []byte) error
- type RouterService
- func (v *RouterService) Copy() *RouterService
- func (v *RouterService) CopyAsInterface() interface{}
- func (v *RouterService) Equal(u *RouterService) bool
- func (v *RouterService) IsValid() error
- func (v *RouterService) MarshalBinary() ([]byte, error)
- func (v *RouterService) MarshalJSON() ([]byte, error)
- func (r *RouterService) Provides() []ioc.Provided
- func (r *RouterService) Requires() []ioc.Requirement
- func (*RouterService) Type() ServiceType
- func (v *RouterService) UnmarshalBinary(data []byte) error
- func (v *RouterService) UnmarshalBinaryFrom(rd io.Reader) error
- func (v *RouterService) UnmarshalFieldsFrom(reader *encoding.Reader) error
- func (v *RouterService) UnmarshalJSON(data []byte) error
- type Service
- type ServiceOrRef
- type ServiceType
- type SnapshotService
- func (v *SnapshotService) Copy() *SnapshotService
- func (v *SnapshotService) CopyAsInterface() interface{}
- func (v *SnapshotService) Equal(u *SnapshotService) bool
- func (v *SnapshotService) MarshalJSON() ([]byte, error)
- func (s *SnapshotService) Provides() []ioc.Provided
- func (s *SnapshotService) Requires() []ioc.Requirement
- func (*SnapshotService) Type() ServiceType
- func (v *SnapshotService) UnmarshalJSON(data []byte) error
- type Storage
- type StorageOrRef
- type StorageService
- func (v *StorageService) Copy() *StorageService
- func (v *StorageService) CopyAsInterface() interface{}
- func (v *StorageService) Equal(u *StorageService) bool
- func (v *StorageService) MarshalJSON() ([]byte, error)
- func (c *StorageService) Provides() []ioc.Provided
- func (c *StorageService) Requires() []ioc.Requirement
- func (*StorageService) Type() ServiceType
- func (v *StorageService) UnmarshalJSON(data []byte) error
- type StorageType
- type SubnodeService
- func (v *SubnodeService) Copy() *SubnodeService
- func (v *SubnodeService) CopyAsInterface() interface{}
- func (v *SubnodeService) Equal(u *SubnodeService) bool
- func (v *SubnodeService) MarshalJSON() ([]byte, error)
- func (s *SubnodeService) Provides() []ioc.Provided
- func (s *SubnodeService) Requires() []ioc.Requirement
- func (*SubnodeService) Type() ServiceType
- func (v *SubnodeService) UnmarshalJSON(data []byte) error
- type TransientPrivateKey
- func (v *TransientPrivateKey) Copy() *TransientPrivateKey
- func (v *TransientPrivateKey) CopyAsInterface() interface{}
- func (v *TransientPrivateKey) Equal(u *TransientPrivateKey) bool
- func (v *TransientPrivateKey) MarshalJSON() ([]byte, error)
- func (*TransientPrivateKey) Type() PrivateKeyType
- func (v *TransientPrivateKey) UnmarshalJSON(data []byte) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EqualConfiguration ¶
func EqualConfiguration(a, b Configuration) bool
EqualConfiguration is used to compare the values of the union
func EqualConsensusApp ¶
func EqualConsensusApp(a, b ConsensusApp) bool
EqualConsensusApp is used to compare the values of the union
func EqualPrivateKey ¶
func EqualPrivateKey(a, b PrivateKey) bool
EqualPrivateKey is used to compare the values of the union
func EqualService ¶
EqualService is used to compare the values of the union
func EqualStorage ¶
EqualStorage is used to compare the values of the union
func MarshalTOML ¶
Types ¶
type BadgerStorage ¶
type BadgerStorage struct {
Path string `json:"path,omitempty" form:"path" query:"path" validate:"required"`
}
func (*BadgerStorage) Copy ¶
func (v *BadgerStorage) Copy() *BadgerStorage
func (*BadgerStorage) CopyAsInterface ¶
func (v *BadgerStorage) CopyAsInterface() interface{}
func (*BadgerStorage) Equal ¶
func (v *BadgerStorage) Equal(u *BadgerStorage) bool
func (*BadgerStorage) MarshalJSON ¶
func (v *BadgerStorage) MarshalJSON() ([]byte, error)
func (*BadgerStorage) Type ¶
func (*BadgerStorage) Type() StorageType
func (*BadgerStorage) UnmarshalJSON ¶
func (v *BadgerStorage) UnmarshalJSON(data []byte) error
type CometNodeKeyFile ¶
type CometNodeKeyFile struct { Path string `json:"path,omitempty" form:"path" query:"path" validate:"required"` // contains filtered or unexported fields }
func (*CometNodeKeyFile) Copy ¶
func (v *CometNodeKeyFile) Copy() *CometNodeKeyFile
func (*CometNodeKeyFile) CopyAsInterface ¶
func (v *CometNodeKeyFile) CopyAsInterface() interface{}
func (*CometNodeKeyFile) Equal ¶
func (v *CometNodeKeyFile) Equal(u *CometNodeKeyFile) bool
func (*CometNodeKeyFile) MarshalJSON ¶
func (v *CometNodeKeyFile) MarshalJSON() ([]byte, error)
func (*CometNodeKeyFile) Type ¶
func (*CometNodeKeyFile) Type() PrivateKeyType
func (*CometNodeKeyFile) UnmarshalJSON ¶
func (v *CometNodeKeyFile) UnmarshalJSON(data []byte) error
type CometPrivValFile ¶
type CometPrivValFile struct { Path string `json:"path,omitempty" form:"path" query:"path" validate:"required"` // contains filtered or unexported fields }
func (*CometPrivValFile) Copy ¶
func (v *CometPrivValFile) Copy() *CometPrivValFile
func (*CometPrivValFile) CopyAsInterface ¶
func (v *CometPrivValFile) CopyAsInterface() interface{}
func (*CometPrivValFile) Equal ¶
func (v *CometPrivValFile) Equal(u *CometPrivValFile) bool
func (*CometPrivValFile) MarshalJSON ¶
func (v *CometPrivValFile) MarshalJSON() ([]byte, error)
func (*CometPrivValFile) Type ¶
func (*CometPrivValFile) Type() PrivateKeyType
func (*CometPrivValFile) UnmarshalJSON ¶
func (v *CometPrivValFile) UnmarshalJSON(data []byte) error
type Config ¶
type Config struct { Network string `json:"network,omitempty" form:"network" query:"network" validate:"required"` Logging *Logging `json:"logging,omitempty" form:"logging" query:"logging" validate:"required"` Instrumentation *Instrumentation `json:"instrumentation,omitempty" form:"instrumentation" query:"instrumentation" validate:"required"` P2P *P2P `json:"p2P,omitempty" form:"p2P" query:"p2P" validate:"required"` Configurations []Configuration `json:"configurations,omitempty" form:"configurations" query:"configurations" validate:"required"` Services []Service `json:"services,omitempty" form:"services" query:"services" validate:"required"` // contains filtered or unexported fields }
func (*Config) CopyAsInterface ¶
func (v *Config) CopyAsInterface() interface{}
func (*Config) MarshalJSON ¶
func (*Config) SetFilePath ¶
func (*Config) UnmarshalJSON ¶
type Configuration ¶
type Configuration interface { Type() ConfigurationType CopyAsInterface() any // contains filtered or unexported methods }
func CopyConfiguration ¶
func CopyConfiguration(v Configuration) Configuration
CopyConfiguration copies a Configuration.
func NewConfiguration ¶
func NewConfiguration(typ ConfigurationType) (Configuration, error)
NewConfiguration creates a new Configuration for the specified ConfigurationType.
func UnmarshalConfigurationJSON ¶
func UnmarshalConfigurationJSON(data []byte) (Configuration, error)
UnmarshalConfigurationJson unmarshals a Configuration.
type ConfigurationType ¶
type ConfigurationType int
const ConfigurationTypeCoreValidator ConfigurationType = 1
ConfigurationTypeCoreValidator .
const ConfigurationTypeDevnet ConfigurationType = 3
ConfigurationTypeDevnet .
const ConfigurationTypeGateway ConfigurationType = 2
ConfigurationTypeGateway .
func ConfigurationTypeByName ¶
func ConfigurationTypeByName(name string) (ConfigurationType, bool)
ConfigurationTypeByName returns the named Configuration Type.
func (ConfigurationType) GetEnumValue ¶
func (v ConfigurationType) GetEnumValue() uint64
GetEnumValue returns the value of the Configuration Type
func (ConfigurationType) MarshalJSON ¶
func (v ConfigurationType) MarshalJSON() ([]byte, error)
MarshalJSON marshals the Configuration Type to JSON as a string.
func (*ConfigurationType) SetEnumValue ¶
func (v *ConfigurationType) SetEnumValue(id uint64) bool
SetEnumValue sets the value. SetEnumValue returns false if the value is invalid.
func (ConfigurationType) String ¶
func (v ConfigurationType) String() string
String returns the name of the Configuration Type.
func (*ConfigurationType) UnmarshalJSON ¶
func (v *ConfigurationType) UnmarshalJSON(data []byte) error
UnmarshalJSON unmarshals the Configuration Type from JSON as a string.
type ConsensusApp ¶
type ConsensusApp interface { Type() ConsensusAppType CopyAsInterface() any Requires() []ioc.Requirement Provides() []ioc.Provided // contains filtered or unexported methods }
func CopyConsensusApp ¶
func CopyConsensusApp(v ConsensusApp) ConsensusApp
CopyConsensusApp copies a ConsensusApp.
func NewConsensusApp ¶
func NewConsensusApp(typ ConsensusAppType) (ConsensusApp, error)
NewConsensusApp creates a new ConsensusApp for the specified ConsensusAppType.
func UnmarshalConsensusAppJSON ¶
func UnmarshalConsensusAppJSON(data []byte) (ConsensusApp, error)
UnmarshalConsensusAppJson unmarshals a ConsensusApp.
type ConsensusAppType ¶
type ConsensusAppType int
const ConsensusAppTypeCore ConsensusAppType = 1
ConsensusAppTypeCore .
func ConsensusAppTypeByName ¶
func ConsensusAppTypeByName(name string) (ConsensusAppType, bool)
ConsensusAppTypeByName returns the named Consensus App Type.
func (ConsensusAppType) GetEnumValue ¶
func (v ConsensusAppType) GetEnumValue() uint64
GetEnumValue returns the value of the Consensus App Type
func (ConsensusAppType) MarshalJSON ¶
func (v ConsensusAppType) MarshalJSON() ([]byte, error)
MarshalJSON marshals the Consensus App Type to JSON as a string.
func (*ConsensusAppType) SetEnumValue ¶
func (v *ConsensusAppType) SetEnumValue(id uint64) bool
SetEnumValue sets the value. SetEnumValue returns false if the value is invalid.
func (ConsensusAppType) String ¶
func (v ConsensusAppType) String() string
String returns the name of the Consensus App Type.
func (*ConsensusAppType) UnmarshalJSON ¶
func (v *ConsensusAppType) UnmarshalJSON(data []byte) error
UnmarshalJSON unmarshals the Consensus App Type from JSON as a string.
type ConsensusService ¶
type ConsensusService struct { NodeDir string `json:"nodeDir,omitempty" form:"nodeDir" query:"nodeDir" validate:"required"` ValidatorKey PrivateKey `json:"validatorKey,omitempty" form:"validatorKey" query:"validatorKey" validate:"required"` Genesis string `json:"genesis,omitempty" form:"genesis" query:"genesis" validate:"required"` Listen p2p.Multiaddr `json:"listen,omitempty" form:"listen" query:"listen" validate:"required"` BootstrapPeers []p2p.Multiaddr `json:"bootstrapPeers,omitempty" form:"bootstrapPeers" query:"bootstrapPeers" validate:"required"` MetricsNamespace string `json:"metricsNamespace,omitempty" form:"metricsNamespace" query:"metricsNamespace"` App ConsensusApp `json:"app,omitempty" form:"app" query:"app" validate:"required"` }
func (*ConsensusService) Copy ¶
func (v *ConsensusService) Copy() *ConsensusService
func (*ConsensusService) CopyAsInterface ¶
func (v *ConsensusService) CopyAsInterface() interface{}
func (*ConsensusService) Equal ¶
func (v *ConsensusService) Equal(u *ConsensusService) bool
func (*ConsensusService) MarshalJSON ¶
func (v *ConsensusService) MarshalJSON() ([]byte, error)
func (*ConsensusService) Provides ¶
func (c *ConsensusService) Provides() []ioc.Provided
func (*ConsensusService) Requires ¶
func (c *ConsensusService) Requires() []ioc.Requirement
func (*ConsensusService) Type ¶
func (*ConsensusService) Type() ServiceType
func (*ConsensusService) UnmarshalJSON ¶
func (v *ConsensusService) UnmarshalJSON(data []byte) error
type CoreConsensusApp ¶
type CoreConsensusApp struct { Partition *protocol.PartitionInfo `json:"partition,omitempty" form:"partition" query:"partition" validate:"required"` EnableHealing *bool `json:"enableHealing,omitempty" form:"enableHealing" query:"enableHealing"` EnableDirectDispatch *bool `json:"enableDirectDispatch,omitempty" form:"enableDirectDispatch" query:"enableDirectDispatch"` MaxEnvelopesPerBlock *uint64 `json:"maxEnvelopesPerBlock,omitempty" form:"maxEnvelopesPerBlock" query:"maxEnvelopesPerBlock"` }
func (*CoreConsensusApp) Copy ¶
func (v *CoreConsensusApp) Copy() *CoreConsensusApp
func (*CoreConsensusApp) CopyAsInterface ¶
func (v *CoreConsensusApp) CopyAsInterface() interface{}
func (*CoreConsensusApp) Equal ¶
func (v *CoreConsensusApp) Equal(u *CoreConsensusApp) bool
func (*CoreConsensusApp) MarshalJSON ¶
func (v *CoreConsensusApp) MarshalJSON() ([]byte, error)
func (*CoreConsensusApp) Provides ¶
func (c *CoreConsensusApp) Provides() []ioc.Provided
func (*CoreConsensusApp) Requires ¶
func (c *CoreConsensusApp) Requires() []ioc.Requirement
func (*CoreConsensusApp) Type ¶
func (*CoreConsensusApp) Type() ConsensusAppType
func (*CoreConsensusApp) UnmarshalJSON ¶
func (v *CoreConsensusApp) UnmarshalJSON(data []byte) error
type CoreValidatorConfiguration ¶
type CoreValidatorConfiguration struct { Listen p2p.Multiaddr `json:"listen,omitempty" form:"listen" query:"listen" validate:"required"` BVN string `json:"bvn,omitempty" form:"bvn" query:"bvn" validate:"required"` ValidatorKey PrivateKey `json:"validatorKey,omitempty" form:"validatorKey" query:"validatorKey" validate:"required"` DnGenesis string `json:"dnGenesis,omitempty" form:"dnGenesis" query:"dnGenesis" validate:"required"` BvnGenesis string `json:"bvnGenesis,omitempty" form:"bvnGenesis" query:"bvnGenesis" validate:"required"` DnBootstrapPeers []p2p.Multiaddr `json:"dnBootstrapPeers,omitempty" form:"dnBootstrapPeers" query:"dnBootstrapPeers" validate:"required"` BvnBootstrapPeers []p2p.Multiaddr `json:"bvnBootstrapPeers,omitempty" form:"bvnBootstrapPeers" query:"bvnBootstrapPeers" validate:"required"` EnableHealing *bool `json:"enableHealing,omitempty" form:"enableHealing" query:"enableHealing"` EnableDirectDispatch *bool `json:"enableDirectDispatch,omitempty" form:"enableDirectDispatch" query:"enableDirectDispatch"` MaxEnvelopesPerBlock *uint64 `json:"maxEnvelopesPerBlock,omitempty" form:"maxEnvelopesPerBlock" query:"maxEnvelopesPerBlock"` StorageType *StorageType `json:"storageType,omitempty" form:"storageType" query:"storageType"` }
func (*CoreValidatorConfiguration) Copy ¶
func (v *CoreValidatorConfiguration) Copy() *CoreValidatorConfiguration
func (*CoreValidatorConfiguration) CopyAsInterface ¶
func (v *CoreValidatorConfiguration) CopyAsInterface() interface{}
func (*CoreValidatorConfiguration) Equal ¶
func (v *CoreValidatorConfiguration) Equal(u *CoreValidatorConfiguration) bool
func (*CoreValidatorConfiguration) MarshalJSON ¶
func (v *CoreValidatorConfiguration) MarshalJSON() ([]byte, error)
func (*CoreValidatorConfiguration) Type ¶
func (*CoreValidatorConfiguration) Type() ConfigurationType
func (*CoreValidatorConfiguration) UnmarshalJSON ¶
func (v *CoreValidatorConfiguration) UnmarshalJSON(data []byte) error
type DevnetConfiguration ¶
type DevnetConfiguration struct { Listen p2p.Multiaddr `json:"listen,omitempty" form:"listen" query:"listen" validate:"required"` Bvns uint64 `json:"bvns,omitempty" form:"bvns" query:"bvns" validate:"required"` Validators uint64 `json:"validators,omitempty" form:"validators" query:"validators" validate:"required"` Followers uint64 `json:"followers,omitempty" form:"followers" query:"followers"` Globals *network.GlobalValues `json:"globals,omitempty" form:"globals" query:"globals" validate:"required"` }
func (*DevnetConfiguration) Copy ¶
func (v *DevnetConfiguration) Copy() *DevnetConfiguration
func (*DevnetConfiguration) CopyAsInterface ¶
func (v *DevnetConfiguration) CopyAsInterface() interface{}
func (*DevnetConfiguration) Equal ¶
func (v *DevnetConfiguration) Equal(u *DevnetConfiguration) bool
func (*DevnetConfiguration) MarshalJSON ¶
func (v *DevnetConfiguration) MarshalJSON() ([]byte, error)
func (*DevnetConfiguration) Type ¶
func (*DevnetConfiguration) Type() ConfigurationType
func (*DevnetConfiguration) UnmarshalJSON ¶
func (v *DevnetConfiguration) UnmarshalJSON(data []byte) error
type EventsService ¶
type EventsService struct {
Partition string `json:"partition,omitempty" form:"partition" query:"partition" validate:"required"`
}
func (*EventsService) Copy ¶
func (v *EventsService) Copy() *EventsService
func (*EventsService) CopyAsInterface ¶
func (v *EventsService) CopyAsInterface() interface{}
func (*EventsService) Equal ¶
func (v *EventsService) Equal(u *EventsService) bool
func (*EventsService) MarshalJSON ¶
func (v *EventsService) MarshalJSON() ([]byte, error)
func (*EventsService) Provides ¶
func (e *EventsService) Provides() []ioc.Provided
func (*EventsService) Requires ¶
func (e *EventsService) Requires() []ioc.Requirement
func (*EventsService) Type ¶
func (*EventsService) Type() ServiceType
func (*EventsService) UnmarshalJSON ¶
func (v *EventsService) UnmarshalJSON(data []byte) error
type FaucetService ¶
type FaucetService struct { Account *url.URL `json:"account,omitempty" form:"account" query:"account" validate:"required"` SigningKey PrivateKey `json:"signingKey,omitempty" form:"signingKey" query:"signingKey" validate:"required"` Router *ServiceOrRef[*RouterService] `json:"router,omitempty" form:"router" query:"router" validate:"required"` }
func (*FaucetService) Copy ¶
func (v *FaucetService) Copy() *FaucetService
func (*FaucetService) CopyAsInterface ¶
func (v *FaucetService) CopyAsInterface() interface{}
func (*FaucetService) Equal ¶
func (v *FaucetService) Equal(u *FaucetService) bool
func (*FaucetService) MarshalJSON ¶
func (v *FaucetService) MarshalJSON() ([]byte, error)
func (*FaucetService) Provides ¶
func (f *FaucetService) Provides() []ioc.Provided
func (*FaucetService) Requires ¶
func (f *FaucetService) Requires() []ioc.Requirement
func (*FaucetService) Type ¶
func (*FaucetService) Type() ServiceType
func (*FaucetService) UnmarshalJSON ¶
func (v *FaucetService) UnmarshalJSON(data []byte) error
type GatewayConfiguration ¶
type GatewayConfiguration struct {
Listen p2p.Multiaddr `json:"listen,omitempty" form:"listen" query:"listen" validate:"required"`
}
func (*GatewayConfiguration) Copy ¶
func (v *GatewayConfiguration) Copy() *GatewayConfiguration
func (*GatewayConfiguration) CopyAsInterface ¶
func (v *GatewayConfiguration) CopyAsInterface() interface{}
func (*GatewayConfiguration) Equal ¶
func (v *GatewayConfiguration) Equal(u *GatewayConfiguration) bool
func (*GatewayConfiguration) MarshalJSON ¶
func (v *GatewayConfiguration) MarshalJSON() ([]byte, error)
func (*GatewayConfiguration) Type ¶
func (*GatewayConfiguration) Type() ConfigurationType
func (*GatewayConfiguration) UnmarshalJSON ¶
func (v *GatewayConfiguration) UnmarshalJSON(data []byte) error
type HttpListener ¶
type HttpListener struct { // Listen are the addresses and schemes to listen on. Listen []p2p.Multiaddr `json:"listen,omitempty" form:"listen" query:"listen" validate:"required"` // ConnectionLimit limits the number of concurrent connections. ConnectionLimit *int64 `json:"connectionLimit,omitempty" form:"connectionLimit" query:"connectionLimit"` // ReadHeaderTimeout protects against slow-loris attacks. ReadHeaderTimeout *time.Duration `json:"readHeaderTimeout,omitempty" form:"readHeaderTimeout" query:"readHeaderTimeout"` // TlsCertPath is the path of the TLS certificate. TlsCertPath string `json:"tlsCertPath,omitempty" form:"tlsCertPath" query:"tlsCertPath"` // TlsKeyPath is the path of the TLS key. TlsKeyPath string `json:"tlsKeyPath,omitempty" form:"tlsKeyPath" query:"tlsKeyPath"` }
func (*HttpListener) Copy ¶
func (v *HttpListener) Copy() *HttpListener
func (*HttpListener) CopyAsInterface ¶
func (v *HttpListener) CopyAsInterface() interface{}
func (*HttpListener) Equal ¶
func (v *HttpListener) Equal(u *HttpListener) bool
func (*HttpListener) MarshalJSON ¶
func (v *HttpListener) MarshalJSON() ([]byte, error)
func (*HttpListener) UnmarshalJSON ¶
func (v *HttpListener) UnmarshalJSON(data []byte) error
type HttpPeerMapEntry ¶
type HttpPeerMapEntry struct { ID p2p.PeerID `json:"id,omitempty" form:"id" query:"id" validate:"required"` Partitions []string `json:"partitions,omitempty" form:"partitions" query:"partitions" validate:"required"` Addresses []p2p.Multiaddr `json:"addresses,omitempty" form:"addresses" query:"addresses" validate:"required"` // contains filtered or unexported fields }
func (*HttpPeerMapEntry) Copy ¶
func (v *HttpPeerMapEntry) Copy() *HttpPeerMapEntry
func (*HttpPeerMapEntry) CopyAsInterface ¶
func (v *HttpPeerMapEntry) CopyAsInterface() interface{}
func (*HttpPeerMapEntry) Equal ¶
func (v *HttpPeerMapEntry) Equal(u *HttpPeerMapEntry) bool
func (*HttpPeerMapEntry) IsValid ¶
func (v *HttpPeerMapEntry) IsValid() error
func (*HttpPeerMapEntry) MarshalBinary ¶
func (v *HttpPeerMapEntry) MarshalBinary() ([]byte, error)
func (*HttpPeerMapEntry) MarshalJSON ¶
func (v *HttpPeerMapEntry) MarshalJSON() ([]byte, error)
func (*HttpPeerMapEntry) UnmarshalBinary ¶
func (v *HttpPeerMapEntry) UnmarshalBinary(data []byte) error
func (*HttpPeerMapEntry) UnmarshalBinaryFrom ¶
func (v *HttpPeerMapEntry) UnmarshalBinaryFrom(rd io.Reader) error
func (*HttpPeerMapEntry) UnmarshalJSON ¶
func (v *HttpPeerMapEntry) UnmarshalJSON(data []byte) error
type HttpService ¶
type HttpService struct { HttpListener // CorsOrigins is a list of allowed CORS origins. CorsOrigins []string `json:"corsOrigins,omitempty" form:"corsOrigins" query:"corsOrigins"` // LetsEncrypt automatically retrieves a certificate from Let's Encrypt for the specified domains. LetsEncrypt []string `json:"letsEncrypt,omitempty" form:"letsEncrypt" query:"letsEncrypt"` DebugJsonRpc *bool `json:"debugJsonRpc,omitempty" form:"debugJsonRpc" query:"debugJsonRpc"` Router *ServiceOrRef[*RouterService] `json:"router,omitempty" form:"router" query:"router" validate:"required"` // PeerMap hard-codes the peer map. PeerMap []*HttpPeerMapEntry `json:"peerMap,omitempty" form:"peerMap" query:"peerMap" validate:"required"` }
func (*HttpService) Copy ¶
func (v *HttpService) Copy() *HttpService
func (*HttpService) CopyAsInterface ¶
func (v *HttpService) CopyAsInterface() interface{}
func (*HttpService) Equal ¶
func (v *HttpService) Equal(u *HttpService) bool
func (*HttpService) MarshalJSON ¶
func (v *HttpService) MarshalJSON() ([]byte, error)
func (*HttpService) Provides ¶
func (h *HttpService) Provides() []ioc.Provided
func (*HttpService) Requires ¶
func (h *HttpService) Requires() []ioc.Requirement
func (*HttpService) Type ¶
func (*HttpService) Type() ServiceType
func (*HttpService) UnmarshalJSON ¶
func (v *HttpService) UnmarshalJSON(data []byte) error
type Instance ¶
type Instance struct {
// contains filtered or unexported fields
}
func (*Instance) StartFiltered ¶
type Instrumentation ¶
type Instrumentation struct {
HttpListener
}
func (*Instrumentation) Copy ¶
func (v *Instrumentation) Copy() *Instrumentation
func (*Instrumentation) CopyAsInterface ¶
func (v *Instrumentation) CopyAsInterface() interface{}
func (*Instrumentation) Equal ¶
func (v *Instrumentation) Equal(u *Instrumentation) bool
func (*Instrumentation) MarshalJSON ¶
func (v *Instrumentation) MarshalJSON() ([]byte, error)
func (*Instrumentation) UnmarshalJSON ¶
func (v *Instrumentation) UnmarshalJSON(data []byte) error
type Logging ¶
type Logging struct { Format string `json:"format,omitempty" form:"format" query:"format" validate:"required"` Color *bool `json:"color,omitempty" form:"color" query:"color" validate:"required"` Rules []*LoggingRule `json:"rules,omitempty" form:"rules" query:"rules" validate:"required"` }
func (*Logging) CopyAsInterface ¶
func (v *Logging) CopyAsInterface() interface{}
func (*Logging) MarshalJSON ¶
func (*Logging) UnmarshalJSON ¶
type LoggingRule ¶
type LoggingRule struct { Level slog.Level `json:"level" form:"level" query:"level" validate:"required"` Modules []string `json:"modules,omitempty" form:"modules" query:"modules" validate:"required"` }
func (*LoggingRule) Copy ¶
func (v *LoggingRule) Copy() *LoggingRule
func (*LoggingRule) CopyAsInterface ¶
func (v *LoggingRule) CopyAsInterface() interface{}
func (*LoggingRule) Equal ¶
func (v *LoggingRule) Equal(u *LoggingRule) bool
func (*LoggingRule) MarshalJSON ¶
func (v *LoggingRule) MarshalJSON() ([]byte, error)
func (*LoggingRule) UnmarshalJSON ¶
func (v *LoggingRule) UnmarshalJSON(data []byte) error
type MemoryStorage ¶
type MemoryStorage struct { }
func (*MemoryStorage) Copy ¶
func (v *MemoryStorage) Copy() *MemoryStorage
func (*MemoryStorage) CopyAsInterface ¶
func (v *MemoryStorage) CopyAsInterface() interface{}
func (*MemoryStorage) Equal ¶
func (v *MemoryStorage) Equal(u *MemoryStorage) bool
func (*MemoryStorage) MarshalJSON ¶
func (v *MemoryStorage) MarshalJSON() ([]byte, error)
func (*MemoryStorage) Type ¶
func (*MemoryStorage) Type() StorageType
func (*MemoryStorage) UnmarshalJSON ¶
func (v *MemoryStorage) UnmarshalJSON(data []byte) error
type MetricsService ¶
type MetricsService struct {
Partition string `json:"partition,omitempty" form:"partition" query:"partition" validate:"required"`
}
func (*MetricsService) Copy ¶
func (v *MetricsService) Copy() *MetricsService
func (*MetricsService) CopyAsInterface ¶
func (v *MetricsService) CopyAsInterface() interface{}
func (*MetricsService) Equal ¶
func (v *MetricsService) Equal(u *MetricsService) bool
func (*MetricsService) MarshalJSON ¶
func (v *MetricsService) MarshalJSON() ([]byte, error)
func (*MetricsService) Provides ¶
func (m *MetricsService) Provides() []ioc.Provided
func (*MetricsService) Requires ¶
func (m *MetricsService) Requires() []ioc.Requirement
func (*MetricsService) Type ¶
func (*MetricsService) Type() ServiceType
func (*MetricsService) UnmarshalJSON ¶
func (v *MetricsService) UnmarshalJSON(data []byte) error
type NetworkService ¶
type NetworkService struct {
Partition string `json:"partition,omitempty" form:"partition" query:"partition" validate:"required"`
}
func (*NetworkService) Copy ¶
func (v *NetworkService) Copy() *NetworkService
func (*NetworkService) CopyAsInterface ¶
func (v *NetworkService) CopyAsInterface() interface{}
func (*NetworkService) Equal ¶
func (v *NetworkService) Equal(u *NetworkService) bool
func (*NetworkService) MarshalJSON ¶
func (v *NetworkService) MarshalJSON() ([]byte, error)
func (*NetworkService) Provides ¶
func (n *NetworkService) Provides() []ioc.Provided
func (*NetworkService) Requires ¶
func (n *NetworkService) Requires() []ioc.Requirement
func (*NetworkService) Type ¶
func (*NetworkService) Type() ServiceType
func (*NetworkService) UnmarshalJSON ¶
func (v *NetworkService) UnmarshalJSON(data []byte) error
type P2P ¶
type P2P struct { Listen []p2p.Multiaddr `json:"listen,omitempty" form:"listen" query:"listen" validate:"required"` BootstrapPeers []p2p.Multiaddr `json:"bootstrapPeers,omitempty" form:"bootstrapPeers" query:"bootstrapPeers" validate:"required"` Key PrivateKey `json:"key,omitempty" form:"key" query:"key" validate:"required"` PeerDB *string `json:"peerDB,omitempty" form:"peerDB" query:"peerDB" validate:"required"` EnablePeerTracking bool `json:"enablePeerTracking,omitempty" form:"enablePeerTracking" query:"enablePeerTracking" validate:"required"` DiscoveryMode *DhtMode `json:"discoveryMode,omitempty" form:"discoveryMode" query:"discoveryMode" validate:"required"` External p2p.Multiaddr `json:"external,omitempty" form:"external" query:"external" validate:"required"` }
func (*P2P) CopyAsInterface ¶
func (v *P2P) CopyAsInterface() interface{}
func (*P2P) MarshalJSON ¶
func (*P2P) UnmarshalJSON ¶
type PrivateKey ¶
type PrivateKey interface { Type() PrivateKeyType CopyAsInterface() any // contains filtered or unexported methods }
func CopyPrivateKey ¶
func CopyPrivateKey(v PrivateKey) PrivateKey
CopyPrivateKey copies a PrivateKey.
func NewPrivateKey ¶
func NewPrivateKey(typ PrivateKeyType) (PrivateKey, error)
NewPrivateKey creates a new PrivateKey for the specified PrivateKeyType.
func UnmarshalPrivateKeyJSON ¶
func UnmarshalPrivateKeyJSON(data []byte) (PrivateKey, error)
UnmarshalPrivateKeyJson unmarshals a PrivateKey.
type PrivateKeySeed ¶
type PrivateKeySeed struct { Seed *record.Key `json:"seed,omitempty" form:"seed" query:"seed" validate:"required"` // contains filtered or unexported fields }
func (*PrivateKeySeed) Copy ¶
func (v *PrivateKeySeed) Copy() *PrivateKeySeed
func (*PrivateKeySeed) CopyAsInterface ¶
func (v *PrivateKeySeed) CopyAsInterface() interface{}
func (*PrivateKeySeed) Equal ¶
func (v *PrivateKeySeed) Equal(u *PrivateKeySeed) bool
func (*PrivateKeySeed) MarshalJSON ¶
func (v *PrivateKeySeed) MarshalJSON() ([]byte, error)
func (*PrivateKeySeed) Type ¶
func (*PrivateKeySeed) Type() PrivateKeyType
func (*PrivateKeySeed) UnmarshalJSON ¶
func (v *PrivateKeySeed) UnmarshalJSON(data []byte) error
type PrivateKeyType ¶
type PrivateKeyType int
const PrivateKeyTypeCometNodeKeyFile PrivateKeyType = 5
PrivateKeyTypeCometNodeKeyFile .
const PrivateKeyTypeCometPrivValFile PrivateKeyType = 4
PrivateKeyTypeCometPrivValFile .
const PrivateKeyTypeRaw PrivateKeyType = 1
PrivateKeyTypeRaw .
const PrivateKeyTypeSeed PrivateKeyType = 3
PrivateKeyTypeSeed .
const PrivateKeyTypeTransient PrivateKeyType = 2
PrivateKeyTypeTransient .
func PrivateKeyTypeByName ¶
func PrivateKeyTypeByName(name string) (PrivateKeyType, bool)
PrivateKeyTypeByName returns the named Private Key Type.
func (PrivateKeyType) GetEnumValue ¶
func (v PrivateKeyType) GetEnumValue() uint64
GetEnumValue returns the value of the Private Key Type
func (PrivateKeyType) MarshalJSON ¶
func (v PrivateKeyType) MarshalJSON() ([]byte, error)
MarshalJSON marshals the Private Key Type to JSON as a string.
func (*PrivateKeyType) SetEnumValue ¶
func (v *PrivateKeyType) SetEnumValue(id uint64) bool
SetEnumValue sets the value. SetEnumValue returns false if the value is invalid.
func (PrivateKeyType) String ¶
func (v PrivateKeyType) String() string
String returns the name of the Private Key Type.
func (*PrivateKeyType) UnmarshalJSON ¶
func (v *PrivateKeyType) UnmarshalJSON(data []byte) error
UnmarshalJSON unmarshals the Private Key Type from JSON as a string.
type Querier ¶
type Querier struct { Partition string `json:"partition,omitempty" form:"partition" query:"partition" validate:"required"` Storage *StorageOrRef `json:"storage,omitempty" form:"storage" query:"storage"` }
func (*Querier) CopyAsInterface ¶
func (v *Querier) CopyAsInterface() interface{}
func (*Querier) MarshalJSON ¶
func (*Querier) Requires ¶
func (q *Querier) Requires() []ioc.Requirement
func (*Querier) Type ¶
func (*Querier) Type() ServiceType
func (*Querier) UnmarshalJSON ¶
type RawPrivateKey ¶
type RawPrivateKey struct {
Address string `json:"address,omitempty" form:"address" query:"address" validate:"required"`
}
func (*RawPrivateKey) Copy ¶
func (v *RawPrivateKey) Copy() *RawPrivateKey
func (*RawPrivateKey) CopyAsInterface ¶
func (v *RawPrivateKey) CopyAsInterface() interface{}
func (*RawPrivateKey) Equal ¶
func (v *RawPrivateKey) Equal(u *RawPrivateKey) bool
func (*RawPrivateKey) MarshalJSON ¶
func (v *RawPrivateKey) MarshalJSON() ([]byte, error)
func (*RawPrivateKey) Type ¶
func (*RawPrivateKey) Type() PrivateKeyType
func (*RawPrivateKey) UnmarshalJSON ¶
func (v *RawPrivateKey) UnmarshalJSON(data []byte) error
type RouterService ¶
type RouterService struct { Name string `json:"name,omitempty" form:"name" query:"name"` // Events may specify an event bus to use for routing table updates. Events string `json:"events,omitempty" form:"events" query:"events"` // contains filtered or unexported fields }
func (*RouterService) Copy ¶
func (v *RouterService) Copy() *RouterService
func (*RouterService) CopyAsInterface ¶
func (v *RouterService) CopyAsInterface() interface{}
func (*RouterService) Equal ¶
func (v *RouterService) Equal(u *RouterService) bool
func (*RouterService) IsValid ¶
func (v *RouterService) IsValid() error
func (*RouterService) MarshalBinary ¶
func (v *RouterService) MarshalBinary() ([]byte, error)
func (*RouterService) MarshalJSON ¶
func (v *RouterService) MarshalJSON() ([]byte, error)
func (*RouterService) Provides ¶
func (r *RouterService) Provides() []ioc.Provided
func (*RouterService) Requires ¶
func (r *RouterService) Requires() []ioc.Requirement
func (*RouterService) Type ¶
func (*RouterService) Type() ServiceType
func (*RouterService) UnmarshalBinary ¶
func (v *RouterService) UnmarshalBinary(data []byte) error
func (*RouterService) UnmarshalBinaryFrom ¶
func (v *RouterService) UnmarshalBinaryFrom(rd io.Reader) error
func (*RouterService) UnmarshalFieldsFrom ¶
func (v *RouterService) UnmarshalFieldsFrom(reader *encoding.Reader) error
func (*RouterService) UnmarshalJSON ¶
func (v *RouterService) UnmarshalJSON(data []byte) error
type Service ¶
type Service interface { ioc.Factory Type() ServiceType CopyAsInterface() any // contains filtered or unexported methods }
func NewService ¶
func NewService(typ ServiceType) (Service, error)
NewService creates a new Service for the specified ServiceType.
func UnmarshalServiceJSON ¶
UnmarshalServiceJson unmarshals a Service.
type ServiceOrRef ¶
type ServiceOrRef[T serviceType[T]] baseRef[T]
func ServiceReference ¶
func ServiceReference[T serviceType[T]](ref string) *ServiceOrRef[T]
func ServiceValue ¶
func ServiceValue[T serviceType[T]](service T) *ServiceOrRef[T]
func (*ServiceOrRef[T]) Copy ¶
func (s *ServiceOrRef[T]) Copy() *ServiceOrRef[T]
func (*ServiceOrRef[T]) Equal ¶
func (s *ServiceOrRef[T]) Equal(t *ServiceOrRef[T]) bool
func (*ServiceOrRef[T]) MarshalJSON ¶
func (s *ServiceOrRef[T]) MarshalJSON() ([]byte, error)
func (*ServiceOrRef[T]) RequiresOr ¶
func (s *ServiceOrRef[T]) RequiresOr(def ...ioc.Requirement) []ioc.Requirement
func (*ServiceOrRef[T]) UnmarshalJSON ¶
func (s *ServiceOrRef[T]) UnmarshalJSON(b []byte) error
type ServiceType ¶
type ServiceType int
const ServiceTypeConsensus ServiceType = 2
ServiceTypeConsensus .
const ServiceTypeEvents ServiceType = 6
ServiceTypeEvents .
const ServiceTypeFaucet ServiceType = 10
ServiceTypeFaucet .
const ServiceTypeHttp ServiceType = 7
ServiceTypeHttp .
const ServiceTypeMetrics ServiceType = 5
ServiceTypeMetrics .
const ServiceTypeNetwork ServiceType = 4
ServiceTypeNetwork .
const ServiceTypeQuerier ServiceType = 3
ServiceTypeQuerier .
const ServiceTypeRouter ServiceType = 8
ServiceTypeRouter .
const ServiceTypeSnapshot ServiceType = 9
ServiceTypeSnapshot .
const ServiceTypeStorage ServiceType = 1
ServiceTypeStorage .
const ServiceTypeSubnode ServiceType = 11
ServiceTypeSubnode .
func ServiceTypeByName ¶
func ServiceTypeByName(name string) (ServiceType, bool)
ServiceTypeByName returns the named Service Type.
func (ServiceType) GetEnumValue ¶
func (v ServiceType) GetEnumValue() uint64
GetEnumValue returns the value of the Service Type
func (ServiceType) MarshalJSON ¶
func (v ServiceType) MarshalJSON() ([]byte, error)
MarshalJSON marshals the Service Type to JSON as a string.
func (*ServiceType) SetEnumValue ¶
func (v *ServiceType) SetEnumValue(id uint64) bool
SetEnumValue sets the value. SetEnumValue returns false if the value is invalid.
func (ServiceType) String ¶
func (v ServiceType) String() string
String returns the name of the Service Type.
func (*ServiceType) UnmarshalJSON ¶
func (v *ServiceType) UnmarshalJSON(data []byte) error
UnmarshalJSON unmarshals the Service Type from JSON as a string.
type SnapshotService ¶
type SnapshotService struct { Partition string `json:"partition,omitempty" form:"partition" query:"partition" validate:"required"` Storage *StorageOrRef `json:"storage,omitempty" form:"storage" query:"storage"` // Directory is the directory to store snapshots in. Directory string `json:"directory,omitempty" form:"directory" query:"directory" validate:"required"` // Schedule is the schedule for capturing snapshots. Schedule *network.CronSchedule `json:"schedule,omitempty" form:"schedule" query:"schedule"` // RetainCount is the number of snapshots to retain. RetainCount *uint64 `json:"retainCount,omitempty" form:"retainCount" query:"retainCount"` // EnableIndexing enables indexing of snapshots. EnableIndexing *bool `json:"enableIndexing,omitempty" form:"enableIndexing" query:"enableIndexing"` }
func (*SnapshotService) Copy ¶
func (v *SnapshotService) Copy() *SnapshotService
func (*SnapshotService) CopyAsInterface ¶
func (v *SnapshotService) CopyAsInterface() interface{}
func (*SnapshotService) Equal ¶
func (v *SnapshotService) Equal(u *SnapshotService) bool
func (*SnapshotService) MarshalJSON ¶
func (v *SnapshotService) MarshalJSON() ([]byte, error)
func (*SnapshotService) Provides ¶
func (s *SnapshotService) Provides() []ioc.Provided
func (*SnapshotService) Requires ¶
func (s *SnapshotService) Requires() []ioc.Requirement
func (*SnapshotService) Type ¶
func (*SnapshotService) Type() ServiceType
func (*SnapshotService) UnmarshalJSON ¶
func (v *SnapshotService) UnmarshalJSON(data []byte) error
type Storage ¶
type Storage interface { Type() StorageType CopyAsInterface() any // contains filtered or unexported methods }
func NewStorage ¶
func NewStorage(typ StorageType) (Storage, error)
NewStorage creates a new Storage for the specified StorageType.
func UnmarshalStorageJSON ¶
UnmarshalStorageJson unmarshals a Storage.
type StorageOrRef ¶
type StorageOrRef baseRef[Storage]
func (*StorageOrRef) Copy ¶
func (s *StorageOrRef) Copy() *StorageOrRef
func (*StorageOrRef) Equal ¶
func (s *StorageOrRef) Equal(t *StorageOrRef) bool
func (*StorageOrRef) MarshalJSON ¶
func (s *StorageOrRef) MarshalJSON() ([]byte, error)
func (*StorageOrRef) Required ¶
func (s *StorageOrRef) Required(def string) []ioc.Requirement
func (*StorageOrRef) UnmarshalJSON ¶
func (s *StorageOrRef) UnmarshalJSON(b []byte) error
type StorageService ¶
type StorageService struct { Name string `json:"name,omitempty" form:"name" query:"name"` Storage Storage `json:"storage,omitempty" form:"storage" query:"storage" validate:"required"` }
func (*StorageService) Copy ¶
func (v *StorageService) Copy() *StorageService
func (*StorageService) CopyAsInterface ¶
func (v *StorageService) CopyAsInterface() interface{}
func (*StorageService) Equal ¶
func (v *StorageService) Equal(u *StorageService) bool
func (*StorageService) MarshalJSON ¶
func (v *StorageService) MarshalJSON() ([]byte, error)
func (*StorageService) Provides ¶
func (c *StorageService) Provides() []ioc.Provided
func (*StorageService) Requires ¶
func (c *StorageService) Requires() []ioc.Requirement
func (*StorageService) Type ¶
func (*StorageService) Type() ServiceType
func (*StorageService) UnmarshalJSON ¶
func (v *StorageService) UnmarshalJSON(data []byte) error
type StorageType ¶
type StorageType int
const StorageTypeBadger StorageType = 2
StorageTypeBadger .
const StorageTypeMemory StorageType = 1
StorageTypeMemory .
func StorageTypeByName ¶
func StorageTypeByName(name string) (StorageType, bool)
StorageTypeByName returns the named Storage Type.
func (StorageType) GetEnumValue ¶
func (v StorageType) GetEnumValue() uint64
GetEnumValue returns the value of the Storage Type
func (StorageType) MarshalJSON ¶
func (v StorageType) MarshalJSON() ([]byte, error)
MarshalJSON marshals the Storage Type to JSON as a string.
func (*StorageType) SetEnumValue ¶
func (v *StorageType) SetEnumValue(id uint64) bool
SetEnumValue sets the value. SetEnumValue returns false if the value is invalid.
func (StorageType) String ¶
func (v StorageType) String() string
String returns the name of the Storage Type.
func (*StorageType) UnmarshalJSON ¶
func (v *StorageType) UnmarshalJSON(data []byte) error
UnmarshalJSON unmarshals the Storage Type from JSON as a string.
type SubnodeService ¶
type SubnodeService struct { Name string `json:"name,omitempty" form:"name" query:"name" validate:"required"` NodeKey PrivateKey `json:"nodeKey,omitempty" form:"nodeKey" query:"nodeKey" validate:"required"` Services []Service `json:"services,omitempty" form:"services" query:"services" validate:"required"` }
func (*SubnodeService) Copy ¶
func (v *SubnodeService) Copy() *SubnodeService
func (*SubnodeService) CopyAsInterface ¶
func (v *SubnodeService) CopyAsInterface() interface{}
func (*SubnodeService) Equal ¶
func (v *SubnodeService) Equal(u *SubnodeService) bool
func (*SubnodeService) MarshalJSON ¶
func (v *SubnodeService) MarshalJSON() ([]byte, error)
func (*SubnodeService) Provides ¶
func (s *SubnodeService) Provides() []ioc.Provided
func (*SubnodeService) Requires ¶
func (s *SubnodeService) Requires() []ioc.Requirement
func (*SubnodeService) Type ¶
func (*SubnodeService) Type() ServiceType
func (*SubnodeService) UnmarshalJSON ¶
func (v *SubnodeService) UnmarshalJSON(data []byte) error
type TransientPrivateKey ¶
type TransientPrivateKey struct {
// contains filtered or unexported fields
}
func (*TransientPrivateKey) Copy ¶
func (v *TransientPrivateKey) Copy() *TransientPrivateKey
func (*TransientPrivateKey) CopyAsInterface ¶
func (v *TransientPrivateKey) CopyAsInterface() interface{}
func (*TransientPrivateKey) Equal ¶
func (v *TransientPrivateKey) Equal(u *TransientPrivateKey) bool
func (*TransientPrivateKey) MarshalJSON ¶
func (v *TransientPrivateKey) MarshalJSON() ([]byte, error)
func (*TransientPrivateKey) Type ¶
func (*TransientPrivateKey) Type() PrivateKeyType
func (*TransientPrivateKey) UnmarshalJSON ¶
func (v *TransientPrivateKey) UnmarshalJSON(data []byte) error