Implement a REST API to drive a UI for service management

Introduction

An implementation an API of the specification the drive a UI for engaging with services of an organization.

TODO

  • decompose into modules/files, handlers, util, routes
    • routes is so simple that it seems overkill
    • handlers are getting fat so maybe
  • cross cutting concerns are leading to code duplication, DRY
    • missing decorators, but can achieve same with wrapping functions inside functions, worry about readability and community conventions
  • Stuck on "merging" structs into a JSON, would like a meta block to help frontend dev and myself in development loop
  • CRUD
    • would like to at least implement "update"
      • with file based persistence locking is my responsiblity, see some approaches online but not confident
      • when to persist?
        • on every mutation? on server shutdown? Lean towards every mutation

Initial Thoughts (Historical)

  • Use built-in web server
  • Don't use another framework unless it gets messy
  • Persistence
    • use file system to start
    • SQLite is an option?
    • Leaning towards ReadOnly
  • API Design
    • REST
    • GET will get pretty far
    • CALLS
      • services_list
      • service_detail
        • needs versions
  • Search
    • start with simple such as prefix
    • Frontend may want to send ajax calls
    • Only name of of service? Should Description come into play? Could be a future improvement
  • Pagination
    • offsets
    • Funny that the designer indexes from 0, first time seeing that in my career.
  • Testing
    • Explore, there is a built-in for go
    • Use Insomnia to exercise API as part of development loop
  • VCS
    • Local git first, then upload to github
    • should this be private? .. checking for public repos with peoples attempts?
      • yes, some public but not specifically for this takehome

Optional

  • Full CRUD
    • lean to no, without DB (i.e. files) it's annoying, and not pleasant with DB
  • Tests
    • lean to yes
  • AuthN/AuthZ
    • at least make skeletons

API Responses

Thinking requests are GETs with path and query string driving.

{
    "services": [
        {
            "url": "https://example.com/a_Service",
            "versionCount": 1,
            "description": "a blah, blah, blah",
            "id": "1",
            "name": "a_Service"
        },
 
            "url": "https://example.com/b_Service", 
            "versionCount": 2, 
            "description": "b blah, blah, blah", 
            "id": "2", 
            "name": "b_Service"
        }, 
        {
            "url": "https://example.com/c_Service", 
            "versionCount": 3, 
            "description": "c blah, blah, blah", 
            "id": "3", 
            "name": "c_Service"
        }
    ]
}

Resources

The Spec

Similar Resources

Simple Bank is a simple REST API that allows users to perform transferences with each other.

Simple Bank is a simple REST API that allows users to perform transferences with each other. 🔧 Technologies Golang Docker PostgreSQ

Feb 15, 2022

Sample Go REST API implementation with DDD using Clean Architecture.

This layer is a part developed for client-side (mobile, web, etc.) applications to access our domain. It will forward the requests from this layer to the application layer and expose the response it receives from the application layer.

Jan 3, 2023

Simple vanilla Go CRUD application with mongoDB database with its mflix dataset that I use for my thesis about benchmarking REST API and GraphQL.

Go GraphQL Simple vanilla Go CRUD application with mongoDB database with its mflix dataset that I use for my thesis about benchmarking REST API and Gr

Oct 15, 2021

This product about make link to be short link with golang rest api

This project using golang with go fiber, firebase, and dependency injection

Oct 13, 2021

Instagram Backend HTTP REST API using GO Lang and Mongo DB

Instagram Backend HTTP REST API using GO Lang and Mongo DB Project for Appointy Summer Internship . Project built within 25 hrs, with no prior knowled

Oct 10, 2021

A Golang REST API to handle users and posts for a simple instagram backend. Uses MongoDB as the database. Tested using golang-testing and Postman.

A Golang REST API to handle users and posts for a simple instagram backend. Uses MongoDB as the database. Tested using golang-testing and Postman.

A Golang REST API to handle users and posts for a simple instagram backend. Uses MongoDB as the database. Tested using golang-testing and Postman.

Oct 10, 2021

A REST API with GET/POST Endpoints

Instagram-Backend-API(NO EXTRA DEPENDENCIES) Designed and Developed an HTTP JSON REST API mocking of instagram posts and users schema which capable of

Oct 10, 2021

REST API of Instagram's functionalities; developed using GO (and Mongo).

REST API of Instagram's functionalities; developed using GO (and Mongo).

Instagram-backend-api REST API of Instagram's functionalities; developed using GO (and Mongo). Constraints: Complete API has been developed using Go M

Oct 9, 2021

A fully-featured REST API developed in Golang for an online book store.

A fully-featured REST API developed in Golang for an online book store.

Oct 20, 2022
GinGoExample - Implement rest api using gin and go and mongodb

GinGoExample Implement rest api using gin and go and mongodb Optimizations using Singlton pattern to avoid repetetive commiunication with mongodb . Fe

Mar 25, 2022
Go (Golang) API REST with Gin FrameworkGo (Golang) API REST with Gin Framework

go-rest-api-aml-service Go (Golang) API REST with Gin Framework 1. Project Description Build REST APIs to support AML service with the support of exte

Nov 21, 2021
Api-go-gin-viper - Simple representaion on how to implement CRUD functionality in API using Go programming language

Simple API implementaion in Go To Get Started Clone repo Run the command to clon

Feb 18, 2022
Build a TodoList with Go Design and implement a backend RESTful service in golang with CRUD

May we ask Igor to do a little project in leu of sample code? If there is a hire, the hours spent should be invoiced, so please keep track of that. Th

May 5, 2022
Ecommerce-api - Rest api of e-commerce web application
Ecommerce-api - Rest api of e-commerce web application

E-commerce Rest API Swagger documentation to test api Domain diagram

Jan 2, 2023
Gin-boilerplate - This repository contains boilerplate code of a REST service using Gin (golang) framework.

Boilerplate REST service using Gin web framework (golang) Introduction This repository contains a boilerplate REST API service using Gin web framework

Apr 28, 2022
A simple database application that I was asked to implement as part of a job application process

This is a simple database application that I was asked to implement as part of a job application process. They told me I could choose any languages an

Nov 24, 2021
GoTrue is a small open-source API written in Golang, that can act as a self-standing API service for handling user registration and authentication for Jamstack projects.
GoTrue is a small open-source API written in Golang, that can act as a self-standing API service for handling user registration and authentication for Jamstack projects.

GoTrue is a small open-source API written in Golang, that can act as a self-standing API service for handling user registration and authentication for Jamstack projects.

Dec 13, 2021
A simple file-based service to stand in for the remote-service proxy on Apigee.

Apigee-Remote-Service-File A simple file-based service to stand in for the remote-service proxy on Apigee. All configuration is done locally in a YAML

Nov 3, 2021
REST API for RabbitMQ, Write with Google Go(lang).

RabbitMQ HTTP API REST HTTP API for RabbitMQ, it's not RabbitMQ Management Plugin. Status: Under active development. Required: * RabbitMQ (2.8+) * Go(

Aug 29, 2022