Documentation
¶
Index ¶
- type APIPackageConfig
- type AntifloodConfig
- type ApiConfig
- type ApiLoggingConfig
- type ApiRoutesConfig
- type Config
- type Configs
- type ContextFlagsConfig
- type ExternalConfig
- type GeneralConfig
- type GinConfig
- type GuardianConfig
- type LogsConfig
- type MongoDBConfig
- type NativeAuthServerConfig
- type PubkeyConfig
- type RedisConfig
- type RouteConfig
- type ServiceResolverConfig
- type ShardedStorageConfig
- type StorageConfig
- type TwoFactorConfig
- type WebServerAntifloodConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APIPackageConfig ¶
type APIPackageConfig struct {
Routes []RouteConfig
}
APIPackageConfig holds the configuration for the routes of each package
type AntifloodConfig ¶
type AntifloodConfig struct {
Enabled bool
WebServer WebServerAntifloodConfig
}
AntifloodConfig will hold all p2p antiflood parameters
type ApiConfig ¶
type ApiConfig struct {
NetworkAddress string
}
ApiConfig will hold settings related to the Api
type ApiLoggingConfig ¶
ApiLoggingConfig holds the configuration related to API requests logging
type ApiRoutesConfig ¶
type ApiRoutesConfig struct {
RestApiInterface string
Logging ApiLoggingConfig
APIPackages map[string]APIPackageConfig
}
ApiRoutesConfig holds the configuration related to Rest API routes
type Config ¶
type Config struct {
Guardian GuardianConfig
General GeneralConfig
Logs LogsConfig
Antiflood AntifloodConfig
ServiceResolver ServiceResolverConfig
ShardedStorage ShardedStorageConfig
TwoFactor TwoFactorConfig
NativeAuthServer NativeAuthServerConfig
PubKey PubkeyConfig
}
Config general configuration struct
type Configs ¶
type Configs struct {
GeneralConfig Config
ExternalConfig ExternalConfig
ApiRoutesConfig ApiRoutesConfig
FlagsConfig ContextFlagsConfig
}
Configs is a holder for the relayer configuration parameters
type ContextFlagsConfig ¶
type ContextFlagsConfig struct {
WorkingDir string
LogLevel string
ConfigurationFile string
ConfigurationApiFile string
ConfigurationExternalFile string
RestApiInterface string
DisableAnsiColor bool
SaveLogFile bool
EnableLogName bool
EnablePprof bool
StartSwaggerUI bool
}
ContextFlagsConfig the configuration for flags
type ExternalConfig ¶
type ExternalConfig struct {
Api ApiConfig
MongoDB MongoDBConfig
Redis RedisConfig
Gin GinConfig
}
ExternalConfig defines the configuration for external components
type GeneralConfig ¶
GeneralConfig holds the general configuration for the service
type GinConfig ¶
type GinConfig struct {
ForwardedByClientIP bool
TrustedPlatform string
RemoteIPHeaders []string
TrustedProxies []string
}
GinConfig holds the configuration for custom gin web server options
type GuardianConfig ¶
GuardianConfig holds the configuration for the guardian
type LogsConfig ¶
type LogsConfig struct {
LogFileLifeSpanInSec int
}
LogsConfig will hold settings related to the logging sub-system
type MongoDBConfig ¶
type MongoDBConfig struct {
URI string
DBName string
ConnectTimeoutInSec uint32
OperationTimeoutInSec uint32
NumUsersCollections uint32
}
MongoDBConfig maps the mongodb configuration
type NativeAuthServerConfig ¶
type NativeAuthServerConfig struct {
Cache storageUnit.CacheConfig
}
NativeAuthServerConfig will hold settings related to the native auth server
type PubkeyConfig ¶
PubkeyConfig will map the public key configuration
type RedisConfig ¶
type RedisConfig struct {
URL string
Channel string
MasterName string
SentinelUrl string
ConnectionType string
OperationTimeoutInSec uint64
}
RedisConfig maps the redis configuration
type RouteConfig ¶
RouteConfig holds the configuration for a single route
type ServiceResolverConfig ¶
type ServiceResolverConfig struct {
RequestTimeInSeconds uint64
SkipTxUserSigVerify bool
MaxTransactionsAllowedForSigning int
DelayBetweenOTPWritesInSec uint64
}
ServiceResolverConfig will hold settings related to the service resolver
type ShardedStorageConfig ¶
type ShardedStorageConfig struct {
NumberOfBuckets uint32
Users StorageConfig
}
ShardedStorageConfig is the configuration for the sharded storage
type StorageConfig ¶
type StorageConfig struct {
Cache storageUnit.CacheConfig
DB storageUnit.DBConfig
}
StorageConfig will map the storage unit configuration
type TwoFactorConfig ¶
type TwoFactorConfig struct {
Issuer string
Digits int
BackoffTimeInSeconds uint64
MaxFailures int64
}
TwoFactorConfig will hold settings related to the two factor totp
type WebServerAntifloodConfig ¶
type WebServerAntifloodConfig struct {
SimultaneousRequests uint32
SameSourceRequests uint32
SameSourceResetIntervalInSec uint32
}
WebServerAntifloodConfig will hold the anti-flooding parameters for the web server