Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions env/env.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ var (
Emails *db.EmailsTable
// Labels is the global instance of LabelsTable
Labels *db.LabelsTable
// Attachments is the global instance of AttachmentsTable
Attachments *db.AttachmentsTable
// Factors contains all currently registered factors
Factors map[string]factor.Factor
// NATS is the encoded connection to the NATS queue
Expand Down
7 changes: 7 additions & 0 deletions setup/setup.go
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,13 @@ func PrepareMux(flags *env.Flags) *web.Mux {
Emails: env.Emails,
Cache: redis,
}
env.Attachments = &db.AttachmentsTable{
RethinkCRUD: db.NewCRUDTable(
rethinkSession,
rethinkOpts.Database,
"attachments",
),
}

// NATS queue connection
nc, err := nats.Connect(flags.NATSAddress)
Expand Down