Documentation
¶
Overview ¶
Package mattermost is the gateway's Mattermost channel adapter, aimed at self-hosted servers. It listens on the server's WebSocket event stream (api/v4/websocket) for new posts and replies over the REST v4 API — no SDK, just net/http plus gorilla/websocket for the socket (the dependency is isolated here, guarded by TestVendorSDKsOnlyInTheirAdapters). The user creates a bot account, generates a bot access token, and puts the server base URL and token in the global .env as MATTERMOST_URL (e.g. https://mm.example.com) and MATTERMOST_TOKEN; messages and the token never leave the machines the user already runs.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Channel ¶
type Channel struct {
// contains filtered or unexported fields
}
Channel is a Mattermost bot connection.
func New ¶
New builds a Mattermost channel for the given server base URL and bot access token. mediaDir is the gateway media spool file attachments are downloaded into; "" disables attachment handling (messages still flow as text).
func (*Channel) Send ¶
Send posts a reply to a channel, split with the shared chunker to stay under Mattermost's per-post length cap. A non-2xx fails fast rather than retrying.