Documentation ¶
Overview ¶
See RFC 2425 Mime Content-Type for Directory Information
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Address ¶
type Address struct { Type []string // default is Intl,Postal,Parcel,Work Label string PostOfficeBox string ExtendedAddress string Street string Locality string // e.g: city Region string // e.g: state or province PostalCode string CountryName string }
func (*Address) WriteTo ¶
func (addr *Address) WriteTo(di *DirectoryInfoWriter)
type AddressBook ¶
type AddressBook struct {
Contacts []VCard
}
func (*AddressBook) LastContact ¶
func (ab *AddressBook) LastContact() *VCard
func (*AddressBook) ReadFrom ¶
func (ab *AddressBook) ReadFrom(di *DirectoryInfoReader)
func (*AddressBook) WriteTo ¶
func (ab *AddressBook) WriteTo(di *DirectoryInfoWriter)
type ContentLine ¶
type ContentLine struct {
Group, Name string
Params map[string]Value
Value StructuredValue
}
type DirectoryInfoReader ¶
type DirectoryInfoReader struct {
// contains filtered or unexported fields
}
func NewDirectoryInfoReader ¶
func NewDirectoryInfoReader(reader io.Reader) *DirectoryInfoReader
func (*DirectoryInfoReader) ReadContentLine ¶
func (di *DirectoryInfoReader) ReadContentLine() *ContentLine
type DirectoryInfoWriter ¶
type DirectoryInfoWriter struct {
// contains filtered or unexported fields
}
Permit to serialize Directory Information data as defined by RFC 2425
func NewDirectoryInfoWriter ¶
func NewDirectoryInfoWriter(writer io.Writer) *DirectoryInfoWriter
create a new DirectoryInfoWriter
func (*DirectoryInfoWriter) WriteContentLine ¶
func (di *DirectoryInfoWriter) WriteContentLine(contentLine *ContentLine)
func (*DirectoryInfoWriter) WriteValue ¶
func (di *DirectoryInfoWriter) WriteValue(value string)
this function escape '\n' '\r' ';' ',' character with the '\\' character
type StructuredValue ¶
type StructuredValue []Value
values separated by ';' has a structural meaning
func (StructuredValue) GetAllText ¶
func (v StructuredValue) GetAllText() string
func (StructuredValue) GetText ¶
func (v StructuredValue) GetText() string
func (StructuredValue) GetTextList ¶
func (sv StructuredValue) GetTextList() []string
type VCard ¶
type VCard struct { UID string // ProductID refers to the Property PRODID // and denotes the name and version of the software that generated the vCard. ProductID string // Timestamp of the last change to this vCard Revision string Anniversary string Version string FormattedName string FamilyNames []string GivenNames []string AdditionalNames []string HonorificNames []string HonorificSuffixes []string NickNames []string Photo Photo Birthday string // PlaceOfBirth is defined as BIRTHPLACE in vCard extension rfc6474 PlaceOfBirth string // DateOfDeath is defined as DEATHDATE in vCard extension rfc6474 DateOfDeath string // PlaceOfDeath is defined as DEATHPLACE in vCard extension rfc6474 PlaceOfDeath string Addresses []Address Telephones []Telephone Emails []Email Title string Role string Org []string Categories []string Note string URL string XJabbers []XJabber XSkypes []XSkype // mac specific XABuid string XABShowAs string }
func (*VCard) ReadFrom ¶
func (vcard *VCard) ReadFrom(di *DirectoryInfoReader)
func (*VCard) WriteTo ¶
func (vcard *VCard) WriteTo(di *DirectoryInfoWriter)
Source Files ¶
Click to show internal directories.
Click to hide internal directories.