batnoter-api

command module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: May 26, 2022 License: MIT Imports: 1 Imported by: 0

README

BatNoter API Module

GitHub Workflow Status codecov Codacy Badge

This is the api service of batnoter application built with golang.

It exposes ReST endpoints to access and manage markdown notes from user's git repository. Currently it only supports github repository for storing & managing notes.

Local Development Setup

Prerequisites
  • Go version 1.18 or above
  • Docker Desktop
Start postgres database container

Below commands use docker to start the database container.

make network
make postgres
make createdb
Create configuration file from template

The config.yaml is the configuration template file containing default config values.

cp config.yaml .config.yaml

Application uses .config.yaml file to get the config values. Please update placeholder-values from this config file to the actual ones.

Start the server

Make sure that the .config.yaml file is configured correctly & database container is up & running. Then run the below commands to setup the db schema and start the web server.

go run main.go migrateup
go run main.go serve

This will start the server on port specified in .config.yaml file. You can now access the api endpoints.

Run tests
go test -v -cover ./...

This will execute all the tests and also prints the code coverage percentage.

Contribution Guidelines

Every Contribution Makes a Difference

Read the Contribution Guidelines before you contribute.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
internal
auth
Package auth is a generated GoMock package.
Package auth is a generated GoMock package.
db
github
Package github is a generated GoMock package.
Package github is a generated GoMock package.
preference
Package preference is a generated GoMock package.
Package preference is a generated GoMock package.
user
Package user is a generated GoMock package.
Package user is a generated GoMock package.

Jump to

Keyboard shortcuts

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