ssot-specs-server

module
v0.0.0-...-0f704e8 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2024 License: MIT

README

SSOT specs server

An API for ssot-specs-collector clients to send specifications to, and for the ssot-specs-dashboard to fetch and view the specifications from.

For the related API client and OpenAPI documentation, see ssot-specs-api-client.

[!NOTE] This project is part of a suite of projects that work together. For all other related projects, see this search query: owner:2zqa topic:ssot

Getting started

Prerequisites
  • Go (tested with go version go1.20.3 linux/amd64)
  • PostgreSQL (tested with psql (PostgreSQL) 14.7 (Ubuntu 14.7-0ubuntu0.22.04.1))
Setup locally
  1. Install and setup postgres: https://www.postgresql.org/docs/current/tutorial-start.html. You need to create a database named ssotdb with a user named ssot. You may provide a password yourself.
  2. Create a GitLab application with the openid scope and a redirect to http://localhost:3000/callback. Ensure "Confidential" is unchecked. You can create the application on https://<yourgitlabdomain>/-/profile/applications
  3. Copy the .env.example file to .env and fill in the values. The API key can be anything, and the DSN is in the following format: postgres://<username>:<password>@<host>:<port>/<database>. For example: postgres://ssot:password@localhost/ssotdb
Installation and running
  1. Clone and enter the repository: git clone https://github.com/2zqa/ssot-specs-server.git && cd ssot-specs-server
  2. Run go install ./cmd/api
  3. Run api

License

SSOT specifications server is licensed under the MIT license.

Acknowledgements

  • Voys for facilitating the internship where this project was developed
  • Alex Edwards for providing an excellent resource on building an API with Go, Let's Go Further!, upon which this project is based

Directories

Path Synopsis
cmd
api command
functions use the app struct even though it's not used in the function
functions use the app struct even though it's not used in the function
internal

Jump to

Keyboard shortcuts

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