config

package
v1.0.12-tmp Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2024 License: MIT Imports: 2 Imported by: 0

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 storageUnit.CacheConfig
}

NativeAuthServerConfig will hold settings related to the native auth server

type PubkeyConfig

type PubkeyConfig struct {
	Length int
	Type   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
}

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

Jump to

Keyboard shortcuts

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