Documentation ¶
Index ¶
- type Button
- type Chat
- type ChatID
- type Command
- type Document
- type File
- type IBoolSettingProvider
- type IBot
- type IButtonHandler
- type IChatStorage
- type ICommandService
- type IDocumentHandler
- type IFileDownloader
- type IFileUploader
- type IGameStorage
- type IHttpClient
- type IImageDownloader
- type IImageHandler
- type ILocalizer
- type ILogger
- type IMediaFactory
- type IRand
- type ISendMediaStrategy
- type ISendVideoStrategy
- type ISettingsProvider
- type ITask
- type ITaskFactory
- type ITextHandler
- type IUserStorage
- type IVideoConverter
- type IVideoFactory
- type IVideoHandler
- type IVideoSplitter
- type IVpnAPI
- type Image
- type Keyboard
- type Media
- type MediaType
- type Message
- type Round
- type SettingKey
- type URL
- type User
- type Video
- type VpnKey
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Command ¶
func DefaultCommands ¶
func DefaultCommands() []Command
type IBoolSettingProvider ¶
type IBoolSettingProvider interface { GetBool(ChatID, SettingKey) bool SetBool(ChatID, SettingKey, bool) error }
type IBot ¶
type IBot interface { Delete(*Message) error Edit(*Message, interface{}, ...interface{}) (*Message, error) SendText(string, ...interface{}) (*Message, error) SendImage(*Image, string) (*Message, error) SendAlbum([]*Image) ([]*Message, error) SendMedia(*Media) (*Message, error) SendMediaAlbum([]*Media) ([]*Message, error) SendVideo(*Video, string) (*Message, error) IsUserMemberOfChat(*User, ChatID) bool GetCommands(ChatID) ([]Command, error) SetCommands(ChatID, []Command) error }
IBot represents abstract bot interface
type IButtonHandler ¶
type IChatStorage ¶
type ICommandService ¶
type IDocumentHandler ¶
IDocumentHandler responds to documents sent in chah
type IFileDownloader ¶
IFileDownloader turns URL to File
type IFileUploader ¶
IFileUploader turns File to URL
type IGameStorage ¶
type IGameStorage interface { GetPlayers(ChatID) ([]*User, error) GetRounds(ChatID) ([]*Round, error) AddPlayer(ChatID, *User) error UpdatePlayer(ChatID, *User) error AddRound(ChatID, *Round) error }
IGameStorage is an abstract interface for game players and results handling
type IHttpClient ¶
type IHttpClient interface { GetContentType(URL) (string, error) GetContent(URL) (string, error) GetRedirectLocation(url URL) (URL, error) SetHeader(string, string) }
IHttpClient retreives remote content info
type IImageDownloader ¶
IImageDownloader download Image to disk
type IImageHandler ¶
IImageHandler responds to images
type ILocalizer ¶
ILocalizer for localization
type ILogger ¶
type ILogger interface { Close() Error(...interface{}) Errorf(string, ...interface{}) Info(...interface{}) Infof(string, ...interface{}) Warning(...interface{}) Warningf(string, ...interface{}) }
ILogger for logging
type IMediaFactory ¶
IMediaFactory creates Media from URL
type ISendMediaStrategy ¶
type ISendVideoStrategy ¶
type ISettingsProvider ¶
type ISettingsProvider interface { GetData(ChatID, SettingKey) ([]byte, error) SetData(ChatID, SettingKey, []byte) error }
type ITaskFactory ¶
type ITextHandler ¶
ITextHandler responds to all the text messages
type IUserStorage ¶
type IVideoConverter ¶
IVideoConverter convert Video with specified bitrate
type IVideoFactory ¶
IVideoFactory retreives video file parameters from file on disk
type IVideoHandler ¶
IVideoHandler responds to videos
type IVideoSplitter ¶
IVideoSplitter convert Video with specified bitrate
type Media ¶
type Media struct { ResourceURL URL URL URL Title string Description string Caption string Duration int // video only Codec string // video only Size int Type MediaType }
Media ...
type Message ¶
type Message struct { ID int Chat *Chat IsPrivate bool Sender *User Text string ReplyTo *Message Video *Video }
Message from chat
type SettingKey ¶
type SettingKey string
const ( SFaggotGameEnabled SettingKey = "faggot_game" SInstagramFlowEnabled SettingKey = "instagram_flow" SInstagramFlowRemoveSource SettingKey = "instagram_flow_remove_source" SLinkFlowEnabled SettingKey = "link_flow" SLinkFlowRemoveSource SettingKey = "link_flow_remove_source" SPayloadList SettingKey = "payload_list" STwitterFlowEnabled SettingKey = "twitter_flo" STwitterFlowRemoveSource SettingKey = "twitter_flow_remove_source" SYoutubeFlowEnabled SettingKey = "youtube_flow" SYoutubeFlowRemoveSource SettingKey = "youtube_flow_remove_source" )
Source Files ¶
- bot.go
- button.go
- chat.go
- chat_storage.go
- command.go
- document.go
- file.go
- game_storage.go
- handlers.go
- image.go
- localizer.go
- logger.go
- media.go
- message.go
- networking.go
- rand.go
- round.go
- send_video_strategy.go
- settings.go
- settings_provider.go
- task.go
- user.go
- user_storage.go
- video.go
- video_converter.go
- video_factory.go
- video_splitter.go
- vpn.go