Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ReplaceIdFormatToName ¶
Types ¶
type MessageRepositoryOnSlack ¶
type MessageRepositoryOnSlack struct { SlackClient *SlackClient // contains filtered or unexported fields }
func NewMessageRepository ¶
func NewMessageRepository(timelineChannelID string, s SlackClient, db leveldb.DB) MessageRepositoryOnSlack
func (MessageRepositoryOnSlack) Delete ¶
func (r MessageRepositoryOnSlack) Delete(message timeline.Message) error
func (MessageRepositoryOnSlack) FindMessageInTimeline ¶
type RTMClient ¶
type RTMClient interface {
ConnectToRTM() (RTMConnection, error)
}
type RTMConnection ¶
type SlackClient ¶
type SlackClient struct { Token string // contains filtered or unexported fields }
func NewSlackClient ¶
func NewSlackClient(token string, logger *log.Logger) SlackClient
func (SlackClient) ConnectToRTM ¶
func (cli SlackClient) ConnectToRTM() (RTMConnection, error)
type SlackMessage ¶
type SlackMessage struct { Raw string `json:"-"` Type string `json:"type"` UserID string `json:"user"` Text string `json:"text"` ChannelID string `json:"channel"` TimeStamp string `json:"ts"` SubType string `json:"subtype"` }
func (*SlackMessage) IsDeletedMessage ¶
func (m *SlackMessage) IsDeletedMessage() bool
func (*SlackMessage) IsMessageToPost ¶
func (m *SlackMessage) IsMessageToPost() bool
func (*SlackMessage) ToInternal ¶
func (m *SlackMessage) ToInternal() timeline.Message
type SlackRTMConnection ¶
type SlackRTMConnection struct {
// contains filtered or unexported fields
}
func (SlackRTMConnection) Close ¶
func (c SlackRTMConnection) Close() error
func (SlackRTMConnection) Read ¶
func (c SlackRTMConnection) Read() ([]byte, error)
type SlackRetryAble ¶
type SlackRetryAble struct { N int // contains filtered or unexported fields }
func (*SlackRetryAble) GetRequest ¶
func (r *SlackRetryAble) GetRequest(url string) (*http.Response, error)
func (*SlackRetryAble) PostReqest ¶
type SlackTimelineWorker ¶
type SlackTimelineWorker struct {
// contains filtered or unexported fields
}
func NewSlackTimelineWorker ¶
func NewSlackTimelineWorker(rtmClient RTMClient) SlackTimelineWorker
type User ¶
type User struct { ID string `json:"id"` Name string `json:"name"` Profile profile `json:"profile"` }
func (User) ToInternal ¶
type UserRepositoryOnSlack ¶
type UserRepositoryOnSlack struct { SlackClient SlackClient // contains filtered or unexported fields }
func NewUserRepository ¶
func NewUserRepository(s SlackClient) UserRepositoryOnSlack
func (UserRepositoryOnSlack) Clear ¶
func (r UserRepositoryOnSlack) Clear() error
Click to show internal directories.
Click to hide internal directories.