property

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2020 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInputIsEmpty = fmt.Errorf("Input is empty")
)

Functions

func NewAttachmentValue

func NewAttachmentValue(params parameter.Container, s string) (types.Attachmentable, error)

func NewRecurrenceDateTime

func NewRecurrenceDateTime(params parameter.Container, s string) (types.RecurrenceDateTime, error)

Types

type Action

type Action struct {
	Parameter parameter.Container
	Value     types.Text
}

Action is ACTION https://tools.ietf.org/html/rfc5545#section-3.8.6.1

func (*Action) SetAction

func (a *Action) SetAction(params parameter.Container, value types.Text) error

type ActionType

type ActionType string
const (
	ActionTypeAudio   ActionType = "AUDIO"
	ActionTypeDisplay ActionType = "DISPLAY"
	ActionTypeEMail   ActionType = "EMAIL"
)

type Attachment

type Attachment struct {
	Parameters parameter.Container
	Value      types.Attachmentable
}

Attachment is ATTACH https://tools.ietf.org/html/rfc5545#section-3.8.1.1

func (*Attachment) SetAttachment

func (a *Attachment) SetAttachment(params parameter.Container, value types.Attachmentable) error

type Attendee

type Attendee struct {
	Parameter parameter.Container
	Value     types.CalenderUserAddress
}

Attendee is ATTENDEE https://tools.ietf.org/html/rfc5545#section-3.8.4.1

func (*Attendee) SetAttendee

func (a *Attendee) SetAttendee(params parameter.Container, value types.CalenderUserAddress) error

type CalScale

type CalScale struct {
	Parameter parameter.Container
	Value     types.Text
}

CalScale is CALSCALE https://tools.ietf.org/html/rfc5545#section-3.7.1

func (*CalScale) SetCalScale

func (cs *CalScale) SetCalScale(params parameter.Container, value types.Text) error

type Categories

type Categories struct {
	Parameters parameter.Container
	Values     []types.Text
}

Categories is CATEGORIES https://tools.ietf.org/html/rfc5545#section-3.8.1.2

func (*Categories) SetCategories

func (c *Categories) SetCategories(params parameter.Container, values []types.Text) error

SetCategories updates CATEGORIES specification https://tools.ietf.org/html/rfc5545#section-3.8.1.2

type Class

type Class struct {
	Parameter parameter.Container
	Value     types.Text
}

Class is CLASS, optional property for components specification https://tools.ietf.org/html/rfc5545#section-3.8.1.3

func (*Class) SetClass

func (c *Class) SetClass(params parameter.Container, value types.Text) error

type ClassType

type ClassType string
const (
	PUBLIC       ClassType = "PUBLIC"
	PRIVATE      ClassType = "PRIVATE"
	CONFIDENTIAL ClassType = "CONFIDENTIAL"
)

type Comment

type Comment struct {
	Parameter parameter.Container
	Value     types.Text
}

Comment is COMMENT https://tools.ietf.org/html/rfc5545#section-3.8.1.4

func (*Comment) SetComment

func (c *Comment) SetComment(params parameter.Container, value types.Text) error

SetComment updates property value

type Contact

type Contact struct {
	Parameter parameter.Container
	Value     types.Text
}

Contact is CONTACT https://tools.ietf.org/html/rfc5545#section-3.8.4.2

func (*Contact) SetContact

func (c *Contact) SetContact(params parameter.Container, value types.Text) error

type DateTimeCompleted

type DateTimeCompleted struct {
	Parameter parameter.Container
	Value     types.DateTime
}

DateTimeCompleted is COMPLETED https://tools.ietf.org/html/rfc5545#section-3.8.2.1

func (*DateTimeCompleted) SetCompleted

func (dtc *DateTimeCompleted) SetCompleted(params parameter.Container, value types.DateTime) error

type DateTimeCreated

type DateTimeCreated struct {
	Parameter parameter.Container
	Value     types.DateTime
}

