diff --git a/app/inbucket/datastore.go b/datastore.go
similarity index 100%
rename from app/inbucket/datastore.go
rename to datastore.go
diff --git a/app/inbucket/mime.go b/mime.go
similarity index 100%
rename from app/inbucket/mime.go
rename to mime.go
diff --git a/app/inbucket/mime_test.go b/mime_test.go
similarity index 100%
rename from app/inbucket/mime_test.go
rename to mime_test.go
diff --git a/app/smtpd/handler.go b/smtpd/handler.go
similarity index 100%
rename from app/smtpd/handler.go
rename to smtpd/handler.go
diff --git a/app/smtpd/listener.go b/smtpd/listener.go
similarity index 100%
rename from app/smtpd/listener.go
rename to smtpd/listener.go
diff --git a/public/images/favicon.png b/themes/integral/public/images/favicon.png
similarity index 100%
rename from public/images/favicon.png
rename to themes/integral/public/images/favicon.png
diff --git a/public/images/img01.gif b/themes/integral/public/images/img01.gif
similarity index 100%
rename from public/images/img01.gif
rename to themes/integral/public/images/img01.gif
diff --git a/public/images/img02.gif b/themes/integral/public/images/img02.gif
similarity index 100%
rename from public/images/img02.gif
rename to themes/integral/public/images/img02.gif
diff --git a/public/images/img03.gif b/themes/integral/public/images/img03.gif
similarity index 100%
rename from public/images/img03.gif
rename to themes/integral/public/images/img03.gif
diff --git a/public/images/img04.gif b/themes/integral/public/images/img04.gif
similarity index 100%
rename from public/images/img04.gif
rename to themes/integral/public/images/img04.gif
diff --git a/public/images/img05.gif b/themes/integral/public/images/img05.gif
similarity index 100%
rename from public/images/img05.gif
rename to themes/integral/public/images/img05.gif
diff --git a/public/images/img06.gif b/themes/integral/public/images/img06.gif
similarity index 100%
rename from public/images/img06.gif
rename to themes/integral/public/images/img06.gif
diff --git a/public/images/img07.gif b/themes/integral/public/images/img07.gif
similarity index 100%
rename from public/images/img07.gif
rename to themes/integral/public/images/img07.gif
diff --git a/public/images/img08.gif b/themes/integral/public/images/img08.gif
similarity index 100%
rename from public/images/img08.gif
rename to themes/integral/public/images/img08.gif
diff --git a/public/images/img09.gif b/themes/integral/public/images/img09.gif
similarity index 100%
rename from public/images/img09.gif
rename to themes/integral/public/images/img09.gif
diff --git a/public/images/img10.jpg b/themes/integral/public/images/img10.jpg
similarity index 100%
rename from public/images/img10.jpg
rename to themes/integral/public/images/img10.jpg
diff --git a/public/images/img11.gif b/themes/integral/public/images/img11.gif
similarity index 100%
rename from public/images/img11.gif
rename to themes/integral/public/images/img11.gif
diff --git a/public/js/jquery-1.5.2.min.js b/themes/integral/public/jquery-1.5.2.min.js
similarity index 100%
rename from public/js/jquery-1.5.2.min.js
rename to themes/integral/public/jquery-1.5.2.min.js
diff --git a/public/stylesheets/main.css b/themes/integral/public/main.css
similarity index 100%
rename from public/stylesheets/main.css
rename to themes/integral/public/main.css
diff --git a/app/views/Application/Index.html b/themes/integral/templates/Application/Index.html
similarity index 100%
rename from app/views/Application/Index.html
rename to themes/integral/templates/Application/Index.html
diff --git a/app/views/Mailbox/Html.html b/themes/integral/templates/Mailbox/Html.html
similarity index 100%
rename from app/views/Mailbox/Html.html
rename to themes/integral/templates/Mailbox/Html.html
diff --git a/app/views/Mailbox/Index.html b/themes/integral/templates/Mailbox/Index.html
similarity index 100%
rename from app/views/Mailbox/Index.html
rename to themes/integral/templates/Mailbox/Index.html
diff --git a/app/views/Mailbox/List.html b/themes/integral/templates/Mailbox/List.html
similarity index 100%
rename from app/views/Mailbox/List.html
rename to themes/integral/templates/Mailbox/List.html
diff --git a/app/views/Mailbox/Show.html b/themes/integral/templates/Mailbox/Show.html
similarity index 100%
rename from app/views/Mailbox/Show.html
rename to themes/integral/templates/Mailbox/Show.html
diff --git a/app/views/errors.html b/themes/integral/templates/errors.html
similarity index 100%
rename from app/views/errors.html
rename to themes/integral/templates/errors.html
diff --git a/app/views/errors/404.html b/themes/integral/templates/errors/404.html
similarity index 100%
rename from app/views/errors/404.html
rename to themes/integral/templates/errors/404.html
diff --git a/app/views/errors/500.html b/themes/integral/templates/errors/500.html
similarity index 100%
rename from app/views/errors/500.html
rename to themes/integral/templates/errors/500.html
diff --git a/app/views/footer.html b/themes/integral/templates/footer.html
similarity index 100%
rename from app/views/footer.html
rename to themes/integral/templates/footer.html
diff --git a/app/views/header.html b/themes/integral/templates/header.html
similarity index 100%
rename from app/views/header.html
rename to themes/integral/templates/header.html
diff --git a/app/views/menu.html b/themes/integral/templates/menu.html
similarity index 100%
rename from app/views/menu.html
rename to themes/integral/templates/menu.html
diff --git a/app/inbucket/utils.go b/utils.go
similarity index 61%
rename from app/inbucket/utils.go
rename to utils.go
index 85047a0..bf7ab0c 100644
--- a/app/inbucket/utils.go
+++ b/utils.go
@@ -1,30 +1,30 @@
package inbucket
import (
- "crypto/sha1"
- "fmt"
- "html"
- "io"
- "strings"
+ "crypto/sha1"
+ "fmt"
+ "html"
+ "io"
+ "strings"
)
// Take "user+ext@host.com" and return "user", aka the mailbox we'll store it in
func ParseMailboxName(emailAddress string) (result string) {
- result = strings.ToLower(emailAddress)
- if idx := strings.Index(result, "@"); idx > -1 {
- result = result[0:idx]
- }
- if idx := strings.Index(result, "+"); idx > -1 {
- result = result[0:idx]
- }
- return result
+ result = strings.ToLower(emailAddress)
+ if idx := strings.Index(result, "@"); idx > -1 {
+ result = result[0:idx]
+ }
+ if idx := strings.Index(result, "+"); idx > -1 {
+ result = result[0:idx]
+ }
+ return result
}
// Take a mailbox name and hash it into the directory we'll store it in
func HashMailboxName(mailbox string) string {
- h := sha1.New()
- io.WriteString(h, mailbox)
- return fmt.Sprintf("%x", h.Sum(nil))
+ h := sha1.New()
+ io.WriteString(h, mailbox)
+ return fmt.Sprintf("%x", h.Sum(nil))
}
// TextToHtml takes plain text, escapes it and tries to pretty it up for
@@ -34,4 +34,3 @@ func TextToHtml(text string) string {
replacer := strings.NewReplacer("\r\n", "
\n", "\r", "
\n", "\n", "
\n")
return replacer.Replace(text)
}
-
diff --git a/app/inbucket/utils_test.go b/utils_test.go
similarity index 99%
rename from app/inbucket/utils_test.go
rename to utils_test.go
index 0d6f9f3..92a2035 100644
--- a/app/inbucket/utils_test.go
+++ b/utils_test.go
@@ -41,4 +41,3 @@ func TestTextToHtml(t *testing.T) {
assert.Equal(t, TextToHtml("line\r\nbreak"), "line
\nbreak")
assert.Equal(t, TextToHtml("line\rbreak"), "line
\nbreak")
}
-
diff --git a/app/controllers/app.go b/web/app.go
similarity index 100%
rename from app/controllers/app.go
rename to web/app.go
diff --git a/app/controllers/helpers.go b/web/helpers.go
similarity index 100%
rename from app/controllers/helpers.go
rename to web/helpers.go
diff --git a/app/controllers/mailbox.go b/web/mailbox.go
similarity index 100%
rename from app/controllers/mailbox.go
rename to web/mailbox.go