Categorygithub.com/ClemSau/golang-weproov-test
modulepackage
0.0.0-20210129183835-a4ce45f7288c
Repository: https://github.com/clemsau/golang-weproov-test.git
Documentation: pkg.go.dev

# README

Golang Weproov Test

This repository is my work for the 4 hours technical test from Weproov

Work acomplised

  • Creation of the Models
  • Usage of the .env file to store secrets
  • Usage of the gorm library to initiate a connexion to the psql db
  • Creation of the CRUD endpoints and routes for the models

Missing features

  • Filtered search (by text & by date)
  • Unit testing

# Functions

CheckError stop the program if an error is detected.
CreateArticle create an article with the given arguments.
CreateAuthor create an author with the given arguments.
DeleteArticle delete an article by id.
DeleteAuthor delete an author by id.
GetArticle return an article by id.
GetArticles return the list of all the articles.
GetAuthor return an author by id.
GetAuthors return the list of all the authors.
OpenDb open the connexion to the psql database.
UpdateArticle update a given article.
UpdateAuthor update a given author.

# Structs

Article
Article is a blog article.
Author is a author of blog articles.