outputTypes

package
v2.7.0 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2024 License: MIT Imports: 8 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, options OutputOptions) error
	// GetHelp returns a help string about what the output produces
	GetHelp() string
}

The BaseOutputType is the basic interface for all output types

type CSVOutputType added in v2.4.0

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

func (*CSVOutputType) Generate added in v2.4.0

func (t *CSVOutputType) Generate(calendar *ical.Calendar, writer io.Writer, options OutputOptions) error

func (*CSVOutputType) GetHelp added in v2.4.0

func (*CSVOutputType) GetHelp() string

func (*CSVOutputType) Initialize added in v2.4.0

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

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, _ OutputOptions) error

func (*ICSOutputType) GetHelp

func (t *ICSOutputType) GetHelp() string

func (*ICSOutputType) Initialize

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

type ListOutputType

type ListOutputType struct {
}

The ListOutputType converts the internal calendar into a table format

func (*ListOutputType) Generate

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

func (*ListOutputType) GetHelp

func (t *ListOutputType) GetHelp() string

func (*ListOutputType) Initialize

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

type OutputOptions added in v2.4.0

type OutputOptions struct {
	Columns []string
}

OutputOptions hold basic options for all output types

type TableOutputType added in v2.5.0

type TableOutputType struct {
}

The TableOutputType converts the internal calendar into a table format

func (*TableOutputType) Generate added in v2.5.0

func (t *TableOutputType) Generate(calendar *ical.Calendar, writer io.Writer, options OutputOptions) error

func (*TableOutputType) GetHelp added in v2.5.0

func (t *TableOutputType) GetHelp() string

func (*TableOutputType) Initialize added in v2.5.0

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

Jump to

Keyboard shortcuts

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