Skip to content

quangdangfit/telegram-bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Telegram Bot Service

Golang, Gin, Telegram Bot

Setup

  • Config database and amqp config
  • Install require packages: go mod vendor

Startup

  • Run: go run main.go
  • Publish messages:
curl --location --request POST 'http://localhost:9090/internal/messages' \
--header 'Authorization: Basic ZW1zOmVtc2ludGVybmFs' \
--header 'Content-Type: application/json' \
--data-raw '{
    "code": "SESSION_ABC1",
    "action": "add_session",
    "data": {
        "sessionCode": "SESSION_ABC1",
        "partnerTransportationCode": "T200903VTK7U5PR",
        "locationType": "GHN_HUB",
        "locationId": "2388",
        "stopIndex": 1,
        "type": "PICKUP"
    }
}'

Structure

├── app  
│   ├── api             # Handle request & response
│   ├── dbs             # Database Layer
│   ├── models          # Models
│   ├── queue           # AMQP Layer
│   ├── repositories    # Repositories Layer
│   ├── router          # Router api v1  
│   ├── schema          # Sechemas  
│   ├── services        # Business Logic Layer  
├── config              # Config's files 
├── docs                # Swagger API documents
├── pkg                 # Common packages
│   └── utils           # Utilities

📙 Libraries

Contributing

If you want to contribute to this boilerplate, clone the repository and just start making pull requests.

About

Telegram bot for confirm, reject, cancel session

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published