command
module
Version:
v0.0.0-...-7cfe8d5
Opens a new window with list of versions in this module.
Published: Jan 3, 2025
License: MIT
Opens a new window with license information.
Imports: 14
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
README
¶
event-scheduler
A RESTful API in Golang for suggesting time slots for events. The API allows users to
Table of Contents
Features
- Supports creating, reading, updating, and deleting events
- Supports creating, reading, updating, and deleting preferred time slots by each user.
- Endpoint that shows the possible time slots for the event.
Assumptions
- Every user is invited to the event
- Suggested time is shown only for users that have provided their preferred time slots
- Event durattion currently supports only time in hours(integer)
Technologies Used
- go
- postgreSQL: SQL engine
- gin framework: HTTP server
- sqlc: Generating go code for the sql queries
- make: Important commands documentation
- migrate: Database setup/migration utility
- docker: Containerization
- openAPI/Swagger: API documentation
- oapi-codegen: Generating go code from the api specification
Installation
1. Clone the repository:
git clone https://github.com/laus19/event-scheduler.git
cd event-scheduler
2. Start the server:
docker compose up --build
3. Shut down the server:
docker compose down
Usage
After starting the server, access the API at http://localhost:8080.
Read more about API usage here.
Running tests
Tests are automatically run using github actions on pushed directly to main branch pull request is created on main branch
Running tests in local
# Run test
make test
Future Work
- If an event is scheduled, then remove users available time from that slot.
- Add unit tests to increase coverage
- Consider creating indices and connection pool for database
- Add API verisoning eg /v1/
Documentation
¶
There is no documentation for this package.
Source Files
¶
Directories
¶
Package api provides primitives to interact with the openapi HTTP API.
|
Package api provides primitives to interact with the openapi HTTP API. |
db
|
|
mock
Package mockdb is a generated GoMock package.
|
Package mockdb is a generated GoMock package. |
|
|
|
|
|
|
Click to show internal directories.
Click to hide internal directories.