ical

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2023 License: MIT Imports: 7 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Event

type Event struct {
	Start   time.Time
	End     time.Time
	UID     string
	URL     string
	Summary string
}

type FeedCache

type FeedCache struct {
	URL      string
	Username string        // can be empty
	Password string        // can be empty
	Interval time.Duration // default is two minutes
	// contains filtered or unexported fields
}

FeedCache gets events from an ical feed and caches them for the given interval. After each interval, calls to update have to wait until the http request is done.

func (*FeedCache) Get

func (fc *FeedCache) Get(location *time.Location) ([]Event, error)

Get returns all events. The location parameter is only used if the ical data contains no TZID location.

Jump to

Keyboard shortcuts

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