file

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Data

type Data struct {
	Connections uint `json:"connections"`
	Good        uint `json:"good"`
	Bad         uint `json:"bad"`
}

Data used to pack IP address history in file

type Storage

type Storage struct {
	Directory string
}

Storage saves IP address history into files

func (*Storage) Close

func (f *Storage) Close() error

Close closes

func (*Storage) Get

func (f *Storage) Get(transaction *msmtpd.Transaction) (int, error)

Get gets karma score for transaction IP address

func (*Storage) Ping

func (f *Storage) Ping(ctx context.Context) error

Ping pretends it does anything useful

func (*Storage) SaveBad

func (f *Storage) SaveBad(transaction *msmtpd.Transaction) (err error)

SaveBad saves transaction remote address history as bad memory

func (*Storage) SaveGood

func (f *Storage) SaveGood(transaction *msmtpd.Transaction) (err error)

SaveGood saves transaction remote address history as good memory

Jump to

Keyboard shortcuts

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