formatter

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: May 30, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Filter

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

func NewFilter

func NewFilter(server, typ string) *Filter

func (Filter) Pass

func (f Filter) Pass(msg MessageWrap) bool

type Formatter

type Formatter interface {
	Format(msg MessageWrap) (string, bool)
}

func New

func New(format, server, typ string, n int) Formatter

type MessageWrap

type MessageWrap struct {
	When     time.Time      `json:"time" yaml:"time"`
	Size     int            `json:"size" yaml:"size"`
	Duration time.Duration  `json:"duration" yaml:"duration"`
	Device   string         `json:"device" yaml:"device"`
	Server   string         `json:"server" yaml:"server"`
	Msg      *codec.Message `json:"message" yaml:"message"`
}

Jump to

Keyboard shortcuts

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