Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/store files #23

Open
wants to merge 28 commits into
base: master
Choose a base branch
from
Open

Feature/store files #23

wants to merge 28 commits into from

Conversation

mrowdy
Copy link
Owner

@mrowdy mrowdy commented Aug 30, 2017

No description provided.

mrowdy and others added 25 commits June 17, 2017 08:06
we're waiting for google/jsonapi to implement nested structs or to accept this PR
google/jsonapi#99

We need nested structs for the upcoming mail endpoint
We have to format and parse addresses every time we store/read them from mysql. We could prevent this if we store them as json. Which is ugly.

A better way is to store the whole mail/attachment as document. The addresses in to,cc and bcc stay easily accessible that way
we store mail content inside the db for now
We should be able to use the same bootstrap (db, queue, etc.) for the api and the workers.
remove everything uneccessary from worker and mailer
we had some recent API changes
# Conflicts:
#	cmd/styx-api/main.go
#	cmd/styx-worker/main.go
#	mailer/mailer.go
#	resource/resource_mail.go
#	storage/mail.go
#	storage/mail_status.go
#	worker/worker.go
@mrowdy mrowdy requested review from fetzi and Munsio August 30, 2017 20:26
defer styx.Close()

aHandler := handler.Attachment{Validator: styx.Validator, Service: styx.AttachmentService}
uHandler := handler.Upload{Service: styx.AttachmentService}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ich finde das abkürzen echt kacke - des uHandler kann so viel heißen (User, Upload, Update...) bin ich da alleine?

r.Handle("/mails", mHandler).Methods("POST")
r.Handle("/mails/{id}", mHandler).Methods("GET")
http.Handle("/", r)
log.Fatal(http.ListenAndServe(":9999", nil))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wir haben ja ein config file da würd ich den Port auslesen

handler/mail.go Outdated
"github.com/Slemgrim/styx/model"
"github.com/Slemgrim/styx/service"
"github.com/Slemgrim/jsonapi"
//"github.com/gorilla/mux"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bitte löschen wenns nicht mehr gebraucht wird

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants