Skip to content

alexm24/ticket-booking

Repository files navigation

Rest api for Ticket booking

Postgres

create docker postgres

  • docker run --name=postgres -e POSTGRES_PASSWORD='qwerty' -p 5432:5432 -d postgres

create init database

  • migrate create -ext sql -dir ./migrations -seq init

create migration

https://github.com/golang-migrate/migrate

  • migrate -path ./migrations -database "postgres://postgres:qwerty@localhost:5432/postgres?sslmode=disable" up

Swagger

Query

{ "route": "Омск-Москва" }

response: { "id": "a7d00b0d-f23a-4ddc-a5da-8aecf316ba8a", "route": "Омск-Москва" }

{ "fullname": "Иванов Иван Иваныч", "age": 29, "phone": "+79135896712", "email": "ivanov@mail.ru" }

response:

{ "id": "dcd23855-3fd0-490a-9aff-c3890aabe854", "age": 29, "email": "ivanov@mail.ru", "fullname": "Иванов Иван Иваныч", "phone": "+79135896712" }

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages