 Documentation
      ¶
      Documentation
      ¶
    
    
  
    
  
    Index ¶
Constants ¶
This section is empty.
Variables ¶
      View Source
      
  
var ErrUnsupportedFormat = errors.New("unsupported format")
    Functions ¶
This section is empty.
Types ¶
type JSONOutput ¶
type JSONOutput struct {
	// contains filtered or unexported fields
}
    func NewJSONOutput ¶
func NewJSONOutput() *JSONOutput
func NewRawOutput ¶
func NewRawOutput() *JSONOutput
func (*JSONOutput) MessageState ¶
func (o *JSONOutput) MessageState(src smsgateway.MessageState) (string, error)
func (*JSONOutput) Success ¶ added in v1.1.0
func (o *JSONOutput) Success() (string, error)
func (*JSONOutput) Webhook ¶ added in v1.1.0
func (o *JSONOutput) Webhook(src smsgateway.Webhook) (string, error)
func (*JSONOutput) Webhooks ¶ added in v1.1.0
func (o *JSONOutput) Webhooks(src []smsgateway.Webhook) (string, error)
type Renderer ¶
type Renderer interface {
	MessageState(src smsgateway.MessageState) (string, error)
	Webhook(src smsgateway.Webhook) (string, error)
	Webhooks(src []smsgateway.Webhook) (string, error)
	Success() (string, error)
}
    type TextOutput ¶
type TextOutput struct {
}
    func NewTextOutput ¶
func NewTextOutput() *TextOutput
func (*TextOutput) MessageState ¶
func (*TextOutput) MessageState(src smsgateway.MessageState) (string, error)
func (*TextOutput) Success ¶ added in v1.1.0
func (*TextOutput) Success() (string, error)
Success returns a string indicating success.
func (*TextOutput) Webhook ¶ added in v1.1.0
func (*TextOutput) Webhook(src smsgateway.Webhook) (string, error)
Webhook formats a single smsgateway.Webhook into a string representation. The output includes the ID, Event, and URL of the webhook.
func (*TextOutput) Webhooks ¶ added in v1.1.0
func (o *TextOutput) Webhooks(src []smsgateway.Webhook) (string, error)
Webhooks formats a slice of smsgateway.Webhook into a single string representation. Each webhook's string representation is separated by "---". Returns the formatted string and any error encountered during formatting.
 Click to show internal directories. 
   Click to hide internal directories.