verdure-admin

module
v0.0.0-...-2f3620b Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2024 License: MIT

README

Verdure Admin

The Verdure Admin application is the backend system to Administrate the Verdure application written in Rust. It is used to manage the vocabulary stored in a PostgreSQL relational database.

Building

To build the server:

go build -o server ./cmd/server

DB Connectivity

The following environment variables are required to connect to Postgres. The DB_LINK in conjunction with the aws cli to obtain db connection properties.

export DB_LINK="dev/aws/secret"

export REGION="us-east-1"

You can find docs here: AWS Secret Manager

GraphQL is used to access the system.
Generate

To generate updated models and resolvers:

go run github.com/99designs/gqlgen generate

Then rebuild the server

go build -v -o server ./cmd/server

To build everything:

go build -v ./...

To run tests:

go test -v ./...

To run Integration Tests

Add these tags to the top of each integration test:

//go:build integration // +build integration

Set the env var to find the .env.test

export ENV_TEST_PATH="/Users/dev/go/src/verdure-admin/.env.test"

Setup different db for your integration tests

export DB_LINK="test/aws/secret"

export REGION="us-east-1"

To Run integration tests

go test -tags=integration ./...

Directories

Path Synopsis
cmd
internal
convert
Package convert provides a collection of utility functions for converting between internal models and GraphQL types within a Go application.
Package convert provides a collection of utility functions for converting between internal models and GraphQL types within a Go application.
db
Package db defines interfaces and implementations for interacting with entities in the database.
Package db defines interfaces and implementations for interacting with entities in the database.
mdl
srv

Jump to

Keyboard shortcuts

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