DateTimeCreated is CREATED https://tools.ietf.org/html/rfc5545#section-3.8.7.1

func (*DateTimeCreated) SetDateTimeCreated

func (dc *DateTimeCreated) SetDateTimeCreated(params parameter.Container, value types.DateTime) error

type DateTimeDue

type DateTimeDue struct {
	Parameter parameter.Container
	Value     types.TimeType // DateTime or Date
}

DateTimeDue is DUE https://tools.ietf.org/html/rfc5545#section-3.8.2.3

func (*DateTimeDue) SetDue

func (dtd *DateTimeDue) SetDue(params parameter.Container, value types.TimeType) error

type DateTimeEnd

type DateTimeEnd struct {
	Parameter parameter.Container
	Value     types.TimeType // DateTime or Date
}

DateTimeEnd is DTEND https://tools.ietf.org/html/rfc5545#section-3.8.2.2

func (*DateTimeEnd) SetEnd

func (dte *DateTimeEnd) SetEnd(params parameter.Container, value types.TimeType) error

type DateTimeStamp

type DateTimeStamp struct {
	Parameter parameter.Container
	Value     types.DateTime
}

DateTimeStamp is DTSTAMP https://tools.ietf.org/html/rfc5545#section-3.8.7.2

func (*DateTimeStamp) SetDateTimeStamp

func (ds *DateTimeStamp) SetDateTimeStamp(params parameter.Container, value types.DateTime) error

type DateTimeStart

type DateTimeStart struct {
	Parameter parameter.Container
	Value     types.TimeType // DateTime or Date
}

DateTimeStart is DTSTART https://tools.ietf.org/html/rfc5545#section-3.8.2.4

func (*DateTimeStart) SetStart

func (dts *DateTimeStart) SetStart(params parameter.Container, value types.TimeType) error

type Description

type Description struct {
	Parameter parameter.Container
	Value     types.Text
}

SetDescription updates DESCRIPTION specification https://tools.ietf.org/html/rfc5545#section-3.8.1.5

func (*Description) SetDescription

func (d *Description) SetDescription(params parameter.Container, value types.Text) error

type Duration

type Duration struct {
	Parameter parameter.Container
	Value     types.Duration
}

Duration is DURATION https://tools.ietf.org/html/rfc5545#section-3.8.2.5

func (*Duration) SetDuration

func (d *Duration) SetDuration(params parameter.Container, value types.Duration) error

type ExceptionDateTimes

type ExceptionDateTimes struct {
	Parameter parameter.Container
	Values    []types.TimeType // default is DateTime
}

ExceptionDateTimes is EXDATE https://tools.ietf.org/html/rfc5545#section-3.8.5.1

func (*ExceptionDateTimes) SetExceptionDateTimes

func (edt *ExceptionDateTimes) SetExceptionDateTimes(params parameter.Container, values []types.TimeType) error

type FreeBusyTime

type FreeBusyTime struct {
	Parameter parameter.Container
	Values    []types.Period
}

FreeBusyTime is FREEBUSY https://tools.ietf.org/html/rfc5545#section-3.8.2.6

func (*FreeBusyTime) SetFreeBusyTime

func (fbt *FreeBusyTime) SetFreeBusyTime(params parameter.Container, values []types.Period) error

type Geo

type Geo struct {
	Parameter parameter.Container
	Latitude  types.Float
	Longitude types.Float
}

Geo is GEO specification https://tools.ietf.org/html/rfc5545#section-3.8.1.6

func (*Geo) SetGeo

func (g *Geo) SetGeo(params parameter.Container, latitude, longitude types.Float) error

func (*Geo) SetGeoWithText

func (g *Geo) SetGeoWithText(params parameter.Container, value types.Text) error

type IANA

type IANA struct {
	Name      string
	Parameter parameter.Container
	Value     interface{} // any types can be
}

IANA is IANA-registered property https://tools.ietf.org/html/rfc5545#section-3.8.8.1

func NewIANA

