cinema-service

module
v0.0.0-...-f02a2e5 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2022 License: GPL-3.0

README

Cinema-service is a golang API

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

Project Layout

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
└──
            

Setup localy

  • Clone this repository
  • Run go mod tidy
Configure .env file:
  • DB_HOST = host
  • DB_NAME = name
  • DB_PORT = port
  • DB_USER = user
  • DB_PASSWORD = password
  • ACCESS_SECRET = key
Configure AWS
Setup ticketgenerator service
Run
  • go run cmd/cinetickets/main.go

Docker containers

Hosting API

Testing

  • go run test ./...

Directories

Path Synopsis
api
cmd
Package docs GENERATED BY THE COMMAND ABOVE; DO NOT EDIT This file was generated by swaggo/swag
Package docs GENERATED BY THE COMMAND ABOVE; DO NOT EDIT This file was generated by swaggo/swag
aws
jwt

Jump to

Keyboard shortcuts

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