Documentation ¶
Index ¶
- type MentionContext
- type UserConfig
- func (userConfig *UserConfig) GetNonAnsweredMentions() (result map[string]*MentionContext)
- func (userConfig *UserConfig) GetResponseMessage() (string, error)
- func (userConfig *UserConfig) IsActive() bool
- func (userConfig *UserConfig) RespondToFlow(flow, thread, siteLocation string) error
- func (userConfig *UserConfig) RespondToPerson(userID int64, siteLocation string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MentionContext ¶
type MentionContext struct { Message string Moment time.Time Flow string ThreadID string User string UserID int64 }
MentionContext gives context when in which way last mention was made
type UserConfig ¶
type UserConfig struct { Identity string // contains filtered or unexported fields }
UserConfig is a core structure that can communicate with Flowdock and is based on the contents stored in DB
func New ¶
func New(identity, messageFormat, flowdockUsername, flowdockToken string, activeFrom, activeUntil time.Time, lastCommunication map[string]time.Time) *UserConfig
New creates a new UserConfig structure
func (*UserConfig) GetNonAnsweredMentions ¶
func (userConfig *UserConfig) GetNonAnsweredMentions() (result map[string]*MentionContext)
GetNonAnsweredMentions returns when was direction mention last received, per user that executed the mention
func (*UserConfig) GetResponseMessage ¶
func (userConfig *UserConfig) GetResponseMessage() (string, error)
GetResponseMessage will return the active reponse message
func (*UserConfig) IsActive ¶
func (userConfig *UserConfig) IsActive() bool
IsActive returns true if the configuration table contains "active" configuration with value "true"
func (*UserConfig) RespondToFlow ¶
func (userConfig *UserConfig) RespondToFlow(flow, thread, siteLocation string) error
RespondToFlow allows to send a message to a certain flow/thread using Flowdock client
func (*UserConfig) RespondToPerson ¶
func (userConfig *UserConfig) RespondToPerson(userID int64, siteLocation string) error
RespondToPerson allows to send a private message to a certain user using Flowdock client