backend

package
v0.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 1, 2023 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateTeam

func CreateTeam(mmTeam *mm_model.Team) *model.Team

func CreateTeamArray

func CreateTeamArray(array []*mm_model.Team) []*model.Team

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) GetTeams

func (mm *MattermostBackend) GetTeams() ([]*model.Team, error)

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 (mm *MattermostBackend) SendEmailToUser(user *model.User, subject string, body string) error

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

func (mm *MattermostBackend) SetUserPreference(user *model.User, name string, newValue any) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL