Categorygithub.com/nmarsollier/resourcesgo
modulepackage
0.0.0-20250103183539-7f34883247a6
Repository: https://github.com/nmarsollier/resourcesgo.git
Documentation: pkg.go.dev

# README

SemVer Resource Server

A microservice for i18n json resources, providing a semver strategy to store and retrieve them.

The idea is to store project json resource files by language, and provide a version for them, so clients could retrieve documents for the desired project and language plus using semver semantic to provide version compatibility (useful on mobile where app version is hard to ensure).

This gives the client apps a retro compatibility with the texts that are using in different versions, allowing developers change those strings in different app versions with the flexibility to change the text ids, remove or arr new text strings over time.

Architecture

Fully functional, no unwanted interfaces when there is no strategy pattern.

PostgreSQL

docker run -d --name ec-postgres -p 5432:5432 -e POSTGRES_HOST_AUTH_METHOD=trust postgres:13

To generate the database structure run the script DDL.sql.

DER

To setup the database just set the environment variable POSTGRES_URL.

Go 1.22+

Go golang.org

git clone https://github.com/nmarsollier/resourcesgo $GOPATH/src/github.com/nmarsollier/resourcesgo

Run

go install
resourcesgo

To see swagger docs navigate to Swagger

Required libraries

go install github.com/swaggo/gin-swagger/swaggerFiles
go install github.com/swaggo/gin-swagger
go install github.com/swaggo/swag/cmd/swag
go install github.com/99designs/[email protected]

Environment vars

SERVER_NAME : Server Name for logs (resourcesgo) POSTGRES_URL : Postgresql database (postgres://postgres@localhost:5432/postgres) PORT : Server port (3000) GQL_PORT : GraphQL Port (4000)

# Packages

Package docs Code generated by swaggo/swag.
No description provided by the author