func NewIANA(name string, params parameter.Container, value interface{}) *IANA

type LastModified

type LastModified struct {
	Parameter parameter.Container
	Value     types.DateTime
}

LastModified is LAST-MODIFIED https://tools.ietf.org/html/rfc5545#section-3.8.7.3

func (*LastModified) SetLastModified

func (lm *LastModified) SetLastModified(params parameter.Container, value types.DateTime) error

type Location

type Location struct {
	Parameter parameter.Container
	Value     types.Text
}

Locaiton is LOCATION location of component https://tools.ietf.org/html/rfc5545#section-3.8.1.7

func (*Location) SetLocation

func (l *Location) SetLocation(params parameter.Container, value types.Text) error

type Method

type Method struct {
	Parameter parameter.Container
	Value     types.Text
}

Method is Method https://tools.ietf.org/html/rfc5545#section-3.7.2

func (*Method) SetMethod

func (m *Method) SetMethod(params parameter.Container, value types.Text) error

type MethodType

type MethodType string

Method is content-type list of methods is defined in https://www.iana.org/assignments/icalendar/icalendar.xhtml#methods used by https://tools.ietf.org/html/rfc5545#section-3.6

const (
	MethodTypePublish        MethodType = "PUBLISH"
	MethodTypeRequest        MethodType = "REQUEST"
	MethodTypeReply          MethodType = "REPLY"
	MethodTypeAdd            MethodType = "ADD"
	MethodTypeCancel         MethodType = "CANCEL"
	MethodTypeRefresh        MethodType = "REFRESH"
	MethodTypeCounter        MethodType = "COUNTER"
	MethodTypeDeclinecounter MethodType = "DECLINECOUNTER"
)

type NonStandard

type NonStandard struct {
	Name      string
	Parameter parameter.Container
	Value     interface{} // any types can be
}

NonStandard is property name with a "X-" prefix https://tools.ietf.org/html/rfc5545#section-3.8.8.2

func NewNonStandard

func NewNonStandard(name string, params parameter.Container, value interface{}) (*NonStandard, error)

type Organizer

type Organizer struct {
	Parameter parameter.Container
	Value     types.CalenderUserAddress
}

Organizer is ORGANIZER https://tools.ietf.org/html/rfc5545#section-3.8.4.3

func (*Organizer) SetOrganizer

func (o *Organizer) SetOrganizer(params parameter.Container, value types.CalenderUserAddress) error

type PercentComplete

type PercentComplete struct {
	Parameter parameter.Container
	Value     types.Integer
}

PercentComplete is PERCENT-COMPLETE property for ToDo https://tools.ietf.org/html/rfc5545#section-3.8.1.8

func (*PercentComplete) SetPercentComplete

func (pc *PercentComplete) SetPercentComplete(params parameter.Container, value types.Integer) error

type Priority

type Priority struct {
	Parameter parameter.Container
	Value     types.Integer
}

Priority is PRIORITY used for ToDo or Event https://tools.ietf.org/html/rfc5545#section-3.8.1.9

func (*Priority) SetPriority

func (p *Priority) SetPriority(params parameter.Container, value types.Integer) error

type ProdID

type ProdID struct {
	Parameter parameter.Container
	Value     types.Text
}

ProdID is PRODID https://tools.ietf.org/html/rfc5545#section-3.7.3

func (*ProdID) SetProdID

func (p *ProdID) SetProdID(params parameter.Container, value types.Text) error

type PropertyName

