sisito

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2017 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultConfig = "config.tml"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type BounceMail

type BounceMail struct {
	Id             int32
	Timestamp      time.Time
	Lhost          string
	Rhost          string
	Alias          string
	Listid         string
	Reason         string
	Action         string
	Subject        string
	Messageid      string
	Smtpagent      string
	Softbounce     uint8
	Smtpcommand    string
	Destination    string
	Senderdomain   string
	Feedbacktype   string
	Diagnosticcode string
	Deliverystatus string
	Timezoneoffset string
	Addresser      string
	Recipient      string
	Digest         string
	CreatedAt      time.Time `db:"created_at"`
	UpdatedAt      time.Time `db:"updated_at"`
	Whitelisted    uint8
}

type Config

type Config struct {
	Database DatabaseConfig
	User     []UserConfig
}

func LoadConfig

func LoadConfig(flags *Flags) (config *Config, err error)

type DatabaseConfig

type DatabaseConfig struct {
	Host     string
	Port     int64
	Database string
	Username string
	Password string
}

type Driver

type Driver struct {
	DbMap *gorp.DbMap
}

func NewDriver

func NewDriver(config *Config, debug bool) (driver *Driver, err error)

func (*Driver) BlacklistRecipients added in v0.1.6

func (driver *Driver) BlacklistRecipients(senderdomain string, reasons []string, softbounce *bool, limit uint64, offset uint64) (recipients []string, err error)

func (*Driver) Close

func (driver *Driver) Close()

func (*Driver) IsBounced added in v0.1.6

func (driver *Driver) IsBounced(name string, value string, senderdomain string) (bounced bool, err error)

func (*Driver) RecentlyBounced

func (driver *Driver) RecentlyBounced(name string, value string, senderdomain string) (bounced []BounceMail, err error)

type Flags

type Flags struct {
	Config string
}

func ParseFlag

func ParseFlag() (flags *Flags)

type Server

type Server struct {
	Engine *gin.Engine
	Router gin.IRouter
	Driver *Driver
}

func NewServer

func NewServer(config *Config, driver *Driver) (server *Server)

func (*Server) Blacklist added in v0.1.6

func (server *Server) Blacklist(c *gin.Context)

func (*Server) Bounced added in v0.1.6

func (server *Server) Bounced(c *gin.Context)

func (*Server) Ping added in v0.1.6

func (server *Server) Ping(c *gin.Context)

func (*Server) Recent added in v0.1.6

func (server *Server) Recent(c *gin.Context)

func (*Server) Run

func (server *Server) Run()

type UserConfig added in v0.1.6

type UserConfig struct {
	Userid   string
	Password string
}

Jump to

Keyboard shortcuts

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