Documentation
¶
Index ¶
- func CreateGameLocalizer() core.ILocalizer
- func CreateInMemoryChatStorage() core.IChatStorage
- func CreateInMemoryUserStorage() core.IUserStorage
- func CreateMathRand() core.IRand
- func CreateRabbitFactory(l core.Logger, url string) (legacy.ITaskFactory, func())
- func CreateSettingsStorage(dbFile string) core.ISettingsProvider
- func CreateUserStorage(dbFile string, l core.Logger) legacy.IUserStorage
- type Chat
- type ChatStorage
- type CommonLocalizer
- type FfmpegConverter
- func (c *FfmpegConverter) Convert(vf *legacy.Video, bitrate int) (*legacy.Video, error)
- func (c *FfmpegConverter) CreateMedia(url string) ([]*legacy.Media, error)
- func (c *FfmpegConverter) CreateVideo(path string) (*legacy.Video, error)
- func (c *FfmpegConverter) GetCodec(path string) string
- func (c *FfmpegConverter) Split(video *legacy.Video, limit int) ([]*legacy.Video, error)
- type FileDownloader
- type GameLocalizer
- type GameStorage
- func (s *GameStorage) AddPlayer(gameID int64, user *core.User) error
- func (s *GameStorage) AddRound(gameID int64, round *core.Round) error
- func (s *GameStorage) GetPlayers(gameID int64) ([]*core.User, error)
- func (s *GameStorage) GetRounds(gameID int64) ([]*core.Round, error)
- func (s *GameStorage) UpdatePlayer(gameID int64, user *core.User) error
- type InMemoryChatStorage
- type InMemoryUserStorage
- type MathRand
- type OutlineStorage
- type Player
- type RabbitFactory
- type RabbitWorker
- type Round
- type Settings
- type SettingsStorage
- type User
- type UserStorage
- type VpnKey
- type VpnLocalizer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateGameLocalizer ¶
func CreateGameLocalizer() core.ILocalizer
func CreateInMemoryChatStorage ¶
func CreateInMemoryChatStorage() core.IChatStorage
func CreateInMemoryUserStorage ¶
func CreateInMemoryUserStorage() core.IUserStorage
func CreateMathRand ¶
func CreateRabbitFactory ¶
func CreateRabbitFactory(l core.Logger, url string) (legacy.ITaskFactory, func())
func CreateSettingsStorage ¶
func CreateSettingsStorage(dbFile string) core.ISettingsProvider
func CreateUserStorage ¶
func CreateUserStorage(dbFile string, l core.Logger) legacy.IUserStorage
Types ¶
type ChatStorage ¶
type ChatStorage struct {
// contains filtered or unexported fields
}
ChatStorage implements core.IChatStorage interface
func CreateChatStorage ¶
func CreateChatStorage(dbFile string, l core.Logger) *ChatStorage
CreateChatStorage is a default ChatStorage factory
func (*ChatStorage) CreateChat ¶
func (s *ChatStorage) CreateChat(chatID int64, title string, type_ string) error
CreateChat is a core.IChatStorage interface implementation
func (*ChatStorage) GetChatByID ¶
func (s *ChatStorage) GetChatByID(chatID int64) (*legacy.Chat, error)
GetChatByID is a core.IChatStorage interface implementation
type CommonLocalizer ¶
type CommonLocalizer struct {
// contains filtered or unexported fields
}
CommonLocalizer for faggot game
func CreateCommonLocalizer ¶
func CreateCommonLocalizer() *CommonLocalizer
func (*CommonLocalizer) AllKeys ¶
func (l *CommonLocalizer) AllKeys() []string
AllKeys is a core.ILocalizer implementation
func (*CommonLocalizer) I18n ¶
func (l *CommonLocalizer) I18n(lang, key string, args ...interface{}) string
I18n is a core.ILocalizer implementation
type FfmpegConverter ¶
type FfmpegConverter struct {
// contains filtered or unexported fields
}
FfmpegConverter implements core.IVideoConverter and core.IVideoFactory using ffmpeg
func CreateFfmpegConverter ¶
func CreateFfmpegConverter(l core.Logger) *FfmpegConverter
CreateFfmpegConverter is a basic FfmpegConverter factory
func (*FfmpegConverter) CreateMedia ¶
func (c *FfmpegConverter) CreateMedia(url string) ([]*legacy.Media, error)
CreateMedia is a core.IMediaFactory interface implementation
func (*FfmpegConverter) CreateVideo ¶
func (c *FfmpegConverter) CreateVideo(path string) (*legacy.Video, error)
CreateVideo is a core.IVideoFactory interface implementation
func (*FfmpegConverter) GetCodec ¶
func (c *FfmpegConverter) GetCodec(path string) string
GetCodec is a core.IVideoConverter interface implementation
type FileDownloader ¶
type FileDownloader struct {
// contains filtered or unexported fields
}
FileDownloader is a default implementation for core.IFileDownloader
func CreateFileDownloader ¶
func CreateFileDownloader(l core.Logger) *FileDownloader
CreateFileDownloader is a default FileDownloader factory
type GameLocalizer ¶
type GameLocalizer struct {
// contains filtered or unexported fields
}
GameLocalizer for faggot game
func (*GameLocalizer) AllKeys ¶
func (l *GameLocalizer) AllKeys() []string
AllKeys is a core.ILocalizer implementation
func (*GameLocalizer) I18n ¶
func (l *GameLocalizer) I18n(lang, key string, args ...interface{}) string
I18n is a core.ILocalizer implementation
type GameStorage ¶
type GameStorage struct {
// contains filtered or unexported fields
}
GameStorage implements core.IGameStorage interface
func CreateGameStorage ¶
func CreateGameStorage(dbFile string) *GameStorage
CreateGameStorage is a default GameStorage factory
func (*GameStorage) AddPlayer ¶
func (s *GameStorage) AddPlayer(gameID int64, user *core.User) error
AddPlayer is a core.IGameStorage interface implementation
func (*GameStorage) AddRound ¶
func (s *GameStorage) AddRound(gameID int64, round *core.Round) error
AddRound is a core.IGameStorage interface implementation
func (*GameStorage) GetPlayers ¶
func (s *GameStorage) GetPlayers(gameID int64) ([]*core.User, error)
GetPlayers is a core.IGameStorage interface implementation
func (*GameStorage) GetRounds ¶
func (s *GameStorage) GetRounds(gameID int64) ([]*core.Round, error)
GetRounds is a core.IGameStorage interface implementation
func (*GameStorage) UpdatePlayer ¶
func (s *GameStorage) UpdatePlayer(gameID int64, user *core.User) error
AddPlayer is a core.IGameStorage interface implementation
type InMemoryChatStorage ¶
type InMemoryChatStorage struct {
// contains filtered or unexported fields
}
func (*InMemoryChatStorage) CreateChat ¶
func (storage *InMemoryChatStorage) CreateChat(chatID int64, title string, type_ string) error
CreateChat is a core.IChatStorage interface implementation
func (*InMemoryChatStorage) GetChatByID ¶
func (storage *InMemoryChatStorage) GetChatByID(chatID int64) (*core.Chat, error)
GetChatByID is a core.IChatStorage interface implementation
type InMemoryUserStorage ¶
type InMemoryUserStorage struct {
// contains filtered or unexported fields
}
func (*InMemoryUserStorage) CreateUser ¶
func (storage *InMemoryUserStorage) CreateUser(user *core.User) error
CreateUser is a core.IUserStorage interface implementation
func (*InMemoryUserStorage) GetUserById ¶
func (storage *InMemoryUserStorage) GetUserById(userID int64) (*core.User, error)
GetUserById is a core.IUserStorage interface implementation
type OutlineStorage ¶
type OutlineStorage struct {
// contains filtered or unexported fields
}
func CreateOutlineStorage ¶
func CreateOutlineStorage(dbFile string, l core.Logger) *OutlineStorage
CreateOutlineStorage is a default OutlineStorage factory
type Player ¶
type Player struct { GameID int64 `gorm:"primaryKey"` UserID int64 `gorm:"primaryKey"` FirstName string LastName string Username string LanguageCode string }
Player that can be persistent on disk
type RabbitFactory ¶
type RabbitFactory struct {
// contains filtered or unexported fields
}
func (*RabbitFactory) Close ¶
func (q *RabbitFactory) Close()
type RabbitWorker ¶
type RabbitWorker struct {
// contains filtered or unexported fields
}
type Settings ¶
type Settings struct { ChatID int64 `gorm:"primaryKey"` Key string `gorm:"primaryKey"` Data []byte CreatedAt time.Time `gorm:"autoUpdateTime"` UpdatedAt time.Time `gorm:"autoCreateTime"` }
Settings
type SettingsStorage ¶
type SettingsStorage struct {
// contains filtered or unexported fields
}
SettingsStorage implements core.ISettingsProvider interface
func (*SettingsStorage) GetData ¶
func (storage *SettingsStorage) GetData(chatID core.ChatID, key core.SettingKey) ([]byte, error)
GetData is a core.ISettingsProvider interface implementation
func (*SettingsStorage) SetData ¶
func (storage *SettingsStorage) SetData(chatID core.ChatID, key core.SettingKey, data []byte) error
SetData is a core.ISettingsProvider interface implementation
type User ¶
type User struct { UserID int64 `gorm:"primaryKey"` FirstName string LastName string Username string LanguageCode string CreatedAt time.Time `gorm:"autoUpdateTime"` UpdatedAt time.Time `gorm:"autoCreateTime"` }
User
type UserStorage ¶
type UserStorage struct {
// contains filtered or unexported fields
}
func (*UserStorage) CreateUser ¶
func (storage *UserStorage) CreateUser(user *legacy.User) error
CreateUser is a core.IUserStorage interface implementation
func (*UserStorage) GetUserById ¶
func (storage *UserStorage) GetUserById(userID int64) (*legacy.User, error)
GetUserById is a core.IUserStorage interface implementation
type VpnLocalizer ¶
type VpnLocalizer struct {
// contains filtered or unexported fields
}
VpnLocalizer for faggot game
func CreateVpnLocalizer ¶
func CreateVpnLocalizer() *VpnLocalizer
func (*VpnLocalizer) AllKeys ¶
func (l *VpnLocalizer) AllKeys() []string
AllKeys is a core.ILocalizer implementation
func (*VpnLocalizer) I18n ¶
func (l *VpnLocalizer) I18n(lang, key string, args ...interface{}) string
I18n is a core.ILocalizer implementation