type PropertyName string
const (
	// component block
	PropertyNameBegin PropertyName = "BEGIN"
	PropertyNameEnd   PropertyName = "END"

	PropertyNameAction      PropertyName = "ACTION"
	PropertyNameRepeatCount PropertyName = "REPEAT"
	PropertyNameTrigger     PropertyName = "TRIGGER"

	// descriptive
	PropertyNameAttachment      PropertyName = "ATTACH"
	PropertyNameCategories      PropertyName = "CATEGORIES"
	PropertyNameClass           PropertyName = "CLASS"
	PropertyNameComment         PropertyName = "COMMENT"
	PropertyNameDescription     PropertyName = "DESCRIPTION"
	PropertyNameGeo             PropertyName = "GEO"
	PropertyNameLocaiton        PropertyName = "LOCATION"
	PropertyNamePercentComplete PropertyName = "PERCENT-COMPLETE"
	PropertyNamePriority        PropertyName = "PRIORITY"
	PropertyNameResources       PropertyName = "RESOURCES"
	PropertyNameStatus          PropertyName = "STATUS"
	PropertyNameSummary         PropertyName = "SUMMARY"

	// time
	PropertyNameDateTimeCompleted PropertyName = "COMPLETED"
	PropertyNameDateTimeEnd       PropertyName = "DTEND"
	PropertyNameDateTimeDue       PropertyName = "DUE"
	PropertyNameDateTimeStart     PropertyName = "DTSTART"
	PropertyNameDuration          PropertyName = "DURATION"
	PropertyNameFreeBusyTime      PropertyName = "FREEBUSY"
	PropertyNameTimeTransparency  PropertyName = "TRANSP"

	// timezone
	PropertyNameTimezoneIdentifier PropertyName = "TZID"
	PropertyNameTimezoneName       PropertyName = "TZNAME"
	PropertyNameTimezoneOffsetFrom PropertyName = "TZOFFSETFROM"
	PropertyNameTimezoneOffsetTo   PropertyName = "TZOFFSETTO"
	PropertyNameTimezoneURL        PropertyName = "TZURL"

	// relationship
	PropertyNameAttendee     PropertyName = "ATTENDEE"
	PropertyNameContact      PropertyName = "CONTACT"
	PropertyNameOrganizer    PropertyName = "ORGANIZER"
	PropertyNameRecurrenceID PropertyName = "RECURRENCE-ID"
	PropertyNameRelatedTo    PropertyName = "RELATED-TO"
	PropertyNameURL          PropertyName = "URL"
	PropertyNameUID          PropertyName = "UID"

	// change management
	PropertyNameDateTimeStamp   PropertyName = "DTSTAMP"
	PropertyNameDateTimeCreated PropertyName = "CREATED"
	PropertyNameLastModified    PropertyName = "LAST-MODIFIED"
	PropertyNameSequenceNumber  PropertyName = "SEQUENCE"

	// recurrence
	PropertyNameExceptionDateTimes  PropertyName = "EXDATE"
	PropertyNameRecurrenceDateTimes PropertyName = "RDATE"
	PropertyNameRecurrenceRule      PropertyName = "RRULE"

	// Miscellaneous
	PropertyNameRequestStatus PropertyName = "REQUEST-STATUS"

	// Calender component
	PropertyNameCalScale PropertyName = "CALSCALE"
	PropertyNameMethod   PropertyName = "METHOD"
	PropertyNameProdID   PropertyName = "PRODID"
	PropertyNameVersion  PropertyName = "VERSION"
)

type RecurrenceDateTimes

type RecurrenceDateTimes struct {
	Parameter parameter.Container
	Values    []types.RecurrenceDateTime // default is DateTime, Date or Period are fine.
}

RecurrenceDateTimes is RDATE https://tools.ietf.org/html/rfc5545#section-3.8.5.2

func (*RecurrenceDateTimes) SetRecurrenceDateTimes

func (rdt *RecurrenceDateTimes) SetRecurrenceDateTimes(params parameter.Container, values []types.RecurrenceDateTime) error

type RecurrenceID

type RecurrenceID struct {
	Parameter parameter.Container
	Value     types.TimeType
}

RecurrenceID is RECURRENCE-ID https://tools.ietf.org/html/rfc5545#section-3.8.4.4

func (RecurrenceID) SetRecurrenceID

func (rid RecurrenceID) SetRecurrenceID(params parameter.Container, value types.TimeType) error

TODO: implement

type RecurrenceRule

