api

module
v0.0.0-...-09aa624 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2022 License: Apache-2.0

README

ZDV API

The new ZDV Monolithic API.

Introduction

This monolithic API is meant to break apart the previous Laravel web application into a backend and frontend. This backend will provide data to the frontend as well as other web components in the future, ie: IDS.

This API is designed to be run in Kubernetes with a few helper tools. Ideally, we would be using Vault to feed Redis and Database credentials, and external secrets for other information, however, for our purpose this is not necessary so we will be using normal secrets. These secrets can be replaced with External Secrets, Sealed Secrets, etc. in the future or if necessary.

The API follows standard RESTful API designs. The API documentation is accessible through root, and the methods are standard:

  • GET
  • POST (create)
  • PUT (replace)
  • PATCH (update)
  • DELETE

Tests

Tests are a good thing and should be written were practical. To run tests:

make test

An example of a test can be found in pkg/database/dto/user_test.go. Use either the built-in testing framework or stretchr/testify.

Directories

Path Synopsis
cmd
api
Package docs GENERATED BY SWAG; DO NOT EDIT This file was generated by swaggo/swag
Package docs GENERATED BY SWAG; DO NOT EDIT This file was generated by swaggo/swag
internal
pkg

Jump to

Keyboard shortcuts

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