| 1 |
// Package types provides the core type definitions and interfaces used throughout |
| 2 |
// the shoutrrr notification library. |
| 3 |
// |
| 4 |
// This package defines the fundamental abstractions for notification services, |
| 5 |
// including service interfaces, configuration types, message structures, and |
| 6 |
// supporting utilities that enable consistent interaction with various |
| 7 |
// notification channels. |
| 8 |
// |
| 9 |
// # Core Interfaces |
| 10 |
// |
| 11 |
// The package defines several key interfaces that form the foundation of |
| 12 |
// shoutrrr's architecture: |
| 13 |
// |
| 14 |
// - Service: The primary interface for all notification services, combining |
| 15 |
// sending, templating, and lifecycle management capabilities. |
| 16 |
// - Sender: Defines the basic contract for sending notifications. |
| 17 |
// - Templater: Provides template management for message formatting. |
| 18 |
// - ServiceConfig: Common interface for service configuration types. |
| 19 |
// - Generator: Interface for tools that generate service configurations. |
| 20 |
// |
| 21 |
// # Message Types |
| 22 |
// |
| 23 |
// Message handling is supported through several types: |
| 24 |
// |
| 25 |
// - MessageItem: Represents an individual notification entry with text, |
| 26 |
// timestamp, level, and optional fields or file attachments. |
| 27 |
// - MessageLevel: Denotes the urgency/severity of a message (Unknown, Debug, |
| 28 |
// Info, Warning, Error). |
| 29 |
// - Field: Key/value pairs for extra data in log messages. |
| 30 |
// - File: Represents file attachments for messages. |
| 31 |
// |
| 32 |
// # Configuration Types |
| 33 |
// |
| 34 |
// Configuration management types include: |
| 35 |
// |
| 36 |
// - Params: A string map for providing additional variables to service |
| 37 |
// templates, with helper methods for setting and retrieving common |
| 38 |
// parameters like title and message. |
| 39 |
// - ServiceOpts: Interface describing service options including verbosity, |
| 40 |
// logging, and properties. |
| 41 |
// - ConfigQueryResolver: Interface for getting, setting, and listing service |
| 42 |
// config query fields. |
| 43 |
// |
| 44 |
// # Supporting Types |
| 45 |
// |
| 46 |
// Additional utility types provided by the package: |
| 47 |
// |
| 48 |
// - EnumFormatter: Handles formatting of enumerated configuration values. |
| 49 |
// - StdLogger: Standard logging interface used by services. |
| 50 |
// - QueuedSender: Interface for senders that support message queuing. |
| 51 |
// - RichSender: Interface for senders supporting rich message content. |
| 52 |
// - CustomURLConfig: Interface for configurations that support custom URL |
| 53 |
// resolution. |
| 54 |
// - MessageLimit: Defines limits for message content. |
| 55 |
// |
| 56 |
// The types in this package are designed to be used by both service |
| 57 |
// implementers and consumers of the shoutrrr library, providing a consistent |
| 58 |
// and extensible foundation for notification functionality. |
| 59 |
package types |