Documentation
¶
Overview ¶
Package parameter handles iCalendar parameters. The key is required to be case-insensitive. Here, this this generally implemented by using upper-case keys, a pattern that must be carefully followed if Parameter structs are created on the fly.
All the factory functions in this package that return a Parameter will use an upper-case key.
Index ¶
- Constants
- type Parameter
- func AltRep(v string) Parameter
- func CommonName(v string) Parameter
- func Delegatee(v ...string) Parameter
- func Delegator(v ...string) Parameter
- func Dir(v string) Parameter
- func Email(v string) Parameter
- func Encoding(base64 bool) Parameter
- func FmtType(mediaType string) Parameter
- func FmtTypeOf(typeName, subTypeName string) Parameter
- func Label(v string) Parameter
- func Language(v string) Parameter
- func Member(v ...string) Parameter
- func Multiple(k string, v []string) Parameter
- func Rsvp(yes bool) Parameter
- func SentBy(v string) Parameter
- func Single(k, v string) Parameter
- func TZid(v string) Parameter
- type Parameters
Constants ¶
const ALTREP = "ALTREP"
ALTREP is the key for an alternate text representation parameter.
const CN = "CN"
CN is the key for a common name parameter.
const DELEGATED_FROM = "DELEGATED-FROM"
DELEGATED_FROM is the key for a delegator parameter.
const DELEGATED_TO = "DELEGATED-TO"
DELEGATED_TO is the key for a delegatee parameter.
const DIR = "DIR"
DIR is the key for a directory parameter.
const EMAIL = "EMAIL"
EMAIL is the key for an email parameter.
const ENCODING = "ENCODING"
ENCODING is the key for an encoding parameter.
const FMTTYPE = "FMTTYPE"
FMTYPE is the key for a media type parameter.
const LABEL = "LABEL"
LABEL is the key for a label parameter.
const LANGUAGE = "LANGUAGE"
LANGUAGE is the key for a language parameter.
const MEMBER = "MEMBER"
MEMBER is the key for a member parameter.
const RSVP = "RSVP"
RSVP is the key for a RSVP parameter.
const SENT_BY = "SENT-BY"
SENT_BY is the key for a sent-by parameter.
const TZID = "TZID"
TZID is the key for a timezone ID parameter.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Parameter ¶
type Parameter struct {
Key string
Value string // there is always at least one value
Others []string // there may be others too
}
Parameter holds an iCalendar parameter. The key must be uppercase, this being a pattern that simplifies the requirement for keys to be case-insensitive.
For most parameters, the value is singular, i.e. there is exactly one string. There are a few exceptions that have several values, expressed as a comma-separated list.
func CommonName ¶
CommonName specifies the common name to be associated with the calendar user specified by the property.
func Delegatee ¶
Delegatee names the calendar users to whom the calendar user specified by the property has delegated participation.
func Delegator ¶
Delegator names the calendar users that have delegated their participation to the calendar user(s) specified by the property.
func Dir ¶
Dir specifies reference to a directory entry associated with the calendar user specified by the property.
func Email ¶
Email specifies an email address that is used to identify or contact an organizer or attendee.
func Language ¶
Language specifies the language for text values in a property or property parameter. See https://tools.ietf.org/html/rfc5646
func Member ¶
Member specifies the group or list membership of the calendar user specified by the property.
func Rsvp ¶
Rsvp specifies whether there is an expectation of a reply from the calendar user specified by the property value.
func SentBy ¶
SentBy specifies the calendar user that is acting on behalf of the calendar user specified by the property.
func TZid ¶
TZid specifies the identifier for the time zone definition for a time component in the property value.
func (Parameter) Equals ¶
Equals tests whether two parameters have the same key and the same value(s).
func (Parameter) WriteTo ¶
func (p Parameter) WriteTo(w ics.StringWriter) error
WriteTo serialises the parameter in iCalendar ics format to the writer. Parameters with multiple values are serialised using a comma-separated list.
Parameters with values containing a COLON character, a SEMICOLON character or a COMMA character are placed in quoted text.
type Parameters ¶
type Parameters []Parameter
Parameters holds a set of key-value parameters.
func (Parameters) Append ¶
func (pp Parameters) Append(ps ...Parameter) Parameters
Append appends a parameter (or parameters), ensuring that keys remain unique.
func (Parameters) Prepend ¶
func (pp Parameters) Prepend(ps ...Parameter) Parameters
Prepend appends a parameter (or parameters), ensuring that keys remain unique.
func (Parameters) RemoveByKey ¶
func (pp Parameters) RemoveByKey(key ...string) Parameters
RemoveByKey removes all parameters with a key (or keys) from the list.
func (Parameters) WriteTo ¶
func (pp Parameters) WriteTo(w ics.StringWriter) error
WriteTo serialises the parameters in iCalendar ics format to the writer.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package cuvalue enumerates values for calendar user types.
|
Package cuvalue enumerates values for calendar user types. |
|
Package display enumerates values for the display parameter.
|
Package display enumerates values for the display parameter. |
|
Package feature enumerates values for the feature parameter.
|
Package feature enumerates values for the feature parameter. |
|
Package freebusy enumerates values for the free-busy parameter.
|
Package freebusy enumerates values for the free-busy parameter. |
|
Package partstat enumerates values for the participation status parameter.
|
Package partstat enumerates values for the participation status parameter. |
|
Package role enumerates values for the participation role parameter.
|
Package role enumerates values for the participation role parameter. |
|
Package valuetype enumerates values of the type options for parameters (the VALUE parameter).
|
Package valuetype enumerates values of the type options for parameters (the VALUE parameter). |