sentry/config.go

21 lines
295 B
Go
Raw Permalink Normal View History

2022-12-15 04:39:25 +00:00
package sentry
import "errors"
type Config struct {
2022-12-15 07:18:01 +00:00
Dsn string
ServerName string
2022-12-15 04:39:25 +00:00
}
func (c Config) validate() error {
if c.Dsn == "" {
return errors.New("sentry DNS is required")
}
2022-12-15 07:18:01 +00:00
if c.ServerName == "" {
return errors.New("sentry SERVER_NAME is required")
2022-12-15 04:39:25 +00:00
}
return nil
}