Documentation ¶
Overview ¶
Mailgun client in Go.
Logger interface for sendcloud
Index ¶
- Constants
- Variables
- type Bounce
- type Client
- func (c *Client) AddListMember(list string, m ListMember) (message string, err error)
- func (c *Client) Bounces(domain string, limit, skip int) (total int, res []Bounce, err error)
- func (c *Client) Complaints(domain string, limit, skip int) (total int, res []Complaint, err error)
- func (c *Client) Create(r *Route) (routeId string, err error)
- func (c *Client) Delete(r *Route) (err error)
- func (c *Client) Get(routeId string) (r Route, err error)
- func (c *Client) GetListMember(list string, email string) (member ListMember, err error)
- func (c *Client) Logs(domain string, limit, skip int) (total int, res []Log, err error)
- func (c *Client) Routes(limit, skip int) (total int, res []Route, err error)
- func (c *Client) Send(m Mail) (msgId string, err error)
- func (c *Client) SetLogger(l ErrorLogger)
- func (c *Client) Stats(domain string, limit, skip int, events []string, startDate time.Time) (total int, res []Stat, err error)
- func (c *Client) Update(r *Route) (routeId string, err error)
- func (c *Client) UpdateListMember(list string, m ListMember) (message string, err error)
- type Complaint
- type ErrorLogger
- type Event
- type FmtErrorLogger
- type ListMember
- type ListMemberResponse
- type Log
- type Mail
- type Route
- type Stat
- type Webhook
Constants ¶
View Source
const ( API_VERSION = 2 API_ENDPOINT = "api.mailgun.net" HTTP_TIMEOUT = 10 * time.Second )
View Source
const MAX_FORM_SIZE = 2 * 1024 * 1024
Variables ¶
View Source
var ( ErrMethodNotAllowed = fmt.Errorf("method not allowed") ErrBadSignature = fmt.Errorf("bad signature") ErrInvalidTimestamp = fmt.Errorf("invalid timestamp") ErrInvalidForm = fmt.Errorf("invalid form data") )
View Source
var EMAIL_DOMAIN_RE = regexp.MustCompile(`[^<>]+<?.+@([^<>]+)>?`)
Functions ¶
This section is empty.
Types ¶
type Bounce ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) AddListMember ¶
func (c *Client) AddListMember(list string, m ListMember) (message string, err error)
func (*Client) Complaints ¶
func (*Client) GetListMember ¶
func (c *Client) GetListMember(list string, email string) (member ListMember, err error)
func (*Client) SetLogger ¶
func (c *Client) SetLogger(l ErrorLogger)
func (*Client) UpdateListMember ¶
func (c *Client) UpdateListMember(list string, m ListMember) (message string, err error)
type Complaint ¶
type ErrorLogger ¶
type FmtErrorLogger ¶
type FmtErrorLogger struct { }
type ListMember ¶
type ListMemberResponse ¶
type ListMemberResponse struct { Member ListMember `json:member` Message string `json:message` }
type Log ¶
type Stat ¶
Click to show internal directories.
Click to hide internal directories.