ics

package
v0.0.0-...-510b38a Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2021 License: BSD-2-Clause Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ErrInvalidQuotedString

func ErrInvalidQuotedString(line, col int) error

func ErrUnterminatedQuotedString

func ErrUnterminatedQuotedString(line, col int) error

Types

type ContentLine

type ContentLine string

ContentLine is an individual line of text in an iCalendar object. They must be delimited by a line break (CRLF sequence) and should not be longer than 75 bytes (excluding the line break). If a content line exceeds this length it can be split between any to characters by inserting a CRLF immediately followed by a single linear white-space character to preserve the content.

func UnfoldContentLine

func UnfoldContentLine(contentLine string) ContentLine

UnfoldContentLine creates a ContentLine which can be properly parsed at a later stage.

func (ContentLine) Fold

func (c ContentLine) Fold() string

Fold returns the line as a valid string representation of the ContentLine. The string will be properly delimited and broken if the line exceeds 75 bytes.

func (ContentLine) String

func (c ContentLine) String() string

String returns the ContentLine as its unchanged string representation.

type Parser

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

func NewParser

func NewParser(tokens []ast.Token) *Parser

func (*Parser) Parse

func (p *Parser) Parse() ([]ast.ContentLine, []error)

type Scanner

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

func NewScanner

func NewScanner(ics string) Scanner

NewScanner returns a new Scanner. Use it to scan the iCalendar source and produce tokens.

func (*Scanner) Scan

func (s *Scanner) Scan() ([]ast.Token, error)

type SyntaxError

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

func NewSyntaxError

func NewSyntaxError(token ast.Token, msg string) SyntaxError

func (SyntaxError) Error

func (s SyntaxError) Error() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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