caldav

package
v0.19.1 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2022 License: AGPL-3.0 Imports: 10 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const DateFormat = `20060102T150405`

DateFormat is the caldav date format

Variables

This section is empty.

Functions

func GetCaldavTodosForTasks added in v0.18.0

func GetCaldavTodosForTasks(list *models.ListWithTasksAndBuckets, listTasks []*models.TaskWithComments) string

func ParseEvents

func ParseEvents(config *Config, events []*Event) (caldavevents string)

ParseEvents parses an array of caldav events and gives them back as string

func ParseTaskFromVTODO added in v0.18.0

func ParseTaskFromVTODO(content string) (vTask *models.Task, err error)

func ParseTodos

func ParseTodos(config *Config, todos []*Todo) (caldavtodos string)

ParseTodos returns a caldav vcalendar string with todos

Types

type Alarm

type Alarm struct {
	Time        time.Time
	Description string
}

Alarm holds infos about an alarm from a caldav event

type Config

type Config struct {
	Name   string
	ProdID string
	Color  string
}

Config is the caldav calendar config

type Event

type Event struct {
	Summary     string
	Description string
	UID         string
	Alarms      []Alarm
	Color       string

	Timestamp time.Time
	Start     time.Time
	End       time.Time
}

Event holds a single caldav event

type Todo

type Todo struct {
	// Required
	Timestamp time.Time
	UID       string

	// Optional
	Summary      string
	Description  string
	Completed    time.Time
	Organizer    *user.User
	Priority     int64 // 0-9, 1 is highest
	RelatedToUID string
	Color        string

	Start    time.Time
	End      time.Time
	DueDate  time.Time
	Duration time.Duration

	Created time.Time
	Updated time.Time // last-mod
}

Todo holds a single VTODO

Jump to

Keyboard shortcuts

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