USSD service
Mohammed Sohail
0bb44fc80b
* fixed missing error handler in main * add injectable build string in main * add (dynamically linked) docker build * add github CI workflow * add extra but useful dev files in dev folder |
||
---|---|---|
.github/workflows | ||
cmd | ||
common | ||
config | ||
dev | ||
devtools/admin | ||
initializers | ||
internal | ||
menutraversal_test | ||
models | ||
remote | ||
services/registration | ||
.dockerignore | ||
.env.example | ||
.gitignore | ||
Dockerfile | ||
go.mod | ||
go.sum | ||
LICENSE | ||
Makefile | ||
README.md | ||
sample_tokens.json |
URDT USSD service
This is a USSD service built using the go-vise engine.
Prerequisites
1. go-vise
Set up go-vise
by cloning the repository into a separate directory. The main upstream repository is hosted at: https://git.defalsify.org/vise.git
git clone https://git.defalsify.org/vise.git
Setup
-
Clone the ussd repo in its own directory
git clone https://git.grassecon.net/urdt/ussd.git
-
Navigate to the project directory.
-
Enter the
services/registration
subfolder:cd services/registration
-
make the .bin files from the .vis files
make VISE_PATH=/var/path/to/your/go-vise -B
-
Return to the project root (
cd ../..
) -
Run the USSD menu
go run cmd/main.go -session-id=0712345678
Running the different binaries
-
CLI:
go run cmd/main.go -session-id=0712345678
-
Africastalking:
go run cmd/africastalking/main.go
-
Async:
go run cmd/async/main.go
-
Http:
go run cmd/http/main.go
Flags
Below are the supported flags:
-
-session-id
:Specifies the session ID. (CLI only).
Default:
075xx2123
.Example:
go run cmd/main.go -session-id=0712345678
-
-d
:Enables engine debug output.
Default:
false
.Example:
go run cmd/main.go -session-id=0712345678 -d
-
-db
:Specifies the database type.
Default:
gdbm
.Example:
go run cmd/main.go -session-id=0712345678 -d -db=postgres
Note: If using
-db=postgres
, ensure PostgreSQL is running with the connection details specified in your.env
file.