Documentation
¶
Index ¶
- type Chats
- type ChatsPostgre
- func (repository *ChatsPostgre) AddChat(chatId int64) error
- func (repository *ChatsPostgre) DeleteChat(chatID int64) error
- func (repository *ChatsPostgre) DeleteUUID(chat *models.Chat) error
- func (repository *ChatsPostgre) GenerateStateForChat(chatID int64) (string, error)
- func (repository *ChatsPostgre) GetChat(chatID int64) (*models.Chat, error)
- func (repository *ChatsPostgre) GetChatByTwitchID(twitchID string) (*models.Chat, error)
- func (repository *ChatsPostgre) GetChatByUUID(uuid string) (*models.Chat, error)
- func (repository *ChatsPostgre) SetToken(chat *models.Chat, token twitchmodels.UserAccessToken) error
- func (repository *ChatsPostgre) SetTwitchID(chat *models.Chat, twitchID string) error
- func (repository *ChatsPostgre) SetUUID(chatID int64, uuid string) error
- type Follows
- type FollowsPostgre
- func (repository *FollowsPostgre) AddFollow(chatID int64, follow models.Follow) error
- func (repository *FollowsPostgre) GetChatsByFollow(followID string) ([]models.Chat, error)
- func (repository *FollowsPostgre) GetFollow(id string) (*models.Follow, error)
- func (repository *FollowsPostgre) GetUnSubedFollows() ([]models.Follow, error)
- func (repository *FollowsPostgre) SaveFollow(follow *models.Follow) error
- func (repository *FollowsPostgre) UpdateSubID(followID string, subID string) error
- type Repository
- type Streamers
- type StreamersGORM
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Chats ¶
type Chats interface {
GenerateStateForChat(chatID int64) (string, error)
AddChat(chatId int64) error
DeleteChat(chatID int64) error
DeleteUUID(chat *models.Chat) error
SetToken(chat *models.Chat, token twitchmodels.UserAccessToken) error
SetTwitchID(chat *models.Chat, twitchID string) error
SetUUID(chatID int64, uuid string) error
GetChatByUUID(uuid string) (*models.Chat, error)
GetChatByTwitchID(twitchID string) (*models.Chat, error)
GetChat(chatID int64) (*models.Chat, error)
}
type ChatsPostgre ¶
func NewChatPostgre ¶
func NewChatPostgre(db *gorm.DB, api *twitch.TwitchAPI) *ChatsPostgre
func (*ChatsPostgre) AddChat ¶
func (repository *ChatsPostgre) AddChat(chatId int64) error
func (*ChatsPostgre) DeleteChat ¶
func (repository *ChatsPostgre) DeleteChat(chatID int64) error
Delete chats and follows that are not used anymore
func (*ChatsPostgre) DeleteUUID ¶
func (repository *ChatsPostgre) DeleteUUID(chat *models.Chat) error
func (*ChatsPostgre) GenerateStateForChat ¶
func (repository *ChatsPostgre) GenerateStateForChat(chatID int64) (string, error)
func (*ChatsPostgre) GetChat ¶
func (repository *ChatsPostgre) GetChat(chatID int64) (*models.Chat, error)
func (*ChatsPostgre) GetChatByTwitchID ¶
func (repository *ChatsPostgre) GetChatByTwitchID(twitchID string) (*models.Chat, error)
func (*ChatsPostgre) GetChatByUUID ¶
func (repository *ChatsPostgre) GetChatByUUID(uuid string) (*models.Chat, error)
func (*ChatsPostgre) SetToken ¶
func (repository *ChatsPostgre) SetToken(chat *models.Chat, token twitchmodels.UserAccessToken) error
func (*ChatsPostgre) SetTwitchID ¶
func (repository *ChatsPostgre) SetTwitchID(chat *models.Chat, twitchID string) error
type Follows ¶
type Follows interface {
GetChatsByFollow(followID string) ([]models.Chat, error)
GetFollow(id string) (*models.Follow, error)
GetUnSubedFollows() ([]models.Follow, error)
SaveFollow(follow *models.Follow) error
UpdateSubID(followID string, subID string) error
AddFollow(chatID int64, follow models.Follow) error
}
type FollowsPostgre ¶
func NewFollowsPostgre ¶
func NewFollowsPostgre(db *gorm.DB) *FollowsPostgre
func (*FollowsPostgre) AddFollow ¶
func (repository *FollowsPostgre) AddFollow(chatID int64, follow models.Follow) error
func (*FollowsPostgre) GetChatsByFollow ¶
func (repository *FollowsPostgre) GetChatsByFollow(followID string) ([]models.Chat, error)
func (*FollowsPostgre) GetFollow ¶
func (repository *FollowsPostgre) GetFollow(id string) (*models.Follow, error)
func (*FollowsPostgre) GetUnSubedFollows ¶
func (repository *FollowsPostgre) GetUnSubedFollows() ([]models.Follow, error)
func (*FollowsPostgre) SaveFollow ¶
func (repository *FollowsPostgre) SaveFollow(follow *models.Follow) error
func (*FollowsPostgre) UpdateSubID ¶
func (repository *FollowsPostgre) UpdateSubID(followID string, subID string) error
type Repository ¶
func NewRepository ¶
func NewRepository(db *gorm.DB, twitchAPI *twitch.TwitchAPI) *Repository
type Streamers ¶
type Streamers interface {
GetStreamerByID(broadcasterID string) (*models.StreamerAccount, error)
UpdateStreamer(streamer *models.StreamerAccount) error
CreateStreamer(streamer *models.StreamerAccount) error
}
type StreamersGORM ¶
func NewStreamersGORMRepository ¶
func NewStreamersGORMRepository(db *gorm.DB) *StreamersGORM
func (*StreamersGORM) CreateStreamer ¶
func (repository *StreamersGORM) CreateStreamer(streamer *models.StreamerAccount) error
func (*StreamersGORM) GetStreamerByID ¶
func (repository *StreamersGORM) GetStreamerByID(broadcasterID string) (*models.StreamerAccount, error)
func (*StreamersGORM) UpdateStreamer ¶
func (repository *StreamersGORM) UpdateStreamer(streamer *models.StreamerAccount) error
Click to show internal directories.
Click to hide internal directories.