42 lines
1.3 KiB
Go
42 lines
1.3 KiB
Go
package logic
|
|
|
|
import (
|
|
"git.dragon-labs.de/alphyron/group_helper/models"
|
|
tgbotapi "github.com/go-telegram-bot-api/telegram-bot-api"
|
|
)
|
|
|
|
type GroupHelperService interface {
|
|
CreateGroup(*models.Group) (*models.Group, error)
|
|
UpdateGroup(*models.Group) (*models.Group, error)
|
|
|
|
GetGroupByID(int64) (*models.Group, error)
|
|
GetGroupDatabaseSize(*models.Group) (int, error)
|
|
|
|
CreateUser(*models.User) (*models.User, error)
|
|
GetUserByID(int64) (*models.User, error)
|
|
|
|
UserJoinGroup(*models.User, *models.Group) (bool, error)
|
|
UserLeaveGroup(*models.User, *models.Group) (bool, error)
|
|
IsUserInGroup(*models.User, *models.Group) (bool, error)
|
|
|
|
ListGroups() ([]*models.Group, error)
|
|
ListUsers() ([]*models.User, error)
|
|
}
|
|
|
|
type CommandService interface {
|
|
HelpCommand(*tgbotapi.Message) error
|
|
InfoCommand(*tgbotapi.Message) error
|
|
PlaceholderCommand(*tgbotapi.Message) error
|
|
PrintJoinMessage(*tgbotapi.Message) error
|
|
PrintLeaveMessage(*tgbotapi.Message) error
|
|
PrintKickMessage(*tgbotapi.Message) error
|
|
PrintVerifiedMessage(*tgbotapi.Message) error
|
|
PrintGroupStatus() error
|
|
UpdateJoinMessage(*tgbotapi.Message) error
|
|
UpdateLeaveMessage(*tgbotapi.Message) error
|
|
UpdateKickMessage(*tgbotapi.Message) error
|
|
UpdateVerifiedMessage(*tgbotapi.Message) error
|
|
UpdateOnlineCheck(*tgbotapi.Message) error
|
|
UpdateForbidWriting(*tgbotapi.Message) error
|
|
}
|