Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BaseConfig ¶
type BaseConfig struct {
Name string `env:"NAME" env-default:""`
Version string `env:"VERSION" env-default:""`
Verbosity string `env:"VERBOSITY" env-default:"INFO"`
FluentDLogging bool `env:"FLUENT_D_LOGGING" env-default:"false"`
Production bool `env:"PRODUCTION" env-default:"false"`
}
func (BaseConfig) GetLogger ¶
func (c BaseConfig) GetLogger() *logrus.Logger
type SentryConfig ¶
type SentryConfig struct {
Enabled bool `env:"SENTRY_ENABLED" env-default:"true"`
DSN string `env:"SENTRY_DSN" env-default:""`
EnableTrace bool `env:"SENTRY_ENABLE_TRACE" env-default:"true"`
SampleRate float64 `env:"SENTRY_SAMPLE_RATE" env-default:"1.0"` // Set to 1.0 to capture 100% of transactions
Repanic bool `env:"SENTRY_REPANIC" env-default:"true"`
Timeout time.Duration `env:"SENTRY_TIMEOUT" env-default:"2s"`
WaitForDelivery bool `env:"SENTRY_WAIT_FOR_DELIVERY" env-default:"false"`
}
func NewSentryConfig ¶
func NewSentryConfig() (SentryConfig, error)
func (SentryConfig) NewGinMiddleware ¶
func (sc SentryConfig) NewGinMiddleware() gin.HandlerFunc
func (SentryConfig) SentryEnabled ¶
func (sc SentryConfig) SentryEnabled() bool
func (SentryConfig) SetupSentry ¶
func (sc SentryConfig) SetupSentry(name, version, env string) error
Click to show internal directories.
Click to hide internal directories.