outputTypes

package
v0.0.0-...-89ac66d Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package outputTypes includes all valid output types that Icarus supports. outputtypes use the internal processed calendar structure and format it for the output.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetOutputHelp

func GetOutputHelp() string

GetOutputHelp returns a formatted help string for all available output types

func GetOutputTypes

func GetOutputTypes() map[string]BaseOutputType

GetOutputTypes returns a list of enabled output types

Types

type BaseOutputType

type BaseOutputType interface {
	// Initialize can add arguments to the argument parser.
	Initialize(parser *argparse.Parser) error
	// Generate generates the output based on the given calendar and writes it to writer
	Generate(calendar *ical.Calendar, writer io.Writer) error
	// GetHelp returns a help string about what the output produces
	GetHelp() string
}

The BaseOutputType is the basic interface for all output types

type ICSOutputType

type ICSOutputType struct{}

The ICSOutputType converts the internal calendar into the standardizes ICS format

func (*ICSOutputType) Generate

func (t *ICSOutputType) Generate(calendar *ical.Calendar, writer io.Writer) error

func (*ICSOutputType) GetHelp

func (t *ICSOutputType) GetHelp() string

func (*ICSOutputType) Initialize

func (t *ICSOutputType) Initialize(_ *argparse.Parser) error

type ListOutputType

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

The ListOutputType converts the internal calendar into a table format

func (*ListOutputType) Generate

func (t *ListOutputType) Generate(calendar *ical.Calendar, writer io.Writer) error

func (*ListOutputType) GetHelp

func (t *ListOutputType) GetHelp() string

func (*ListOutputType) Initialize

func (t *ListOutputType) Initialize(parser *argparse.Parser) error

Jump to

Keyboard shortcuts

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