jungle-challenge

command module
v0.0.0-...-5a18fd7 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2024 License: MIT Imports: 9 Imported by: 0

README

Jungle Challenge

Configuration

To start, change the files config.yaml to match your environment settings, such as database

Database initialization

To popuplate the database, go to the migrations folder. Run the following command:

go run . init <DATA_FILE_PATH>

There are other options available, such as: go run . migrate up -> Runs all migrations go run . migrate down -> Rollback all migrations

Running

To run the code locally, just type in the root path.

go run .

The following APIs are available:

  • /info/?clientId=<CLIENT_ID> -> Returns the client that matches the ID
  • /info/?startBirthday=<YYYY-MM-DD>&endBirthday=<YYYY-MM-DD> -> Returns the list of clients with birthdays between the provided dates
  • /search/?name=<START_NAME> -> Returns the first user with name that starts with the START_NAME parameter

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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