rspamdservice

package
v0.19.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 20, 2026 License: AGPL-3.0 Imports: 3 Imported by: 0

Documentation

Overview

Package rspamdservice contains the mock Rspamd service

Index

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

type MockRspamdService struct {
	mock.Mock
}

MockRspamdService provides a mock implementation of rspamd service

func (*MockRspamdService) CheckMessage

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

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

func (*Wrapper) Ping

func (r *Wrapper) Ping() error

Ping sends a ping request to check if Rspamd is available

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL