Zeus
Yet another meeting scheduler!
Features
- Make new meetings with participants
- Get meeting details from ID
- Get all meetings of a particular participant
- Get all meetings within a stipulated timeframe
- Clean Architecture
- Not including meetings which clash for a participant
- Race condition free(Test from golang's default tool)
- Unit tests
- Pagination(with the get all meetings of a participant)
Instructions to run
-
Pre-requisites:
-
Installation:
git clone https://github.com/feniljain/zeus.git
cd zeus
go get
go run api/main.go
Instructions to test
go test api/endpoints_test.go
Architecture
-
Insipration from: https://medium.com/gdg-vit/clean-architecture-the-right-way-d83b81ecac6
-
This project is built in Clean Architecture, it contains of two main modules(not packages), i.e. api and pkg.
-
Service acts as usecase layer
-
Repo as Repository layer
-
Impl as implementation layer
-
api contains all the necessary route handlings and backend supporting services(i.e. receiving requests and forwarding to proper handlers), it also initializes everything and does the important step of dependecy injection, it contains packages:
- main: cotnains main.go and testing file.
- views: contains response wrapper
- handlers: contains all the necessaey handlers and linking with services, which in turn response using views.
-
pkg contains the business logic divided into couple of packages
- pkg: contains centralized errors.go file defining all the necessary errors which will thrown from backend and pkg
- meeting: contains all the neccessary files for meeting business logic
- participant: contains all the neccessary files for participant business logic
- entities: necessary middle man structs for holding participants and meetings data from db and so forth
Routes
{
"title": "sefdkf",
"starttime": "2009-01-02 15:04:05",
"endtime": "2009-01-02 15:34:05",
"participants": [
{
"name": "someone",
"email": "someone@gmail.com",
"rsvp": "Yes"
},
{
"name": "someone1",
"email": "someone1@gmail.com",
"rsvp": "No"
}
]
}
-
Get meeting details from ID
Route: /meetings/:id
Method: GET
-
Get all meetings of a particular participant
Route:
- /meetings?participant=sw
- /meetings?participant=sw&page=1
Method: GET
-
Get all meetings within a stipulated timeframe
Route: /meetings?start=2005-01-02 15:04:05&end=2007-01-02 15:34:05
Method: GET
Contributors
Made with :heart: by Fenil Jain