xyfin

command module
v0.0.0-...-e45acd6 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2024 License: MIT Imports: 20 Imported by: 0

README

Xyfin

Prerequisites

  • Docker
  • PostgreSQL
  • Go
  • migrate tool for database migrations
  • sqlc for Go code generation from SQL queries
  • Protocol Buffers (protoc) for gRPC

Setup

1. Network Setup

First, create a Docker network for the application:

make network
2. Database Setup

To set up the PostgreSQL database, run:

make postgres

After the database container is running, create the xyfin database:

make createdb

You can drop the database using:

make dropdb
3. Running the Server

To start the Xyfin server, use:

make server
4. Database Migrations

To apply all database migrations, run:

make migrateup

To apply a single migration, use:

make migrateup1

To rollback all migrations:

make migratedown

To rollback a single migration:

make migratedown1
5. Code Generation

Generate Go code from SQL queries using:

make sqlc
6. Protocol Buffers and gRPC

To regenerate Protocol Buffers and gRPC code:

make proto
7. Testing

Run the test suite with:

make test
8. Mock Generation

Generate mock implementations for testing:

make mock
9. Additional Services

Start a Redis container:

make redis

Start Command

To start the Xyfin server with the necessary database connection, use the following command:

make run

This command starts the previously created Docker container for PostgreSQL and runs the Xyfin application.

Documentation

To build database documentation:

make db_docs

To generate a SQL schema from the DBML:

make db_schema

Development Tools

  • Evans CLI: gRPC CLI client for testing your gRPC services.
make evans

Contributing

  1. Fork the repository.
  2. Create a feature branch.
  3. Commit your changes.
  4. Push to your branch.
  5. Create a new Pull Request.

License

Xyfin is licensed under the MIT License. See LICENSE for more information.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
db
mock
Package mockdb is a generated GoMock package.
Package mockdb is a generated GoMock package.
Package pb is a reverse proxy.
Package pb is a reverse proxy.
mock
Package mockwk is a generated GoMock package.
Package mockwk is a generated GoMock package.

Jump to

Keyboard shortcuts

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