- REST-API Server /pkg/rest-api
The server uses gin-gotonic pkg to run a RESTful API listener. The supported endpoints can be found in registerAPI function.
- DB /pkg/db
With the access restrictions in mind, we designed our backend to be DB-agnostic: the RESTAPI server does not care about the specifics of the DB, it only requires a client that implements the db.go interface.
For the time being we chose to go with a low-effort in-memory database implementation.
- Data-types /datatypes
The datatypes.go file contains the structures used in our endpoints (e.g. Job-Listing).
- Queries /queries
The queries directory contains datatype-related query formats, e.g. URL query parameters for fetching job listings (in job_listing.go).
The frontend folder contains the code from Wix.
-
Set the
REGISTRYenvironment variable to hold the name of your docker registry:$ export REGISTRY=... -
Run the following command to build and push the image:
make push-images
go vet- golangci-lint, minimal version 1.43.0, the settings file is .golangci.yaml.
- golint
If you want to specify something as false-positive, use the //nolint comment.
If you see stale errors from golangci-lint, run golangci-lint cache clean.
We did not implement any unit/e2e tests for this prototype. It is the developer's responsibility to build/test their code before submitting PRs.