1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, you can obtain one at https://mozilla.org/MPL/2.0/.

//! These are the developer docs
//! for the Firefox Accounts email-sending service.
//! For higher-level documentation,
//! see the [readme].
//!
//! The project is compiled as a library
//! that is linked against by
//! two separate binaries:
//!
//! * [`fxa_email_send`][send] runs a Rocket server
//!   exposing an endpoint that enables callers
//!   to send email.
//!
//! * [`fxa_email_queues`][queues] runs a process
//!   that loops infinitely,
//!   polling SQS queues for
//!   SES bounce, complaint and delivery notifications.
//!
//! [readme]: https://github.com/mozilla/fxa-email-service/blob/master/README.md#fxa_email_service
//! [send]: ../fxa_email_send/index.html
//! [queues]: ../fxa_email_queues/index.html

#![feature(decl_macro)]
#![feature(plugin)]
#![feature(try_from)]
#![feature(type_ascription)]
#![plugin(rocket_codegen)]

extern crate base64;
extern crate chrono;
extern crate config;
extern crate emailmessage;
#[macro_use]
extern crate failure;
extern crate futures;
extern crate hex;
extern crate hmac;
extern crate http;
extern crate hyperx;
#[macro_use]
extern crate lazy_static;
extern crate lettre;
extern crate lettre_email;
extern crate md5;
extern crate mozsvc_common;
extern crate rand;
extern crate redis;
extern crate regex;
extern crate reqwest;
extern crate rocket;
#[macro_use]
extern crate rocket_contrib;
extern crate roxmltree;
extern crate rusoto_core;
extern crate rusoto_credential;
extern crate rusoto_ses;
extern crate rusoto_sqs;
extern crate sendgrid;
extern crate sentry;
extern crate serde;
#[macro_use]
extern crate serde_derive;
extern crate serde_json;
extern crate serde_test;
extern crate sha2;
#[macro_use(
    slog_b,
    slog_error,
    slog_info,
    slog_kv,
    slog_log,
    slog_o,
    slog_record,
    slog_record_static
)]
extern crate slog;
extern crate slog_async;
extern crate slog_mozlog_json;
#[macro_use]
extern crate slog_scope;
extern crate slog_term;
extern crate socketlabs;
extern crate uuid;

pub mod api;
pub mod db;
pub mod logging;
pub mod providers;
pub mod queues;
pub mod settings;
pub mod types;