appointy-go-api

command module
v0.0.0-...-89a5ec4 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2020 License: MIT Imports: 13 Imported by: 0

README

appointy-go-api

  1. Run the main.go file
  2. This is an API developed in GO with MongoDB.
  3. This API schedules a meeting given id,title,participants and other details, it has been implemented by using a POST method of net/http library of GO lang.
  4. One can get the meeting details by providing the meeting ID.
  5. It can also return the list of meetings arranged within a given time range.
  6. Finally it can return all the meetings in which a particular participant is present.

Dependencies

  • "strconv"
  • "fmt"
  • "sync"
  • "log"
  • "os"
  • "net/http"
  • "time"
  • "strings"
  • "context"
  • "encoding/json"
  • "go.mongodb.org/mongo-driver/mongo"
  • "go.mongodb.org/mongo-driver/mongo/options"
  • "go.mongodb.org/mongo-driver/bson"

Constraints Satisfaction

  • Meetings for a particular participant should not be overlapped. Here it is achived using the functions checkValidity and checkParticipantAvailability.
  • This API is thread-safe so there is not any chance of arriving at a RACE CONDITION. It is implemented here by using sync.lock
  • Use API Pagination- This has been implemented by taking limit in GET request URL and implementing the logic in the function handler.
  • Unit Testing

Outputs

All output screenshots are available in the output folder.

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

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