Documentation ¶
Index ¶
- Constants
- Variables
- type ChannelEventLink
- type DailySummaryUserSettings
- type Event
- type EventMetadata
- type EventStore
- type OAuth2StateStore
- type Settings
- type Store
- type Subscription
- type SubscriptionStore
- type User
- type UserIndex
- type UserShort
- type UserShortDTO
- type UserStore
- type WelcomeFlowStatus
- type WelcomeStore
Constants ¶
View Source
const ( UpdateStatusPropertyName = "update_status" GetConfirmationPropertyName = "get_confirmation" ReceiveNotificationsDuringMeetingName = "receive_notifications_during_meetings" SubscribePropertyName = "subscribe" ReceiveUpcomingEventReminderName = "receive_reminder" )
View Source
const ( UpdateStatusSettingID = "update_status" GetConfirmationSettingID = "get_confirmation" ReceiveNotificationsDuringMeetingID = "receive_notification" ReceiveRemindersSettingID = "get_reminders" DailySummarySettingID = "summary_setting" )
View Source
const ( UserKeyPrefix = "user_" UserIndexKeyPrefix = "userindex_" MattermostUserIDKeyPrefix = "mmuid_" OAuth2KeyPrefix = "oauth2_" SubscriptionKeyPrefix = "sub_" EventKeyPrefix = "ev_" WelcomeKeyPrefix = "welcome_" SettingsPanelPrefix = "settings_panel_" )
View Source
const OAuth2KeyExpiration = 15 * time.Minute
Variables ¶
View Source
var DefaultSettings = Settings{ GetConfirmation: false, ReceiveNotificationsDuringMeeting: true, }
View Source
var ErrNotFound = kvstore.ErrNotFound
Functions ¶
This section is empty.
Types ¶
type ChannelEventLink ¶
type DailySummaryUserSettings ¶
type DailySummaryUserSettings struct { PostTime string `json:"post_time"` // Kitchen format, i.e. 8:30AM Timezone string `json:"tz"` // Timezone in MSCal when PostTime is set/updated LastPostTime string `json:"last_post_time"` Enable bool `json:"enable"` }
func DefaultDailySummaryUserSettings ¶
func DefaultDailySummaryUserSettings() *DailySummaryUserSettings
type EventMetadata ¶
type EventMetadata struct {
LinkedChannelIDs map[string]struct{}
}
type EventStore ¶
type EventStore interface { LoadEventMetadata(eventID string) (*EventMetadata, error) StoreEventMetadata(eventID string, eventMeta *EventMetadata) error DeleteEventMetadata(eventID string) error AddLinkedChannelToEvent(eventID, channelID string) error DeleteLinkedChannelFromEvent(eventID, channelID string) error LoadUserEvent(mattermostUserID, eventID string) (*Event, error) StoreUserEvent(mattermostUserID string, event *Event) error DeleteUserEvent(mattermostUserID, eventID string) error }
type OAuth2StateStore ¶
type OAuth2StateStore interface { VerifyOAuth2State(state string) error StoreOAuth2State(state string) error }
OAuth2StateStore manages OAuth2 state
type Settings ¶
type Store ¶
type Store interface { UserStore OAuth2StateStore SubscriptionStore EventStore WelcomeStore flow.Store settingspanel.SettingStore settingspanel.PanelStore }
type Subscription ¶
type Subscription struct { PluginVersion string Remote *remote.Subscription MattermostCreatorID string }
type SubscriptionStore ¶
type SubscriptionStore interface { LoadSubscription(subscriptionID string) (*Subscription, error) StoreUserSubscription(user *User, subscription *Subscription) error DeleteUserSubscription(user *User, subscriptionID string) error }
type User ¶
type User struct { Settings Settings `json:"mattermostSettings,omitempty"` Remote *remote.User OAuth2Token *oauth2.Token PluginVersion string MattermostUserID string MattermostUsername string MattermostDisplayName string LastStatus string WelcomeFlowStatus WelcomeFlowStatus `json:"mattermostFlags,omitempty"` ActiveEvents []string `json:"events"` ChannelEvents ChannelEventLink `json:"linkedEvents,omitempty"` }
type UserIndex ¶
type UserIndex []*UserShort
func (UserIndex) ByMattermostID ¶
func (UserIndex) ByRemoteID ¶
func (UserIndex) GetMattermostUserIDs ¶
func (UserIndex) ToDTO ¶
func (index UserIndex) ToDTO() (result []UserShortDTO)
type UserShort ¶
type UserShort struct { MattermostUsername string `json:"mm_username"` MattermostDisplayName string `json:"mm_display_name"` MattermostUserID string `json:"mm_id"` RemoteID string `json:"remote_id"` Email string `json:"email"` }
func (UserShort) ToDTO ¶
func (us UserShort) ToDTO() UserShortDTO
type UserShortDTO ¶
type UserStore ¶
type UserStore interface { LoadUser(mattermostUserID string) (*User, error) LoadMattermostUserID(remoteUserID string) (string, error) LoadUserIndex() (UserIndex, error) SearchInUserIndex(term string, limit int) (UserIndex, error) StoreUser(user *User) error LoadUserFromIndex(mattermostUserID string) (*UserShort, error) DeleteUser(mattermostUserID string) error ModifyUserIndex(modify func(userIndex UserIndex) (UserIndex, error)) error StoreUserInIndex(user *User) error DeleteUserFromIndex(mattermostUserID string) error StoreUserActiveEvents(mattermostUserID string, events []string) error StoreUserLinkedEvent(mattermostUserID, eventID, channelID string) error }
type WelcomeFlowStatus ¶
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
Package mock_store is a generated GoMock package.
|
Package mock_store is a generated GoMock package. |
Click to show internal directories.
Click to hide internal directories.