Documentation
¶
Overview ¶
Package rspamdservice contains the mock Rspamd service
Index ¶
- func NewRspamdService() rspamdinterfaces.RspamdServiceInterface
- func NewRspamdServiceWithConfig(config *rspamdclient.Config) rspamdinterfaces.RspamdServiceInterface
- type MockRspamdService
- func (m *MockRspamdService) CheckMessage(req *rspamdclient.CheckRequest) (*rspamdclient.CheckResponse, error)
- func (m *MockRspamdService) DefaultConfig() *rspamdclient.Config
- func (m *MockRspamdService) NewClient(config *rspamdclient.Config) *rspamdclient.Client
- func (m *MockRspamdService) Ping() error
- type Wrapper
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewRspamdService ¶
func NewRspamdService() rspamdinterfaces.RspamdServiceInterface
NewRspamdService creates a new rspamd service wrapper
func NewRspamdServiceWithConfig ¶
func NewRspamdServiceWithConfig(config *rspamdclient.Config) rspamdinterfaces.RspamdServiceInterface
NewRspamdServiceWithConfig creates a new rspamd service wrapper with custom config
Types ¶
type MockRspamdService ¶
MockRspamdService provides a mock implementation of rspamd service
func (*MockRspamdService) CheckMessage ¶
func (m *MockRspamdService) CheckMessage(req *rspamdclient.CheckRequest) (*rspamdclient.CheckResponse, error)
CheckMessage sends a message to Rspamd for spam checking
func (*MockRspamdService) DefaultConfig ¶
func (m *MockRspamdService) DefaultConfig() *rspamdclient.Config
DefaultConfig returns default configuration with environment variable support
func (*MockRspamdService) NewClient ¶
func (m *MockRspamdService) NewClient(config *rspamdclient.Config) *rspamdclient.Client
NewClient creates a new Rspamd client with the given configuration
func (*MockRspamdService) Ping ¶
func (m *MockRspamdService) Ping() error
Ping sends a ping request to check if Rspamd is available
type Wrapper ¶
type Wrapper struct {
// contains filtered or unexported fields
}
Wrapper wraps the existing rspamd functionality
func (*Wrapper) CheckMessage ¶
func (r *Wrapper) CheckMessage(req *rspamdclient.CheckRequest) (*rspamdclient.CheckResponse, error)
CheckMessage sends a message to Rspamd for spam checking
func (*Wrapper) DefaultConfig ¶
func (r *Wrapper) DefaultConfig() *rspamdclient.Config
DefaultConfig returns default configuration with environment variable support
func (*Wrapper) NewClient ¶
func (r *Wrapper) NewClient(config *rspamdclient.Config) *rspamdclient.Client
NewClient creates a new Rspamd client with the given configuration
Directories
¶
| Path | Synopsis |
|---|---|
|
Package rspamdclient contains the Rspamd client models
|
Package rspamdclient contains the Rspamd client models |
|
Package rspamdinterfaces contains the interfaces for the Rspamd service
|
Package rspamdinterfaces contains the interfaces for the Rspamd service |