output

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrUnsupportedFormat = errors.New("unsupported format")

Functions

This section is empty.

Types

type Format

type Format string
const (
	Text Format = "text"
	JSON Format = "json"
	RAW  Format = "raw"
)

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)

type Renderer

type Renderer interface {
	MessageState(src smsgateway.MessageState) (string, error)
}

func New

func New(format Format) (Renderer, error)

type TextOutput

type TextOutput struct {
}

func NewTextOutput

func NewTextOutput() *TextOutput

func (*TextOutput) MessageState

func (*TextOutput) MessageState(src smsgateway.MessageState) (string, error)

Jump to

Keyboard shortcuts

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