config

package
v0.0.0-...-3674750 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrEnvUnset = errors.New("env var unset")
)

nolint

Functions

This section is empty.

Types

type AppConfig

type AppConfig interface {
	AppID() uuid.UUID
	RootDir() string
	ShutdownGracePeriod() time.Duration
	InsecureFastScrypt() bool
	EVMEnabled() bool
	EVMRPCEnabled() bool

	Validate() error
	ValidateDB() error
	LogConfiguration(log, warn LogfFn)
	SetLogLevel(lvl zapcore.Level) error
	SetLogSQL(logSQL bool)
	SetPasswords(keystore, vrf *string)

	AuditLogger() AuditLogger
	AutoPprof() AutoPprof
	Database() Database
	Feature() Feature
	Insecure() Insecure
	JobPipeline() JobPipeline
	Log() Log
	Password() Password
	Prometheus() Prometheus
	Pyroscope() Pyroscope
	Sentry() Sentry
	Threshold() Threshold
	WebServer() WebServer
	Tracing() Tracing
}

type AuditLogger

type AuditLogger interface {
	Enabled() bool
	ForwardToUrl() (models.URL, error)
	Environment() string
	JsonWrapperKey() string
	Headers() (models.ServiceHeaders, error)
}

type AutoPprof

type AutoPprof interface {
	BlockProfileRate() int
	CPUProfileRate() int
	Enabled() bool
	GatherDuration() models.Duration
	GatherTraceDuration() models.Duration
	GoroutineThreshold() int
	MaxProfileSize() utils.FileSize
	MemProfileRate() int
	MemThreshold() utils.FileSize
	MutexProfileFraction() int
	PollInterval() models.Duration
	ProfileRoot() string
}

type Backup

type Backup interface {
	Dir() string
	Frequency() time.Duration
	Mode() DatabaseBackupMode
	OnVersionUpgrade() bool
	URL() *url.URL
}

type Database

type Database interface {
	Backup() Backup
	Listener() Listener
	Lock() Lock

	DefaultIdleInTxSessionTimeout() time.Duration
	DefaultLockTimeout() time.Duration
	DefaultQueryTimeout() time.Duration
	Dialect() dialects.DialectName
	LogSQL() bool
	MaxIdleConns() int
	MaxOpenConns() int
	MigrateDatabase() bool
	URL() url.URL
}

type DatabaseBackupMode

type DatabaseBackupMode string
var (
	DatabaseBackupModeNone DatabaseBackupMode = "none"
	DatabaseBackupModeLite DatabaseBackupMode = "lite"
	DatabaseBackupModeFull DatabaseBackupMode = "full"
)

type Feature

type Feature interface {
	UICSAKeys() bool
	LogPoller() bool
}

type File

type File interface {
	Dir() string
	MaxSize() utils.FileSize
	MaxAgeDays() int64
	MaxBackups() int64
}

type Insecure

type Insecure interface {
	DevWebServer() bool
	DisableRateLimiting() bool
	InfiniteDepthQueries() bool
}

type JobPipeline

type JobPipeline interface {
	DefaultHTTPLimit() int64
	DefaultHTTPTimeout() models.Duration
	MaxRunDuration() time.Duration
	MaxSuccessfulRuns() uint64
	ReaperInterval() time.Duration
	ReaperThreshold() time.Duration
	ResultWriteQueueDepth() uint64
	ExternalInitiatorsEnabled() bool
}

type LDAP

type LDAP interface {
	ServerAddress() string
	ReadOnlyUserLogin() string
	ReadOnlyUserPass() string
	ServerTLS() bool
	SessionTimeout() models.Duration
	QueryTimeout() time.Duration
	BaseUserAttr() string
	BaseDN() string
	UsersDN() string
	GroupsDN() string
	ActiveAttribute() string
	ActiveAttributeAllowedValue() string
	AdminUserGroupCN() string
	EditUserGroupCN() string
	RunUserGroupCN() string
	ReadUserGroupCN() string
	UserApiTokenEnabled() bool
	UserAPITokenDuration() models.Duration
	UpstreamSyncInterval() models.Duration
	UpstreamSyncRateLimit() models.Duration
}

type Listener

type Listener interface {
	MaxReconnectDuration() time.Duration
	MinReconnectInterval() time.Duration
	FallbackPollInterval() time.Duration
}

type Lock

type Lock interface {
	LockingMode() string
	LeaseDuration() time.Duration
	LeaseRefreshInterval() time.Duration
}

type Log

type Log interface {
	DefaultLevel() zapcore.Level
	JSONConsole() bool
	Level() zapcore.Level
	UnixTimestamps() bool

	File() File
}

type LogfFn

type LogfFn func(string, ...any)

type MFA

type MFA interface {
	RPID() string
	RPOrigin() string
}

type Password

type Password interface {
	Keystore() string
	VRF() string
}

type Prometheus

type Prometheus interface {
	AuthToken() string
}

type Pyroscope

type Pyroscope interface {
	AuthToken() string
	ServerAddress() string
	Environment() string
}

type RateLimit

type RateLimit interface {
	Authenticated() int64
	AuthenticatedPeriod() time.Duration
	Unauthenticated() int64
	UnauthenticatedPeriod() time.Duration
}

type Sentry

type Sentry interface {
	DSN() string
	Debug() bool
	Environment() string
	Release() string
}

type TLS

type TLS interface {
	Dir() string
	Host() string
	ForceRedirect() bool
	CertFile() string
	KeyFile() string
	HTTPSPort() uint16
	ListenIP() net.IP
}

type Threshold

type Threshold interface {
	ThresholdKeyShare() string
}

type Tracing

type Tracing interface {
	Enabled() bool
	CollectorTarget() string
	NodeID() string
	SamplingRatio() float64
	TLSCertPath() string
	Mode() string
	Attributes() map[string]string
}

type WebServer

type WebServer interface {
	AuthenticationMethod() string
	AllowOrigins() string
	BridgeCacheTTL() time.Duration
	BridgeResponseURL() *url.URL
	HTTPMaxSize() int64
	StartTimeout() time.Duration
	HTTPWriteTimeout() time.Duration
	HTTPPort() uint16
	SessionReaperExpiration() models.Duration
	SecureCookies() bool
	SessionOptions() sessions.Options
	SessionTimeout() models.Duration
	ListenIP() net.IP

	TLS() TLS
	RateLimit() RateLimit
	MFA() MFA
	LDAP() LDAP
}

Directories

Path Synopsis
cmd/generate
Docs prints core node documentation and/or a list of errors.
Docs prints core node documentation and/or a list of errors.

Jump to

Keyboard shortcuts

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