Documentation
¶
Index ¶
- func JSONResponse(t *testing.T, statusCode int, body any) http.HandlerFunc
- func RunTestCases(t *testing.T, testCases []TestCase)
- func ValidationResult(valid bool, daysLeft int) *model.ValidationResult
- type Fields
- type MockLogger
- func (m *MockLogger) Debug(args ...any)
- func (m *MockLogger) Debugf(format string, args ...any)
- func (m *MockLogger) Error(args ...any)
- func (m *MockLogger) Errorf(format string, args ...any)
- func (m *MockLogger) Fatal(args ...any)
- func (m *MockLogger) Fatalf(format string, args ...any)
- func (m *MockLogger) Info(args ...any)
- func (m *MockLogger) Infof(format string, args ...any)
- func (m *MockLogger) Warn(args ...any)
- func (m *MockLogger) Warnf(format string, args ...any)
- func (m *MockLogger) WithContext(ctx context.Context) *log.Logger
- func (m *MockLogger) WithError(err error) *log.Logger
- func (m *MockLogger) WithField(key string, value any) *log.Logger
- func (m *MockLogger) WithFields(fields Fields) *log.Logger
- type TestCase
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func JSONResponse ¶ added in v1.3.0
JSONResponse creates an HTTP handler that responds with the given status code and JSON body
func RunTestCases ¶
RunTestCases executes a list of test cases for license validation
func ValidationResult ¶ added in v1.3.0
func ValidationResult(valid bool, daysLeft int) *model.ValidationResult
ValidationResult creates a validation result for testing
Types ¶
type MockLogger ¶
MockLogger is a mock implementation of the log.Logger interface
func (*MockLogger) Debug ¶
func (m *MockLogger) Debug(args ...any)
Debug implements log.Logger interface
func (*MockLogger) Debugf ¶
func (m *MockLogger) Debugf(format string, args ...any)
Debugf implements log.Logger interface
func (*MockLogger) Error ¶
func (m *MockLogger) Error(args ...any)
Error implements log.Logger interface
func (*MockLogger) Errorf ¶
func (m *MockLogger) Errorf(format string, args ...any)
Errorf implements log.Logger interface
func (*MockLogger) Fatal ¶
func (m *MockLogger) Fatal(args ...any)
Fatal implements log.Logger interface
func (*MockLogger) Fatalf ¶
func (m *MockLogger) Fatalf(format string, args ...any)
Fatalf implements log.Logger interface
func (*MockLogger) Info ¶
func (m *MockLogger) Info(args ...any)
Info implements log.Logger interface
func (*MockLogger) Infof ¶
func (m *MockLogger) Infof(format string, args ...any)
Infof implements log.Logger interface
func (*MockLogger) Warn ¶
func (m *MockLogger) Warn(args ...any)
Warn implements log.Logger interface
func (*MockLogger) Warnf ¶
func (m *MockLogger) Warnf(format string, args ...any)
Warnf implements log.Logger interface
func (*MockLogger) WithContext ¶
func (m *MockLogger) WithContext(ctx context.Context) *log.Logger
WithContext implements log.Logger interface
func (*MockLogger) WithError ¶
func (m *MockLogger) WithError(err error) *log.Logger
WithError implements log.Logger interface
func (*MockLogger) WithField ¶
func (m *MockLogger) WithField(key string, value any) *log.Logger
WithField implements log.Logger interface
func (*MockLogger) WithFields ¶
func (m *MockLogger) WithFields(fields Fields) *log.Logger
WithFields implements log.Logger interface