{"id":15014310,"url":"https://github.com/ahasannn/book-server-api","last_synced_at":"2026-03-17T23:02:02.566Z","repository":{"id":62867278,"uuid":"561243635","full_name":"Ahasannn/book-server-api","owner":"Ahasannn","description":"It is a RESTful book server api implemented in Go to handle list of books.","archived":false,"fork":false,"pushed_at":"2022-11-13T11:33:22.000Z","size":5736,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-13T00:17:22.193Z","etag":null,"topics":["api","basic-authentication","crud-operation","golang","gorilla-mux","json","jwt-authentication","postman","rest"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Ahasannn.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-11-03T09:15:50.000Z","updated_at":"2024-05-16T05:44:34.000Z","dependencies_parsed_at":"2023-01-21T15:17:28.867Z","dependency_job_id":null,"html_url":"https://github.com/Ahasannn/book-server-api","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Ahasannn/book-server-api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ahasannn%2Fbook-server-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ahasannn%2Fbook-server-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ahasannn%2Fbook-server-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ahasannn%2Fbook-server-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Ahasannn","download_url":"https://codeload.github.com/Ahasannn/book-server-api/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ahasannn%2Fbook-server-api/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30635026,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-17T22:38:22.569Z","status":"ssl_error","status_checked_at":"2026-03-17T22:38:11.804Z","response_time":56,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","basic-authentication","crud-operation","golang","gorilla-mux","json","jwt-authentication","postman","rest"],"created_at":"2024-09-24T19:45:27.142Z","updated_at":"2026-03-17T23:02:02.538Z","avatar_url":"https://github.com/Ahasannn.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Book Sever\n\nIt is a RESTful API using [Go](https://github.com/golang), [gorilla/mux](https://github.com/gorilla/mux), [Basic Authentication](https://learningprogramming.net/golang/golang-restful-web-api/basic-authentication-in-golang-restful-web-api/), [JWT Authentication](https://github.com/dgrijalva/jwt-go).\n\n\u003chr/\u003e\n\n## Brief Description\n\n\u003cp\u003eI have built a fully-fledged REST API with Go that exposes GET, POST, DELETE and PUT endpoints which allows to perform the full range of CRUD operations. A handler function accepts http response and request in json format. Then, the request is decoded and written to response according to the called function. This handler function is wrapped by the authentication middleware to perform the security check.\u003c/p\u003e\n\n\u003chr/\u003e\n\n## API Endpoints \n\n| URL      | Function    | Method | Description | Authentication Type\n| -----------   | ----------- | ------ | ----------- |---------- \n| https://localhost:8000/api/login    | Login      |     POST   |  Return JWT token in response for successful authentication | Basic\n| https://localhost:8000/api/getBooks | getBooks   |   GET     | Returns the details of all the books | JWT\n| https://localhost:8000/api/getBook/{id} | getBook | GET  |  Returns the details of the book with the valid requested book id | JWT\n| https://localhost:8000/api/createBook | createBook | POST | Creates a new book | JWT\n| https://localhost:8000/api/updateBooks/{id} | updateBooks | PUT | Updates the details of the requested book id | JWT\n| https://localhost:8000/api/deleteBooks/{id} | deleteBooks | DELETE | Deletes the book specified by id | JWT\n\n\u003chr/\u003e\n\n## Authentication Method\n\n- Basic Authentication\n- JWT Authentication\n\n\u003chr/\u003e\n\n## Data Models\n\n    type Book struct {\n        ID     string  `json:\"id\"`\n        Isbn   string  `json:\"isbn\"`\n        Title  string  `json:\"title\"`\n        Author *Author `json:\"author\"`\n    }\n\n    type Author struct {\n        Firstname string `json:\"firstname\"`\n        Lastname  string `json:\"lastname\"`\n    }\n    \n\u003chr/\u003e\n\n## Installation \n* go install github.com/Ahasannn/book-server-api@b687963\n\n\u003chr/\u003e\n\nSet Environment variables for Basic Authentication.\n\n    export username=Ahasan \n    export password=ak4747\n\n\u003chr/\u003e\n\nTesting the API endpoints\n\n* Primary api endpoints can be tested with [Postman](https://www.postman.com/)\n\n\u003chr/\u003e\n\nServer Run \n\n    go build -o bin/book-server-api .\n    ./bin/book-server\n\n\u003chr/\u003e\n\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fahasannn%2Fbook-server-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fahasannn%2Fbook-server-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fahasannn%2Fbook-server-api/lists"}