[MM-47542] Extend Plugin API (#21446)
* Extend Plugin API * Use Error, NoError in tests * Address suggestions * Simplify code * Add new line * Add featureflag and GetCollectionMetadataByIds hook * Add enter at the end of file * make build-templates * Fix test * Fix GetCollectionMetadataByIds ret type * Add GetTopicMetadataByIds hook * Add log * Extract i18n * Add experimental notice on hooks * Update model/feature_flags.go * Swap user to userId * Change userId to userID Co-authored-by: Jesse Hallam <jesse.hallam@gmail.com>
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
cc69c917f2
Коммит
b8da473da7
@@ -1157,6 +1157,17 @@ type API interface {
|
||||
//
|
||||
// Minimum server version: 7.1
|
||||
EnsureBotUser(bot *model.Bot) (string, error)
|
||||
|
||||
// RegisterCollectionAndTopic informs the server that this plugin handles
|
||||
// the given collection and topic types.
|
||||
//
|
||||
// It is an error for different plugins to register the same pair of types,
|
||||
// or even to register a new topic against another plugin's collection.
|
||||
//
|
||||
// EXPERIMENTAL: This API is experimental and can be changed without advance notice.
|
||||
//
|
||||
// Minimum server version: 7.6
|
||||
RegisterCollectionAndTopic(collectionType, topicType string) error
|
||||
}
|
||||
|
||||
var handshake = plugin.HandshakeConfig{
|
||||
|
||||
Ссылка в новой задаче
Block a user