alexedwards / scs

HTTP Session Management for Go
MIT License
2.13k stars 166 forks source link

Implement session store based on MongoDB #107

Closed cgossain closed 3 years ago

cgossain commented 3 years ago

Uses the official MongoDB driver for Go. https://github.com/mongodb/mongo-go-driver

I used the other stores as a reference.

alexedwards commented 3 years ago

Hi,

This looks really good, thank you. Would it be possible to add tests and a README, similar to the other store packages?

Alex

cgossain commented 3 years ago

Hey Alex, absolutely. I’ll take a look at that a little later.

Christian

cgossain commented 3 years ago

Hey @alexedwards, I added tests and a README.

All tests passed successfully on my machine. I tested using mongodb-community.

Please have a look and let me know if there are any other changes needed.

Thanks,

Christian

cgossain commented 3 years ago

@alexedwards Hey Alex, just a friendly reminder I've added the tests and README as requested. Let me know if there's anything else missing for the merge.

Christian

alexedwards commented 3 years ago

@cgossain Sorry, I hadn't forgotten, I'm just very pushed for time at the moment.

I've had a quick look and have run into the following things:

$ cd mongodbstore
$ go mod init github.com/alexedwards/scs/mongodbstore
$ go mod tidy

If you can send another commit addressing those things, then I'll test it out again :+1:

cgossain commented 3 years ago

@alexedwards great catches!

I've pushed some additional commits addressing your points above.

Thanks for reviewing.

alexedwards commented 3 years ago

Thanks very much! I'll try to get this merged in the next couple of days.

alexedwards commented 3 years ago

I've just merged this now, thanks again for your time and effort to get it completed :+1: