event-scheduler

command module
v0.0.0-...-7cfe8d5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 3, 2025 License: MIT Imports: 14 Imported by: 0

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

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL