Documentation
¶
Index ¶
Constants ¶
View Source
const Module = "slack"
Module tags every error in this package for goravel/framework's error-module system.
Variables ¶
View Source
var ( ErrorEmptyRoute = errors.New("slack channel: %T.RouteNotificationFor(\"slack\") returned empty channel/route").SetModule(Module) ErrorMarshalPayload = errors.New("slack channel: failed to marshal payload for %T: %v").SetModule(Module) ErrorUnmarshalPayload = errors.New("slack channel: failed to unmarshal payload: %v").SetModule(Module) ErrorPostMessageFailed = errors.New("slack channel: chat.postMessage failed: %v").SetModule(Module) ErrorTokenNotConfigured = errors.New("slack channel: no bot token configured (set SLACK_BOT_TOKEN or slack.token)").SetModule(Module) )
Named error constructors for this package, per goravel/framework's convention of declaring errors centrally rather than inline. %v is used throughout, not %w — this error type's Error() method uses fmt.Sprintf, which doesn't support %w.
Functions ¶
This section is empty.
Types ¶
type Channel ¶
type Channel struct {
// contains filtered or unexported fields
}
Channel delivers notifications to Slack via chat.postMessage.
func (*Channel) Resolve ¶
func (c *Channel) Resolve( notifiable contractsnotification.Notifiable, n contractsnotification.Notification, ) (string, []byte, error)
func (*Channel) Send ¶
func (c *Channel) Send( notifiable contractsnotification.Notifiable, n contractsnotification.Notification, ) error
type ServiceProvider ¶
type ServiceProvider struct{}
func (*ServiceProvider) Boot ¶
func (r *ServiceProvider) Boot(app foundation.Application)
func (*ServiceProvider) Register ¶
func (r *ServiceProvider) Register(app foundation.Application)
func (*ServiceProvider) Relationship ¶
func (r *ServiceProvider) Relationship() binding.Relationship
Click to show internal directories.
Click to hide internal directories.