Documentation ¶
Index ¶
- func CreateTeam(mmTeam *mm_model.Team) *model.Team
- func CreateTeamArray(array []*mm_model.Team) []*model.Team
- type MANKVStore
- type MattermostBackend
- func (mm *MattermostBackend) GetChannel(channelID string) (*model.Channel, error)
- func (mm *MattermostBackend) GetChannelMembersForUser(teamID string, userID string, includeDirectMessages bool) ([]*model.ChannelMembership, error)
- func (mm *MattermostBackend) GetChannelPosts(channelID string, fromt int64, tot int64) ([]*model.Post, error)
- func (mm *MattermostBackend) GetLastNotifiedTimestamp() (time.Time, error)
- func (mm *MattermostBackend) GetNotifiableUsers() ([]*model.User, error)
- func (mm *MattermostBackend) GetPreferencesForUser(userID string) model.MANUserPreferences
- func (mm *MattermostBackend) GetReadmeContent() string
- func (mm *MattermostBackend) GetServerName() string
- func (mm *MattermostBackend) GetServerURL() string
- func (mm *MattermostBackend) GetTeams() ([]*model.Team, error)
- func (mm *MattermostBackend) GetTeamsForUser(userID string) ([]*model.Team, error)
- func (mm *MattermostBackend) GetTemplatesPath() string
- func (mm *MattermostBackend) GetUser(userID string) (*model.User, error)
- func (mm *MattermostBackend) GetUsersStatus() (map[string]string, error)
- func (mm *MattermostBackend) IsEmailVerificationEnabled() bool
- func (mm *MattermostBackend) IsUserFollowingPost(postID string, userID string) bool
- func (mm *MattermostBackend) LogDebug(message string, a ...any)
- func (mm *MattermostBackend) LogError(message string, a ...any)
- func (mm *MattermostBackend) LogInfo(message string, a ...any)
- func (mm *MattermostBackend) LogWarn(message string, a ...any)
- func (mm *MattermostBackend) ResetAllUserPrefernces() error
- func (mm *MattermostBackend) ResetPreferences(user *model.User) error
- func (mm *MattermostBackend) SendEmailToUser(user *model.User, subject string, body string) error
- func (mm *MattermostBackend) SetLastNotifiedTimestamp(value time.Time) error
- func (mm *MattermostBackend) SetPreferencesForUser(userID string, prefs model.MANUserPreferences) error
- func (mm *MattermostBackend) SetUserPreference(user *model.User, name string, newValue any) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type MANKVStore ¶
type MANKVStore struct { UserPreferences map[string]model.MANUserPreferences LastNotifiedTimestamp int64 }
type MattermostBackend ¶
type MattermostBackend struct {
// contains filtered or unexported fields
}
func NewMattermostBackend ¶
func NewMattermostBackend(api plugin.API, db *sql.DB, cacheExpiryTime int, enableDebugLog bool, defaultUserPrefs *model.MANUserPreferences) (*MattermostBackend, error)
func (*MattermostBackend) GetChannel ¶
func (mm *MattermostBackend) GetChannel(channelID string) (*model.Channel, error)
func (*MattermostBackend) GetChannelMembersForUser ¶
func (mm *MattermostBackend) GetChannelMembersForUser(teamID string, userID string, includeDirectMessages bool) ([]*model.ChannelMembership, error)
func (*MattermostBackend) GetChannelPosts ¶
func (mm *MattermostBackend) GetChannelPosts(channelID string, fromt int64, tot int64) ([]*model.Post, error)
returns the list of posts in a channel between two given timestamp. The returned list of posts also includes root posts even of the requested range to let the caller be able to rebuild the threads. results are returned from the oldest to the newer with root posts at the beginning
func (*MattermostBackend) GetLastNotifiedTimestamp ¶
func (mm *MattermostBackend) GetLastNotifiedTimestamp() (time.Time, error)
func (*MattermostBackend) GetNotifiableUsers ¶
func (mm *MattermostBackend) GetNotifiableUsers() ([]*model.User, error)
func (*MattermostBackend) GetPreferencesForUser ¶
func (mm *MattermostBackend) GetPreferencesForUser(userID string) model.MANUserPreferences
func (*MattermostBackend) GetReadmeContent ¶
func (mm *MattermostBackend) GetReadmeContent() string
func (*MattermostBackend) GetServerName ¶
func (mm *MattermostBackend) GetServerName() string
func (*MattermostBackend) GetServerURL ¶
func (mm *MattermostBackend) GetServerURL() string
func (*MattermostBackend) GetTeamsForUser ¶
func (mm *MattermostBackend) GetTeamsForUser(userID string) ([]*model.Team, error)
func (*MattermostBackend) GetTemplatesPath ¶
func (mm *MattermostBackend) GetTemplatesPath() string
func (*MattermostBackend) GetUser ¶
func (mm *MattermostBackend) GetUser(userID string) (*model.User, error)
func (*MattermostBackend) GetUsersStatus ¶
func (mm *MattermostBackend) GetUsersStatus() (map[string]string, error)
Called by the status tracker to get the status of all users. It is lighter than calling loadUsers
func (*MattermostBackend) IsEmailVerificationEnabled ¶
func (mm *MattermostBackend) IsEmailVerificationEnabled() bool
func (*MattermostBackend) IsUserFollowingPost ¶
func (mm *MattermostBackend) IsUserFollowingPost(postID string, userID string) bool
func (*MattermostBackend) LogDebug ¶
func (mm *MattermostBackend) LogDebug(message string, a ...any)
func (*MattermostBackend) LogError ¶
func (mm *MattermostBackend) LogError(message string, a ...any)
func (*MattermostBackend) LogInfo ¶
func (mm *MattermostBackend) LogInfo(message string, a ...any)
func (*MattermostBackend) LogWarn ¶
func (mm *MattermostBackend) LogWarn(message string, a ...any)
func (*MattermostBackend) ResetAllUserPrefernces ¶ added in v0.1.1
func (mm *MattermostBackend) ResetAllUserPrefernces() error
func (*MattermostBackend) ResetPreferences ¶ added in v0.1.1
func (mm *MattermostBackend) ResetPreferences(user *model.User) error
func (*MattermostBackend) SendEmailToUser ¶
func (*MattermostBackend) SetLastNotifiedTimestamp ¶
func (mm *MattermostBackend) SetLastNotifiedTimestamp(value time.Time) error
func (*MattermostBackend) SetPreferencesForUser ¶
func (mm *MattermostBackend) SetPreferencesForUser(userID string, prefs model.MANUserPreferences) error
func (*MattermostBackend) SetUserPreference ¶ added in v0.1.1
Click to show internal directories.
Click to hide internal directories.