Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Configuration ¶
type Configuration struct { AzureDevopsAPIBaseURL string `json:"azureDevopsAPIBaseURL"` AzureDevopsOAuthAppID string `json:"azureDevopsOAuthAppID"` AzureDevopsOAuthClientSecret string `jso:"azureDevopsOAuthClientSecret"` EncryptionSecret string `json:"EncryptionSecret"` MattermostSiteURL string }
Configuration captures the plugin's external configuration as exposed in the Mattermost server configuration, as well as values computed from the configuration. Any public fields will be deserialized from the Mattermost server configuration in OnConfigurationChange.
As plugins are inherently concurrent (hooks being called asynchronously), and the plugin configuration can change at any time, access to the configuration must be synchronized. The strategy used in this plugin is to guard a pointer to the configuration, 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 configuration struct, be sure to rewrite Clone as a deep copy appropriate for your types.
func (*Configuration) Clone ¶
func (c *Configuration) Clone() *Configuration
Clone shallow copies the configuration. Your implementation may require a deep copy if your configuration has reference types.
func (*Configuration) IsValid ¶
func (c *Configuration) IsValid() error
Used for config validations.
func (*Configuration) ProcessConfiguration ¶
func (c *Configuration) ProcessConfiguration() error
ProcessConfiguration used for post-processing on the configuration.