Help us shape the future of Go! Take the 2026 Go Developer Survey

sender

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsError

func IsError(err error, kind ErrorKind) bool

Types

type AppleScriptSender

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

func NewAppleScriptSender

func NewAppleScriptSender() *AppleScriptSender

func (*AppleScriptSender) Send

func (s *AppleScriptSender) Send(ctx context.Context, target SendTarget, text string) error

type ErrorKind

type ErrorKind string
const (
	ErrorInvalidTarget ErrorKind = "invalid_target"
	ErrorEmptyMessage  ErrorKind = "empty_message"
	ErrorUnsupported   ErrorKind = "unsupported_target"
	ErrorPermission    ErrorKind = "automation_permission"
	ErrorUnavailable   ErrorKind = "messages_unavailable"
	ErrorRecipient     ErrorKind = "recipient_unavailable"
	ErrorNotFound      ErrorKind = "chat_not_found"
	ErrorTimeout       ErrorKind = "timeout"
	ErrorScript        ErrorKind = "script_error"
	ErrorProcess       ErrorKind = "process_error"
)

type SendError

type SendError struct {
	Kind ErrorKind
	Err  error
}

func (*SendError) Error

func (e *SendError) Error() string

func (*SendError) Unwrap

func (e *SendError) Unwrap() error

type SendTarget

type SendTarget struct {
	ChatID  messages.ChatID
	GUID    string
	Service string
	IsGroup bool
}

type Sender

type Sender interface {
	Send(context.Context, SendTarget, string) error
}

Jump to

Keyboard shortcuts

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