Skip to content
Snippets Groups Projects
Commit cc47dfe3 authored by Andrej Rasevic's avatar Andrej Rasevic
Browse files

updating exercise3 and adding exercise4

parent ba5a2833
No related branches found
No related tags found
No related merge requests found
......@@ -14,7 +14,8 @@ Details:
1. You are given a go module: __exercise3__. You need to implement your application in 2 files. Inside of __main.go__ you need to implement the interface for your CLI. Your CLI should implement the following flags:
* request - Http verb (type) for your request. Only need to support GET, POST, PUT and DELETE)
* endpoint - The url of the endpoint you are trying to hit
* endpoint - The url of the endpoint you are trying to hit
* body - The body for a PUT or POST request
* logs - output the log of all of your session requests
* additionally your CLI should provide the user Usage information similar to the functionality in exercise 2
......
# Exercise 4:
## Due Date: Friday, January 21, 2022 11:59 PM
## Objectives: To get familiar with creating a restful service that handles basic authentication and implements simple authorization.
## Specifications/Requirements
In this exercise you will be creating a REST API in Go that will check for authentication and then if properly authenticated, check for the proper authorization when making requests to the endpoints the service provides. You have been provided a basic file layout structure but if you need to add more files for your design feel free to do so. You must use the __net/http__ package that is part of the standard Go library. You cannot use any third part Go packages.
Details:
1. You will be mocking a realtime database by storing the objects you will be creating, updating and deleting in a file named __database.json__.
To deliver your submission you will need to commit your changes locally and push to your repo on the university gitlab server.
__NOTE__: You should not commit any executables or binaries as a result of compiling and building your application.
package main
import (
"net/http"
"fmt"
"os"
"gitlab.cs.umd.edu/arasevic/cmsc398Bwinter2022-student/exercises/exercise3"
)
// Default file name
var log = "database.json"
\ No newline at end of file
package data
\ No newline at end of file
module gitlab.cs.umd.edu/arasevic/cmsc398Bwinter2022-student/exercises/exercise4
go 1.17
package handlers
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment