plugin

package
v0.0.0-...-0593e73 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 18, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Plugin

type Plugin struct {
	plugin.MattermostPlugin
	// contains filtered or unexported fields
}

func New

func New(build *config.BuildConfig) *Plugin

func (*Plugin) Clean

func (p *Plugin) Clean() error

func (*Plugin) ExecuteCommand

func (p *Plugin) ExecuteCommand(c *plugin.Context, args *model.CommandArgs) (*model.CommandResponse, *model.AppError)

func (*Plugin) GetBotUserID

func (p *Plugin) GetBotUserID() string

func (*Plugin) GetConfig

func (p *Plugin) GetConfig(ref interface{}) error

func (*Plugin) GetMattermostConfig

func (p *Plugin) GetMattermostConfig() *model.Config

func (*Plugin) GetMattermostUser

func (p *Plugin) GetMattermostUser(mattermostUserID string) (*model.User, error)

func (*Plugin) GetMattermostUserByUsername

func (p *Plugin) GetMattermostUserByUsername(mattermostUsername string) (*model.User, error)

func (*Plugin) IsPluginAdmin

func (p *Plugin) IsPluginAdmin(mattermostUserID string) (bool, error)

IsPluginAdmin returns true if the user is authorized to use the plugin's admin-level APIs/commands.

func (*Plugin) OnActivate

func (p *Plugin) OnActivate() error

func (*Plugin) OnConfigurationChange

func (p *Plugin) OnConfigurationChange() error

func (*Plugin) SaveConfig

func (p *Plugin) SaveConfig(conf config.Mapper)

func (*Plugin) SendEphemeralPost

func (p *Plugin) SendEphemeralPost(channelID, userID, message string)

func (*Plugin) ServeHTTP

func (p *Plugin) ServeHTTP(pc *plugin.Context, w http.ResponseWriter, req *http.Request)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL