Documentation
¶
Index ¶
Constants ¶
View Source
const ( Repository = "mattermost-plugin-apps" CommandTrigger = "apps" BotUsername = "appsbot" BotDisplayName = "Mattermost Apps" BotDescription = "Mattermost Apps Registry and API proxy." // TODO replace Interactive Dialogs with Modal, eliminate the need for // /dialog endpoints. InteractiveDialogPath = "/dialog" // Top-level path(s) for HTTP example apps. HelloHTTPPath = "/example/hello" // Top-level path for the REST APIs exposed by the plugin itself. APIPath = "/api/v1" // Top-level path for the Apps namespaces, followed by /AppID/subpath. AppsPath = "/apps" // OAuth2 sub-paths. PathOAuth2 = "/oauth2" // convention for Mattermost Apps, comes from OAuther PathOAuth2Complete = "/oauth2/complete" // convention for Mattermost Apps, comes from OAuther // Marketplace sub-paths. PathMarketplace = "/marketplace" // Other sub-paths. CallPath = "/call" KVPath = "/kv" SubscribePath = "/subscribe" UnsubscribePath = "/unsubscribe" StaticAssetPath = "/static" BindingsPath = "/bindings" WebSocketEventRefreshBindings = "refresh_bindings" )
Internal configuration apps.of mattermost-plugin-apps
View Source
const ( PropTeamID = "team_id" PropChannelID = "channel_id" PropPostID = "post_id" )
View Source
const OutgoingAuthHeader = "Mattermost-App-Authorization"
Variables ¶
View Source
var ErrNotABot = errors.New("not a bot")
Functions ¶
This section is empty.
Types ¶
type Admin ¶
type Admin interface {
ListApps() ([]*apps.App, md.MD, error)
GetApp(appID apps.AppID) (*apps.App, error)
InstallApp(*apps.Context, apps.SessionToken, *apps.InInstallApp) (*apps.App, md.MD, error)
UninstallApp(appID apps.AppID) error
ProvisionApp(*apps.Context, apps.SessionToken, *apps.InProvisionApp) (*apps.App, md.MD, error)
LoadAppsList() error
}
type AppServices ¶
type BuildConfig ¶
type Config ¶
type Config struct {
*StoredConfig
*BuildConfig
BotUserID string
MattermostSiteHostname string
MattermostSiteURL string
PluginURL string
PluginURLPath string
}
Config represents the the metadata handed to all request runners (command, http).
type ConfigMapper ¶
type ConfigMapper interface {
ConfigMap() (result map[string]interface{})
}
type Configurator ¶
type Configurator interface {
GetConfig() Config
GetMattermostConfig() *model.Config
RefreshConfig(*StoredConfig) error
StoreConfig(ConfigMapper) error
}
type JWTClaims ¶
type JWTClaims struct {
jwt.StandardClaims
ActingUserID string `json:"acting_user_id,omitempty"`
}
type ManifestStore ¶
type Service ¶
type Service struct {
Configurator Configurator
Mattermost *pluginapi.Client
Proxy Proxy
Admin Admin
AppServices AppServices
AWS AWS
}
type Store ¶
type Store interface {
App() AppStore
Sub() SubStore
Manifest() ManifestStore
}
type StoredConfig ¶
type StoredConfig struct {
Apps map[string]interface{}
AWSAccessKeyID string
AWSSecretAccessKey string
}
StoredConfig represents the data stored in and managed with the Mattermost config.
func (*StoredConfig) ConfigMap ¶
func (sc *StoredConfig) ConfigMap() map[string]interface{}
type SubStore ¶
type SubStore interface {
Get(subject apps.Subject, teamID, channelID string) ([]*apps.Subscription, error)
Save(sub *apps.Subscription) error
Delete(*apps.Subscription) error
}
Source Files
¶
Directories
¶
| Path | Synopsis |
|---|---|
|
impl
|
|
|
Package mock_api is a generated GoMock package.
|
Package mock_api is a generated GoMock package. |
Click to show internal directories.
Click to hide internal directories.