adapters

package
v2.4.0 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package adapters holds CLI adapters that connect the icarus CLI to the processors

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Adapter

type Adapter interface {
	// Initialize creates a new subcommand for the argparse parser.
	Initialize(parser *argparse.Parser) (*argparse.Command, error)
	// SetToolbox sets the toolbox that can be used by the processor
	SetToolbox(toolbox processors.Toolbox)
	// Process processes the incoming calendar and fills the output calendar
	Process(input ical.Calendar, output *ical.Calendar) error
}

The Adapter connects the Icarus CLI with a processor

func GetAdapters

func GetAdapters() []Adapter

GetAdapters returns a list of enabled processor adapters

type AddAlarmAdapter

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

The AddAlarmAdapter adds an alarm definition to all selected events

func (*AddAlarmAdapter) Initialize

func (a *AddAlarmAdapter) Initialize(parser *argparse.Parser) (*argparse.Command, error)

func (*AddAlarmAdapter) Process

func (a *AddAlarmAdapter) Process(input ical.Calendar, output *ical.Calendar) error

func (*AddAlarmAdapter) SetToolbox

func (a *AddAlarmAdapter) SetToolbox(toolbox processors.Toolbox)

type AddDTStampAdapter

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

The AddDTStampAdapter adds a DTSTAMP field to all selected events

func (*AddDTStampAdapter) Initialize

func (t *AddDTStampAdapter) Initialize(parser *argparse.Parser) (*argparse.Command, error)

func (*AddDTStampAdapter) Process

func (t *AddDTStampAdapter) Process(input ical.Calendar, output *ical.Calendar) error

func (*AddDTStampAdapter) SetToolbox

func (t *AddDTStampAdapter) SetToolbox(toolbox processors.Toolbox)

type AddPropertyAdapter

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

The AddPropertyAdapter adds an ICS property to each selected event

func (*AddPropertyAdapter) Initialize

func (a *AddPropertyAdapter) Initialize(parser *argparse.Parser) (*argparse.Command, error)

func (*AddPropertyAdapter) Process

func (a *AddPropertyAdapter) Process(input ical.Calendar, output *ical.Calendar) error

func (*AddPropertyAdapter) SetToolbox

func (a *AddPropertyAdapter) SetToolbox(toolbox processors.Toolbox)

type ConvertAllDayAdapter

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

The ConvertAllDayAdapter converts all-day events to timed events or vice versa

func (*ConvertAllDayAdapter) Initialize

func (c *ConvertAllDayAdapter) Initialize(parser *argparse.Parser) (*argparse.Command, error)

func (*ConvertAllDayAdapter) Process

func (c *ConvertAllDayAdapter) Process(input ical.Calendar, output *ical.Calendar) error

func (*ConvertAllDayAdapter) SetToolbox

func (c *ConvertAllDayAdapter) SetToolbox(toolbox processors.Toolbox)

type DeletePropertyAdapter

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

The DeletePropertyAdapter deletes an ICS property from all selected events

func (*DeletePropertyAdapter) Initialize

func (d *DeletePropertyAdapter) Initialize(parser *argparse.Parser) (*argparse.Command, error)

func (*DeletePropertyAdapter) Process

func (d *DeletePropertyAdapter) Process(input ical.Calendar, output *ical.Calendar) error

func (*DeletePropertyAdapter) SetToolbox

func (d *DeletePropertyAdapter) SetToolbox(toolbox processors.Toolbox)

type FilterAdapter

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

The FilterAdapter filters the calendar for selected events

func (*FilterAdapter) Initialize

func (f *FilterAdapter) Initialize(parser *argparse.Parser) (*argparse.Command, error)

func (*FilterAdapter) Process

func (f *FilterAdapter) Process(input ical.Calendar, output *ical.Calendar) error

func (*FilterAdapter) SetToolbox

func (f *FilterAdapter) SetToolbox(toolbox processors.Toolbox)

type PrintAdapter

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

The PrintAdapter simply outputs the input calendar

func (*PrintAdapter) Initialize

func (f *PrintAdapter) Initialize(parser *argparse.Parser) (*argparse.Command, error)

func (*PrintAdapter) Process

func (f *PrintAdapter) Process(input ical.Calendar, output *ical.Calendar) error

func (*PrintAdapter) SetToolbox

func (f *PrintAdapter) SetToolbox(toolbox processors.Toolbox)

Jump to

Keyboard shortcuts

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