message

package
v0.0.0-...-28ad961 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Parse

func Parse(ctx context.Context, rd io.Reader, cfg Config) (chan Message, chan Error)

Types

type Block

type Block struct {
	Label   string
	Content string
	Fields  map[string][]string
	Blocks  []SubBlock
}

type Config

type Config struct {
	StopOnError bool
}

type Error

type Error struct {
	Line int
	Err  error
}

func (Error) Error

func (err Error) Error() string

func (Error) String

func (err Error) String() string

type Message

type Message struct {
	Line        int
	Raw         string
	BasicHeader Block
	AppHeader   Block
	UsrHeader   Block
	Body        map[string][]string
	Trailers    Block
}

type SubBlock

type SubBlock struct {
	Label   string
	Content string
}

Jump to

Keyboard shortcuts

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