api-go-autotests-server

module
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2026 License: Apache-2.0

README

API Go Autotests Server

Install Go

Install Go 1.22 or newer and verify the installation:

go version

Create .env file

Create a .env file in the project root directory. It stores server, database, and JWT settings.

cp .env.example .env

Add the following variables to the file:

HTTP_ADDR=:8000
GRPC_ADDR=:9000

DATABASE_URL=local.db
STORAGE_DIRECTORY=storage
APP_HOST=http://localhost:8000

JWT_SECRET_KEY=api-go-autotests-server-secret-key
JWT_ACCESS_TOKEN_EXPIRE=1800
JWT_REFRESH_TOKEN_EXPIRE=5184000

Run server

go run ./cmd/server

API endpoints

  • HTTP API: http://localhost:8000/api/v1
  • Swagger UI: http://localhost:8000/swagger/index.html
  • OpenAPI specification: http://localhost:8000/openapi/v1/openapi.yaml
  • gRPC API: localhost:9000

The gRPC server has reflection enabled. Protobuf contracts are available in api/proto/v1.

Directories

Path Synopsis
cmd
server command
gen
internal

Jump to

Keyboard shortcuts

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