Documentation ¶
Overview ¶
Package contact provide a library to import contact from Google, Microsoft, and Yahoo.
Index ¶
Constants ¶
const ( KindIndividual = "individual" KindGroup = "group" KindOrg = "org" KindLocation = "location" )
List of Kind values.
const ( TypeAnniversary = "anniversary" TypeHome = "home" TypeMain = "main" TypeMobile = "mobile" TypeOther = "other" TypeWork = "work" )
List of known TYPE values.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Address ¶
type Address struct { Type string `json:"type,omitempty"` POBox string `json:"pobox,omitempty"` Ext string `json:"extension,omitempty"` Street string `json:"street,omitempty"` City string `json:"city,omitempty"` StateOrProv string `json:"stateOrProvince,omitempty"` PostalCode string `json:"postalCode,omitempty"` Country string `json:"country,omitempty"` }
Address define contact's address.
type Date ¶
Date define contact's with type "birthday" and "anniversary".
func (*Date) String ¶
String will return the string representation of date object in `YYYY-MM-DD` format.
func (*Date) VCardString ¶
VCardString will return the string representation of date object in VCard format: `YYYYMMDD` or "--MMDD" if year is empty.
type Name ¶
type Name struct { Given string `json:"givenName"` Middle string `json:"middleName"` Family string `json:"familyName"` Prefix string `json:"prefix"` Suffix string `json:"suffix"` GivenSound string `json:"givenNameSound"` FamilySound string `json:"familyNameSound"` }
Name define contact's name.
type Record ¶
type Record struct { Name Name Birthday *Date Anniversary *Date Company string JobTitle string Addresses []Address Emails []Email Phones []Phone Links []string Notes []string }
Record define a single contact entity with sane format.
func (*Record) SetAnniversary ¶
SetAnniversary will set contact annivery from string format "YYYY-MM-DD".
func (*Record) SetBirthday ¶
SetBirthday will set contact birthday from string format "YYYY-MM-DD" or "YYYY-MM-DDTHH:MM:SSZ".
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
Package google implement Google's contact API v3.
|
Package google implement Google's contact API v3. |
Package microsoft implement Microsoft's Live contact API v1.0.
|
Package microsoft implement Microsoft's Live contact API v1.0. |
Package vcard implement RFC6350 for encoding and decoding VCard formatted data.
|
Package vcard implement RFC6350 for encoding and decoding VCard formatted data. |
Package yahoo implement user's contacts import using Yahoo API.
|
Package yahoo implement user's contacts import using Yahoo API. |