Commit Graph

8 Commits

Author SHA1 Message Date
Agniva De Sarker
c1dd23a3c8 MM-31063: Change constants to use CamelCase (#16608)
* MM-31063: Change constants to use CamelCase

* store package

* change allcaps to camel case (#16615)

* New tools.mod

Co-authored-by: Ibrahim Serdar Acikgoz <serdaracikgoz86@gmail.com>
2021-01-04 11:32:29 +05:30
Maria A Nunez
f257109953 Revert "MM-16809: Added EnsureChannel Helper (#11852)" (#12314)
This reverts commit 5aa24aedc8.
2019-09-24 13:48:33 -04:00
Ankit R. Gadiya
5aa24aedc8 MM-16809: Added EnsureChannel Helper (#11852)
This PR adds EnsureChannel helper analogous to EnsureBot helper which creates a new channel if not exists and update the meta data of the channel if exists. Also, it will throw error
if the type of existing channel do not match the type of new channel.
2019-09-03 22:18:08 +02:00
Christopher Speller
66cb36f5dc Move setting plugin helpers to a seperate function to avoid breaking changes. (#10809) 2019-05-08 14:54:52 -04:00
Christopher Speller
6d336e0666 Adding EnsureBot plugin helper. (#10542)
* Adding EnsureBot plugin helper.

* Removing unessisary GetBot call.

* Moving to own file and error handling cleanup.

* Removing patch functionaliy. Plugins should manage their own bot account updates for now.

* Adding tests and cleaning up errors.

* Modify to not shadow err.

* Moving helpers to seperate interface.

* Feedback fixes
2019-05-06 12:44:38 -07:00
Jesse Hallam
580b546862 MM-12193: remove auto unmarshalling (#9519)
* MM-12193: remove auto configuration unmarshalling

Since plugin hook events are called concurrently, there's no way for the plugin framework to coordinate safe access to the automatically unmarshalled configuration fields. Remove this functionality, and update documentation to illustrate a safe way to do this.

* better Fprint example

* fix unit tests

* log when OnConfigurationChange fails through OnActivate

* clarify lifecycle when OnConfigurationChange returns an error

* call SetAPI even if OnConfigurationChange not implemented
2018-10-03 13:13:19 -04:00
Jesse Hallam
17f211c393 MM-11292: clean up plugins GoDoc (#9109)
* clean up plugins GoDoc:

- eliminate plugin.NewBlankContext() as unnecessary
- export ValidIdRegex as a string vs. the less readable var
- add/update various documentation strings
- hide everything by default, except where used by client plugins or the mattermost-server. The exception to this rule are the `*(Args|Returns)` structs which must be public for go-plugin, but are now prefixed with `Z_` with a warning not to use.
- include a top-level example to get plugin authors started

This is not a breaking change for existing plugins compiled against
plugins-v2.

* remove commented out ServeHTTPResponseWriter

* update examples to match developer docs

* add missing plugin/doc.go license header
2018-07-13 10:29:50 -04:00
Christopher Speller
1e5c432e10 MM-10702 Moving plugins to use hashicorp go-plugin. (#8978)
* Moving plugins to use hashicorp go-plugin.

* Tweaks from feedback.
2018-06-25 12:33:13 -07:00