clean-architecture-telegram-bot

command module
v0.0.0-...-dcf0478 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2024 License: MIT Imports: 2 Imported by: 0

README

clean-architecture-telegram-bot

A sample project for creating telegram bots in Golang with clean architecture and repository pattern.

[!NOTE] Although this is a telegram bot, clean architecture principles are the same for any types of web applications.

Directory Explanation:

/cmd

Main functionality for the application.

/configs

Application's Configurations.

/handlers

Handling all incoming requests.

This directory is responsible for defining endpoints to receive requests, and validating those incoming requests.

It contains no business logic and just passes validated requests to the appropriate services and returns the response to the client.

/logs

Where all logs are saved.

/models

Entities that are essential to the application, like structs and types.

/pkg

Libraries or functions that help to maintain and improve the application.

/repositories

Databases and their functionalities.

/services

Services that application provides.

This is where core business logic exists, it works as a bridge between handlers and repositories directories.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
Package cmd contains main functionality for the application using CLI commands.
Package cmd contains main functionality for the application using CLI commands.
Package configs implement configurations that the application needs.
Package configs implement configurations that the application needs.
package handlers handles all incoming requests.
package handlers handles all incoming requests.
bot
Package bot handles bot activities.
Package bot handles bot activities.
Package models contain entities that are essential for the app.
Package models contain entities that are essential for the app.
pkg
keyboards
Package keyboards containes all bot's keyboards.
Package keyboards containes all bot's keyboards.
logger
Package logger deals with logging.
Package logger deals with logging.
logger/zap
Package zap implements logging with zap logger.
Package zap implements logging with zap logger.
messages
Package messages contains all messages to be displayed.
Package messages contains all messages to be displayed.
Package repositories implements database functionalities.
Package repositories implements database functionalities.
mongodb
Package mongodb implements mongodb database functionalities.
Package mongodb implements mongodb database functionalities.
mysql
Package mysql implements mysql database functionalities.
Package mysql implements mysql database functionalities.
postgres
Package postgres implements postgres database functionalities.
Package postgres implements postgres database functionalities.
Package services implements all aplication services.
Package services implements all aplication services.
account
package account implements account functionalities.
package account implements account functionalities.
callback
package callback implements callback request functionalities.
package callback implements callback request functionalities.
command
package command implements command request functionalities.
package command implements command request functionalities.
message
package account implements message request functionalities.
package account implements message request functionalities.

Jump to

Keyboard shortcuts

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