go-calendar
Simple calendar of events. Receives new events passed to it and informs users of the upcoming
events (at least it should do so).
Usage
go-calendar [FLAGS]
Makefile targets and their description
setup
- Install all the build and lint dependenciesmod
- Runs modtest
- Runs all unit testsintegration-test
- Runs integration testscover
- Runs all the tests and opens the coverage reportfmt
- Runs goimports on all go fileslint
- Runs all the lintersgen
- Triggers the protobuf code generationbuild-gcs
- Builds the go-calendar projectbuild-notification
- Builds the notification projectbuild-watcher
- Builds the watcher projectbuild-all
- Builds all binaries of the projectdockerbuild-gcs
- Builds a docker image with the go-calendar projectdockerpush-gcs
- Publishes the docker image to the registrydockerbuild-notification
- Builds a docker image with the notification projectdockerpush-notification
- Publishes the docker image to the registrydockerbuild-watcher
- Builds a docker image with a projectdockerpush-watcher
- Publishes the docker image to the registrydocker-compose-up
- Runs docker-compose command to kick-start the infrastructuredocker-compose-down
- Runs docker-compose command to remove the turn down the infrastructureintegration
- Run integration testsclean
- Remove temporary fileshelp
- Print this help message and exit
Client API
The programme has support for both GRPC and REST API with similar command invocation.
Run GRPC Web Service client
Usage:
go-calendar grpc-client [command]
Examples:
go-calendar grpc-client create -h
Available Commands:
create Create calendar event
delete Delete calendar event
get Get calendar event
update Update calendar event
Flags:
-e, --end string ending date and hour of the event
-x, --expired delete expired events for a user
-h, --help help for grpc-client
-s, --host string host address to connect to (default "127.0.0.1")
-i, --id string internal event id
-l, --list list all events belonging to a user
-n, --note string additional note related to the event
-o, --owner string owner of the event
-p, --port string port of the host (default "7070")
-b, --start string starting date and hour of the event
-t, --title string event name
Use "go-calendar grpc-client [command] --help" for more information about a command.
Server part
Run GRPC Server
Usage:
go-calendar grpc-server [flags]
Examples:
# Initialise from configuration file
go-calendar grpc-server -c /path/to/config.json
# Initialise from parameters
go-calendar grpc-server --host=127.0.0.1 --port=7777 --log=2 --dbname=db_name --dbuser=username
Flags:
-c, --config string path to the configuration file
--dbhost string db host (default "127.0.0.1")
-n, --dbname string db name (default "test")
--dbpassword string db password
--dbport string db port (default "5432")
-u, --dbuser string db user
-h, --help help for grpc-server
-s, --host string host address (default "127.0.0.1")
-l, --log int changes log level (default 1)
-p, --port string host port (default "7070")
-m, --sslmode string ssl mode (default "disable")
Description
Consult docs folder for further reference.
Project's progress is outlined in the markdown file file as well as the Prometheus
expressions useful for creating line graphs from the received metrics.
TODO:
- Refactoring:
- DB methods;
- internal package;
- Add UI:
- Add Kafka MQ implementation;
- Add Redis implementation;
- Add Swagger implementation;
- Add Meta linter to the project (golang-ci lint);
- Error wrapping ???;
- CI implementation.