config

package
v1.1.3 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2026 License: MIT Imports: 2 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

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

type ApiLoggingConfig struct {
	LoggingEnabled          bool
	ThresholdInMicroSeconds int
}

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

type GeneralConfig struct {
	Marshalizer string
	DBType      core.DBType
}

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

type GuardianConfig struct {
	MnemonicFile         string
	RequestTimeInSeconds int
}

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       common.CacheConfig
	MaxTTLInSec int64
}

NativeAuthServerConfig will hold settings related to the native auth server

type PubkeyConfig

type PubkeyConfig struct {
	Length int
	Type   string
	Hrp    string
}

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

type RouteConfig struct {
	Name             string
	Open             bool
	Auth             bool
	MaxContentLength uint64
}

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 common.CacheConfig
	DB    common.DBConfig
}

StorageConfig will map the storage unit configuration

type TwoFactorConfig

type TwoFactorConfig struct {
	Issuer                           string
	Digits                           int
	BackoffTimeInSeconds             uint64
	MaxFailures                      int64
	SecurityModeMaxFailures          int64
	SecurityModeBackoffTimeInSeconds uint64
}

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

Jump to

Keyboard shortcuts

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