This Web API designed to manage cinema activity.
This API provides function to register and authorize user.
Standart premissions are:
- Buy ticket
- Download ticket
Superadmin can add different privileges to users to make them admins.
This privileges provides CRUD operations on:
- Halls
- Movies
- Sessions
- Tickets
The cinetickets uses the following project layout:
.
├── api
│ └── halls
│ └── movies
│ └── sessions
│ └── tickets
│ └── users
│ └── user_privileges
│ └── server.go
├── api
│ └── cinetickets
│ └── main.go
├── db
│ └── migrations
├── internal
│ └── repository
│ └── halls
│ └── movies
│ └── sessions
│ └── tickets
│ └── users
│ └── user_privileges
│ └── service
│ └── halls
│ └── movies
│ └── sessions
│ └── tickets
│ └── users
│ └── user_privileges
│ ├── errors.go
│ ├── interfaces.go
├── package
│ └── aws
│ └── generator
│ └── grpc
│ └── jwt
│ └── encryption.go
├── test
│ └── mockService.go
└──
- Clone this repository
- Run
go mod tidy
DB_HOST = host
DB_NAME = name
DB_PORT = port
DB_USER = user
DB_PASSWORD = password
ACCESS_SECRET = key
- clone https://github.com/DarkJediDJ/ticketgenerator
- set environment variables
go run cmd/ticketgenerator/main.go
go run cmd/cinetickets/main.go
- https://hub.docker.com/repository/docker/darkjedidj/ticketgenerator
- https://hub.docker.com/repository/docker/darkjedidj/cinetickets
go run test ./...