type RecurrenceRule struct {
	Parameter parameter.Container
	Value     types.RecurrenceRule
}

RecurrenceRule is RRULE https://tools.ietf.org/html/rfc5545#section-3.8.5.3

func (*RecurrenceRule) SetRecurrenceRule

func (rrule *RecurrenceRule) SetRecurrenceRule(params parameter.Container, value types.RecurrenceRule) error

type RelatedTo

type RelatedTo struct {
	Parameter parameter.Container
	Value     types.Text
}

RelatedTo is RELATED-TO https://tools.ietf.org/html/rfc5545#section-3.8.4.5

func (*RelatedTo) SetRelatedTo

func (rt *RelatedTo) SetRelatedTo(params parameter.Container, value types.Text) error

type RepeatCount

type RepeatCount struct {
	Parameter parameter.Container
	Value     types.Integer
}

RepeatCount is REPEAT https://tools.ietf.org/html/rfc5545#section-3.8.6.2

func (*RepeatCount) SetRepeatCount

func (rc *RepeatCount) SetRepeatCount(params parameter.Container, value types.Integer) error

type RequestStatus

type RequestStatus struct {
	Parameter parameter.Container

	// StatusCode list is defined in https://tools.ietf.org/html/rfc5546#section-3.6
	StatusCode        types.Text
	StatusDescription types.Text
	ExtraData         types.Text
}

RequestStatus is REQUEST-STATUS https://tools.ietf.org/html/rfc5545#section-3.8.8.3

func (*RequestStatus) SetRequestStatus

func (rs *RequestStatus) SetRequestStatus(params parameter.Container, value types.Text) error

func (*RequestStatus) Update

func (rs *RequestStatus) Update(params parameter.Container, code, desc, exdata types.Text) error

type Resources

type Resources struct {
	Parameter parameter.Container
	Values    []types.Text
}

Resources is RESOURCES https://tools.ietf.org/html/rfc5545#section-3.8.1.10

func (*Resources) SetResources

func (r *Resources) SetResources(params parameter.Container, values []types.Text) error

type SequenceNumber

type SequenceNumber struct {
	Parameter parameter.Container
	Value     types.Integer // default is 0
}

SequenceNumber is SEQUENCE https://tools.ietf.org/html/rfc5545#section-3.8.7.4

func (*SequenceNumber) SetSequenceNumber

func (sn *SequenceNumber) SetSequenceNumber(params parameter.Container, value types.Integer) error

type Status

type Status struct {
	Parameter parameter.Container
	Value     StatusType
}

Status is STATUS https://tools.ietf.org/html/rfc5545#section-3.8.1.11

func (*Status) SetStatus

func (s *Status) SetStatus(params parameter.Container, value types.Text, kind component.ComponentType) error

type StatusType

type StatusType string
const (
	StatusTypeTentative   StatusType = "TENTATIVE"
	StatusTypeConfirmed   StatusType = "CONFIRMED"
	StatusTypeCancelled   StatusType = "CANCELLED"
	StatusTypeNeedsAction StatusType = "NEEDS-ACTION"
	StatusTypeCompleted   StatusType = "COMPLETED"
	StatusTypeInProcess   StatusType = "IN-PROCESS"
	StatusTypeDraft       StatusType = "DRAFT"
	StatusTypeFinal       StatusType = "FINAL"
)

type Summary

type Summary struct {
	Parameter parameter.Container
	Value     types.Text
}

Summary is SUMMARY used for "VEVENT", "VTODO", "VJOURNAL", or "VALARM" https://tools.ietf.org/html/rfc5545#section-3.8.1.12

func (*Summary) SetSummary

func (s *Summary) SetSummary(params parameter.Container, value types.Text) error

type TimeTransparency

type TimeTransparency struct {
	Parameter parameter.Container
	Value     TransparencyValueType
}

TimeTransparency is TRANSP https://tools.ietf.org/html/rfc5545#section-3.8.2.7

