Documentation ¶
Index ¶
Constants ¶
const ( // ApplicationName stores application name ApplicationName = "Anonymous plugin" // Repository stores repository Repository = "mattermost-plugin-anonymous" // CommandTrigger stores command trigger word CommandTrigger = "anonymous" // APIPath stores api prefix APIPath = "/api/v1" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
Config captures the plugin's external Config as exposed in the Mattermost server Config, as well as values computed from the Config. Any public fields will be deserialized from the Mattermost server Config in OnConfigurationChange.
As plugins are inherently concurrent (hooks being called asynchronously), and the plugin Config can change at any time, access to the Config must be synchronized. The strategy used in this plugin is to guard a pointer to the Config, and clone the entire struct whenever it changes. You may replace this with whatever strategy you choose.
If you add non-reference types to your Config struct, be sure to rewrite Clone as a deep copy appropriate for your types.
func FromContext ¶
FromContext loads context object from context