Skip to content

bancodobrasil/featws-ruller

Repository files navigation

Go Reference License

Featws Ruller About_en

  • The featws-ruller project is an implmentation of the grule-rule-engine, used to evalute rulesheets(.grl)

Required Software

  • You must have the Go Programming Language installed in your machine to run this project. You can get the official download here.

  • Clone the featws-transpiler repository to your local machine and make sure both transpiler and ruller project are in the same folder. You can find the featws-transpiler repository here.

Initializate the project

  • Clone this project to your local machine.
  • On main.go folder (../featws-ruller/main.go), open your local terminal and type the command go run main.go, if your OS is windows, you can by build and run the executable go build && ./featws-ruler.exe, or if your OS is mac, type the command go build -o ruller && ./ruller $@.

Testing diferents rulesheets

  • Check if you have in your workspace the featws-transpiler and copy the path from .grl file for the new case, you can find that on the cases tests -> cases
  • Now just replace the env variable "FEATWS_RULLER_DEFAULT_RULES" on .env file on ruller, with the new path, and run like the instructions above.

Testing rulesheet with resolvers

  • To test if the resolver are loaded, you have to set the featws-resolver-bridge URL, on the .env file to.

Load a rulesheet from remote source

  • To load a rulesheet from a remote soure, just change the .env variable "FEATWS_RULLER_RESOURCE_LOADER_URL" pointed to your URL.

Using main endpoints

By default the port will be :8000

GoDoc

To access the GoDoc documentation, first install GoDoc on your machine. Open a terminal and type:

go get golang.org/x/tools/cmd/godoc

Then run the following command in the repository terminal:

godoc -http=:6060

GoDoc will run on localhost:6060. To access the GoDoc documentation, just click here.