func (*TimeTransparency) SetTransparency

func (tt *TimeTransparency) SetTransparency(params parameter.Container, value types.Text) error

TODO: maybe fix input value type to TransparencyValueType to force value type

type TimezoneIdentifier

type TimezoneIdentifier struct {
	Parameter parameter.Container
	Value     types.Text
}

TimezoneIdentifier is TZID https://tools.ietf.org/html/rfc5545#section-3.8.3.1

func (*TimezoneIdentifier) SetTimezoneID

func (tzid *TimezoneIdentifier) SetTimezoneID(params parameter.Container, value types.Text) error

type TimezoneName

type TimezoneName struct {
	Parameter parameter.Container
	Value     types.Text
}

TimezoneName is TZNAME https://tools.ietf.org/html/rfc5545#section-3.8.3.2

func (*TimezoneName) SetTimezoneName

func (tzn *TimezoneName) SetTimezoneName(params parameter.Container, value types.Text) error

type TimezoneOffsetFrom

type TimezoneOffsetFrom struct {
	Parameter parameter.Container
	Value     types.UTCOffset
}

TimezoneOffsetFrom is TZOFFSETFROM https://tools.ietf.org/html/rfc5545#section-3.8.3.3

func (*TimezoneOffsetFrom) SetTimezoneOffsetFrom

func (tzofrom *TimezoneOffsetFrom) SetTimezoneOffsetFrom(params parameter.Container, value types.UTCOffset) error

type TimezoneOffsetTo

type TimezoneOffsetTo struct {
	Parameter parameter.Container
	Value     types.UTCOffset
}

TimezoneOffsetTo is TZOFFSETTO https://tools.ietf.org/html/rfc5545#section-3.8.3.4

func (*TimezoneOffsetTo) SetTimezoneOffsetTo

func (tzoto *TimezoneOffsetTo) SetTimezoneOffsetTo(params parameter.Container, value types.UTCOffset) error

type TimezoneURL

type TimezoneURL struct {
	Parameter parameter.Container
	Value     types.URI
}

TimezoneURL is TZURL https://tools.ietf.org/html/rfc5545#section-3.8.3.5

func (*TimezoneURL) SetTimezoneURL

func (tzurl *TimezoneURL) SetTimezoneURL(params parameter.Container, value types.URI) error

type TransparencyValueType

type TransparencyValueType string
const (
	TransparencyValueTypeOpaque      TransparencyValueType = "OPAQUE"
	TransparencyValueTypeTransparent TransparencyValueType = "TRANSPARENT"
)

type Trigger

type Trigger struct {
	Parameter parameter.Container
	Value     interface{} // TODO: duration or datetime , default is duration
}

Trigger is TRIGGER https://tools.ietf.org/html/rfc5545#section-3.8.6.3

func (*Trigger) SetTrigger

func (t *Trigger) SetTrigger(params parameter.Container, value interface{}) error

type UID

type UID struct {
	Parameter parameter.Container
	Value     types.Text
}

UID is UID https://tools.ietf.org/html/rfc5545#section-3.8.4.7

func (*UID) SetUID

func (uid *UID) SetUID(params parameter.Container, value types.Text) error

type URL

type URL struct {
	Parameter parameter.Container
	Value     types.URI
}

URL is URL maybe name will be changed to UniformResourceLocator https://tools.ietf.org/html/rfc5545#section-3.8.4.6

func (*URL) SetURL

func (url *URL) SetURL(params parameter.Container, value types.URI) error

type Version

type Version struct {
	Parameter parameter.Container
	Min, Max  types.Text
}

Version is VERSION https://tools.ietf.org/html/rfc5545#section-3.7.4

func NewVersion

func NewVersion() *Version

func (*Version) SetVersion

func (v *Version) SetVersion(params parameter.Container, value types.Text) error

func (*Version) UpdateVersion

func (v *Version) UpdateVersion(params parameter.Container, min, max types.Text) error

Jump to

Keyboard shortcuts

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