Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrUnableToOpenDatabaseConnection is returned when there is an error when opening a database connection. ErrUnableToOpenDatabaseConnection = errors.New("error when opening database connection") // ErrUnsupportedStorageType is returned when an unsupported storage type is used. ErrUnsupportedStorageType = errors.New("unsupported storage type") // to use the telegram bot command is not a superuser. ErrUnauthorizedToUseTelegramBotCommand = errors.New("unauthorized to use command") // ErrInsufficientArguments is returned when there are not enough arguments to use the command. ErrInsufficientArguments = errors.New("insufficient arguments") )
Functions ¶
func Run ¶
Run starts the app in a separate goroutine and waits for it to stop. It initializes a logger and reads in a configuration file. It then creates a context with a cancel function, which is used to stop the app when the context is cancelled. The app is started in a separate goroutine, and the function waits for the context to be done before stopping the app and waiting for the goroutine to finish. If the app stopped with an error, that error is returned by the function.
parentCtx: the parent context to use for the app's context.
Returns an error if the app stopped with an error or if there was an error when initializing the config.
Types ¶
This section is empty.
Source Files ¶
Click to show internal directories.
Click to hide internal directories.