mmclient

package
v0.0.0-...-93f332f Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MMClient

type MMClient struct {
	Client           *model.Client4
	WebSocketClient  *model.WebSocketClient
	BotUser          *model.User
	BotTeam          *model.Team
	DebuggingChannel *model.Channel
	Server           Server
	SettingsUrl      string
	// contains filtered or unexported fields
}

func NewMMClient

func NewMMClient(cfg *settings.Config) (client *MMClient, err error)

Documentation for the Go driver can be found at https://godoc.org/github.com/mattermost/platform/model#Client

func (*MMClient) CreateDebuggingChannelIfNeeded

func (c *MMClient) CreateDebuggingChannelIfNeeded() error

func (*MMClient) GetChannel

func (c *MMClient) GetChannel(name string) (*model.Channel, *model.Response)

This function came from the original sample code. It sucks. Use GetChannelByName instead.

func (*MMClient) GetChannelByName

func (c *MMClient) GetChannelByName(name string) (*model.Channel, error)

This function returns a proper error so you can know what the heck is going on

func (*MMClient) GetTeam

func (c *MMClient) GetTeam() (*model.Team, error)

func (*MMClient) LoginAsUser

func (c *MMClient) LoginAsUser() (*model.User, error)

func (*MMClient) NewWebSocketClient

func (c *MMClient) NewWebSocketClient() (*model.WebSocketClient, error)

func (*MMClient) PingServer

func (c *MMClient) PingServer()

func (*MMClient) SendCmdToChannel

func (c *MMClient) SendCmdToChannel(cmd string, channelId string, prePost *model.Post) error

func (*MMClient) SendMsgToChannel

func (c *MMClient) SendMsgToChannel(msg string, channelId string, prePost *model.Post) error

func (*MMClient) SendMsgToDebuggingChannel

func (c *MMClient) SendMsgToDebuggingChannel(msg string, replyToId string) error

func (*MMClient) SetupGracefulShutdown

func (c *MMClient) SetupGracefulShutdown()

func (*MMClient) UpdateUserIfNeeded

func (c *MMClient) UpdateUserIfNeeded() error

type Server

type Server struct {
	HOST     string `yaml:"host"`
	PROTOCOL string `yaml:"protocol"`
	PORT     string `yaml:"port"`
}

Jump to

Keyboard shortcuts

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