Discover Packages
github.com/st-matskevich/audio-guide-bot/api
command
module
Version:
v0.0.0-...-b8432e4
Opens a new window with list of versions in this module.
Published: Nov 5, 2023
License: MIT
Opens a new window with license information.
Imports: 11
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
README
README
¶
Audio Guide Bot: API service
API service is a dockerized Golang application that serves Guide Bot API and webhook for Telegram Bot API.
Configuration
Required environment variables:
TELEGRAM_WEB_APP_URL
- URL to Guide UI service
TELEGRAM_BOT_TOKEN
- Telegram Bot token
TELEGRAM_PAYMENTS_TOKEN
- Telegram Payments token
JWT_SECRET
- Secret to sign and verify JWT tokens
DB_CONNECTION_STRING
- URL to DB
S3_CONNECTION_STRING
- URL to S3
Optional environment variables:
CORS_ALLOWED_ORIGINS
- list of allowed origins that may access the resource
Service structure
Service is built on three abstractions:
Providers - isolate interaction with other systems or packages
Repositories - provide CRUD operations for data types, all interfaces are implemented as an aggregate repository object
Controllers - implement HTTP handlers with business logic, all handlers are implemented in compliance with JSend specification
All entities are constructed and injected in main and then HTTP handlers are served by Fiber .
Database migrations
API service can be started in database migration mode. In this case, it will apply migrations from the implemented DBProvider
and exit. To start the service in migration mode - specify --migrate
execution argument.
Expand ▾
Collapse ▴
Documentation
¶
There is no documentation for this package.
Source Files
¶
Directories
¶
provider
Click to show internal directories.
Click to hide internal directories.