github.com/mattermost/mattermost-plugin-api@v0.1.4/example_client_test.go (about)

     1  package pluginapi_test
     2  
     3  import (
     4  	pluginapi "github.com/mattermost/mattermost-plugin-api"
     5  
     6  	"github.com/mattermost/mattermost-server/v6/plugin"
     7  )
     8  
     9  type Plugin struct {
    10  	plugin.MattermostPlugin
    11  	client *pluginapi.Client
    12  }
    13  
    14  func (p *Plugin) OnActivate() error {
    15  	p.client = pluginapi.NewClient(p.API, p.Driver)
    16  
    17  	return nil
    18  }
    19  
    20  func Example() {
    21  }