messaging

package
v0.0.2 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MattermostClient

type MattermostClient interface {
	CreatePost(post *model.Post) (*model.Post, *model.Response, error)
}

MattermostClient is an interface that defines the methods we use from model.Client4

type MattermostMessenger

type MattermostMessenger struct {
	// contains filtered or unexported fields
}

MattermostMessenger implements the Messenger interface for Mattermost API

func NewMattermostMessenger

func NewMattermostMessenger(serverURL, token, channel string) *MattermostMessenger

NewMattermostMessenger creates a new MattermostMessenger

func (*MattermostMessenger) Send

func (m *MattermostMessenger) Send(message string) error

Send sends a message to Mattermost using the API

type MattermostWebhookMessenger

type MattermostWebhookMessenger struct {
	// contains filtered or unexported fields
}

MattermostWebhookMessenger implements the Messenger interface for Mattermost webhooks

func NewMattermostWebhookMessenger

func NewMattermostWebhookMessenger(webhookURL string) *MattermostWebhookMessenger

NewMattermostWebhookMessenger creates a new MattermostWebhookMessenger

func (*MattermostWebhookMessenger) Send

func (m *MattermostWebhookMessenger) Send(message string) error

Send sends a message to Mattermost using a webhook

type Messenger

type Messenger interface {
	Send(message string) error
}

Messenger is the interface for sending messages

Jump to

Keyboard shortcuts

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