resourcesgo

command module
v0.0.0-...-7f34883 Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2025 License: GPL-3.0 Imports: 2 Imported by: 0

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/gqlgen@v0.17.56

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)

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
Package docs Code generated by swaggo/swag.
Package docs Code generated by swaggo/swag.
internal
tests

Jump to

Keyboard shortcuts

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