caldav

package
v0.24.0 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2024 License: AGPL-3.0 Imports: 11 Imported by: 0

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(project *models.ProjectWithTasksAndBuckets, projectTasks []*models.TaskWithComments) string

func ParseAlarms added in v0.21.0

func ParseAlarms(alarms []Alarm, taskDescription string) (caldavalarms string)

func ParseRelations added in v0.22.0

func ParseRelations(relations []Relation) (caldavrelatedtos 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
	Duration    time.Duration
	RelativeTo  models.ReminderRelation
	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 Relation added in v0.22.0

type Relation struct {
	Type models.RelationKind
	UID  string
}

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
	Relations   []Relation
	Color       string
	Categories  []string
	Start       time.Time
	End         time.Time
	DueDate     time.Time
	Duration    time.Duration
	RepeatAfter int64
	RepeatMode  models.TaskRepeatMode
	Alarms      []Alarm

	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