Documentation
¶
Index ¶
- Variables
- type MockSentry
- func (m *MockSentry) CaptureException(exception error) *sentry.EventID
- func (m *MockSentry) CaptureMessage(message string) *sentry.EventID
- func (m *MockSentry) Flush(timeout time.Duration) bool
- func (m *MockSentry) Init(options sentry.ClientOptions) error
- func (m *MockSentry) Recover() *sentry.EventID
- type SentryTracker
Constants ¶
This section is empty.
Variables ¶
We need these variables to be able to mock sentry.CaptureMessage and sentry.CaptureException in tests since package level functions cannot be mocked
Functions ¶
This section is empty.
Types ¶
type MockSentry ¶
MockSentry is a mock struct to capture function calls
func NewMockSentry ¶
func NewMockSentry(t *testing.T) *MockSentry
func (*MockSentry) CaptureException ¶
func (m *MockSentry) CaptureException(exception error) *sentry.EventID
func (*MockSentry) CaptureMessage ¶
func (m *MockSentry) CaptureMessage(message string) *sentry.EventID
func (*MockSentry) Init ¶
func (m *MockSentry) Init(options sentry.ClientOptions) error
func (*MockSentry) Recover ¶
func (m *MockSentry) Recover() *sentry.EventID
type SentryTracker ¶
type SentryTracker struct{}
func NewSentryTracker ¶
func NewSentryTracker(dsn string, env string, flushFreq int) (*SentryTracker, error)
func (*SentryTracker) CaptureException ¶
func (s *SentryTracker) CaptureException(exception error)
func (*SentryTracker) CaptureMessage ¶
func (s *SentryTracker) CaptureMessage(message string)
Click to show internal directories.
Click to hide internal directories.