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
Harshil Sharma
dea705969c
MM-13934 - Plugin helper function EnsureBot doesn't compare bot details ( #14103 )
2020-05-27 14:48:43 +02:00
Claudio Costa
1e53fe85ad
[MM-21378] Add mutex to model.Post to guard against race conditions on Post.Props ( #13884 )
...
* Add mutex to model.Post to guard against race conditions on Post.Props
* Rename mutex
* Add GetProp() method to Post
* Fix more tests
* Fix flaky test
Benchmarks:
BenchmarkPostPropsGet_indirect
BenchmarkPostPropsGet_indirect-2 85026746 13.0 ns/op 0 B/op 0 allocs/op
BenchmarkPostPropsGet_indirect-4 90273747 13.0 ns/op 0 B/op 0 allocs/op
BenchmarkPostPropsGet_indirect-8 88324293 13.0 ns/op 0 B/op 0 allocs/op
BenchmarkPostPropsGet_indirect-16 91427720 13.1 ns/op 0 B/op 0 allocs/op
BenchmarkPostPropsGet_direct
BenchmarkPostPropsGet_direct-2 1000000000 0.242 ns/op 0 B/op 0 allocs/op
BenchmarkPostPropsGet_direct-4 1000000000 0.241 ns/op 0 B/op 0 allocs/op
BenchmarkPostPropsGet_direct-8 1000000000 0.240 ns/op 0 B/op 0 allocs/op
BenchmarkPostPropsGet_direct-16 1000000000 0.241 ns/op 0 B/op 0 allocs/op
BenchmarkPostPropsAdd_indirect
BenchmarkPostPropsAdd_indirect-2 5602224 203 ns/op 336 B/op 2 allocs/op
BenchmarkPostPropsAdd_indirect-4 5959496 206 ns/op 336 B/op 2 allocs/op
BenchmarkPostPropsAdd_indirect-8 5833999 205 ns/op 336 B/op 2 allocs/op
BenchmarkPostPropsAdd_indirect-16 5802493 225 ns/op 336 B/op 2 allocs/op
BenchmarkPostPropsAdd_direct
BenchmarkPostPropsAdd_direct-2 100000000 11.3 ns/op 0 B/op 0 allocs/op
BenchmarkPostPropsAdd_direct-4 100000000 11.3 ns/op 0 B/op 0 allocs/op
BenchmarkPostPropsAdd_direct-8 100000000 11.6 ns/op 0 B/op 0 allocs/op
BenchmarkPostPropsAdd_direct-16 99840794 11.4 ns/op 0 B/op 0 allocs/op
BenchmarkPostPropsDel_indirect
BenchmarkPostPropsDel_indirect-2 18824002 61.9 ns/op 48 B/op 1 allocs/op
BenchmarkPostPropsDel_indirect-4 19470736 63.8 ns/op 48 B/op 1 allocs/op
BenchmarkPostPropsDel_indirect-8 17640460 65.3 ns/op 48 B/op 1 allocs/op
BenchmarkPostPropsDel_indirect-16 18692962 65.4 ns/op 48 B/op 1 allocs/op
BenchmarkPostPropsDel_direct
BenchmarkPostPropsDel_direct-2 516257440 2.34 ns/op 0 B/op 0 allocs/op
BenchmarkPostPropsDel_direct-4 514865216 2.43 ns/op 0 B/op 0 allocs/op
BenchmarkPostPropsDel_direct-8 511330477 2.37 ns/op 0 B/op 0 allocs/op
BenchmarkPostPropsDel_direct-16 499504010 2.38 ns/op 0 B/op 0 allocs/op
2020-03-13 21:12:20 +01:00
Vladimir Lebedev
722924b910
MM-19508 Extend ShouldProcessMessage to filter out from_webhoo… ( #13270 )
...
Extend ShouldProcessMessage to filter out from_webhook posts
2019-12-19 20:52:41 +01:00
Ben Schumacher
5122b9e292
[MM-20723] Add golint for plugin package to golangci ( #13090 )
2019-12-05 20:31:53 +01:00
Miguel de la Cruz
2259b7f2a8
[MM-19948] Set version on module file and internal paths ( #13186 )
...
* [MM-19948] Set version on module file and internal paths
* Fixes after merge
* Fix i18n checker error
2019-11-28 14:39:38 +01:00
Rajat Varyani
f2fcfa8f9d
[MM-16709] Add helper method for plugins using MessageHasBeenPosted ( #12539 )
...
The PR introduces a method in helper interface. The method has common code for filtering to be used across plugins which use MessageHasBeenPosted.
2019-11-18 10:47:32 +01:00
Alex Sahin
6b0a88debf
[MM-17297] Extend EnsureBot helper to include bot images ( #12153 )
2019-11-15 05:19:00 +01:00
Andres
1155b08404
MM - 19155 Change plugin helpers files to be golint complied ( #12686 )
...
* MM-19155 Change plugin helpers files to be golint complied
* add makefile target that checks if plugin/helpers files are golint
compliant
* MM-19155 - Change plugin helpers files to be golint complied
* added comment documentation to exported plugin/helpers methods
* changed variable names to be compliant with golint
* Address feedback
2019-11-12 06:29:21 +01:00
Rajat Varyani
14b1777959
[MM-19153] Add server version check in helper methods for plugins ( #12675 )
2019-11-06 17:42:46 +01:00
Jesper Hansen
b464f31b38
Add progressive backoff function ( #11497 )
...
* [MM-15267] Utils: add backoff function to allow retries (#10958 )
* [MM-15267] Utils: add unit test and update retry logic (#10958 )
* [MM-15267] Utils: Add three retries to ProgressiveRetry (#10958 )
* [MM-15267] Utils: add comments for progressive retry (#10958 )
* [MM-15267] Utils: add license header to newly added file (#10958 )
* [MM-15267] Utils: fix typo (#10958 )
* [MM-15267] Utils: inline callback in function call (#10958 )
* [MM-15267] Utils: remove type definition for backoff callback function (#10958 )
* [MM-15267] Utils: use lookup table for timeout duration (#10958 )
* [MM-15267] Utils: table driven unit tests for Progressive Backoff (#10958 )
* [MM-15267] Utils: simplify retry function (#10958 )
* [MM-15267] Utils: add assert and require packages to test file (#10958 )
* [MM-15267] Utils: revert changes in go.mod and go.sum (#10958 )
2019-07-10 15:59:18 -03:00
Jesse Hallam
620d941b6e
MM-8602: KV Store Json helper tweaks ( #11502 )
...
* move kv helpers to helpers_kv*.go
* change KVGetJSON return signature
Return a boolean and an error, to clearly indicate if no value was found and thus no value unmarshalled into the target interface.
Also fix an issue with CompareAndSet to allow an oldValue of nil (i.e.
expected to be unset).
* add missing license
* tweak documentation
* document KVSetWithExpiryJSON minimum version
2019-07-05 17:33:39 -03:00
Zachary Romero
46f2b18e4f
Add KV helper methods to Helpers interface ( #11307 )
...
* Add KV helper methods to Helpers interface
* Address code-review comments, add unit tests
* Update documentation for KVCompareAndSetJSON.
* Update assertions for helpers_bots_test.go
* Fix assertion not called name in test.
2019-06-28 09:27:46 -04:00
Christopher Speller
31d695f951
Preventing plugin startup failure if bot account already exists as regular user. ( #11077 )
2019-06-10 07:39:42 -07: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