package vcard

import "git.sr.ht/~shulhan/pakakeh.go/lib/contact/vcard"

Package vcard implement RFC6350 for encoding and decoding VCard formatted data.

Index

Types

type Gender

type Gender struct {
	Desc string
	Sex  rune
}

Gender contains contact's sex and description.

Sex may contain one of this value: M (male), F (female), O (other), N (none), or U (unknown).

type GeoLocation

type GeoLocation struct {
	Lat  float32
	Long float32
}

GeoLocation define a location in latitude and longitude format.

type Messaging

type Messaging struct {
	Type string
	URI  string
}

Messaging define list of messaging protocol.

type Relation

type Relation struct {
	Type string
	URI  string
}

Relation define a contact relation to other contact URI.

type Resource

type Resource struct {
	Type string
	URI  string
	Data []byte
}

Resource define common resource located in URI or embedded in Data.

type VCard

type VCard struct {
	UID          string
	Source       []string
	Kind         string
	Fn           string
	N            contact.Name
	Nickname     []string
	Photo        []Resource
	Bday         contact.Date
	Anniversary  contact.Date
	Gender       Gender
	Adr          []contact.Address
	Tel          []contact.Phone
	Email        []contact.Email
	Impp         []Messaging
	Lang         []string
	TZ           string
	Geo          []GeoLocation
	Title        []string
	Role         []string
	         []Resource
	Org          []string
	Related      []Relation
	Categories   []string
	Note         []string
	ProdID       string
	Sound        []Resource
	ClientPIDMap string
	Key          []Resource
}

VCard define vcard 4.0 data structure.

Source Files

gender.go geolocation.go messaging.go relation.go resource.go vcard.go

Version
v0.60.0 (latest)
Published
Feb 1, 2025
Platform
linux/amd64
Imports
1 packages
Last checked
9 hours ago

Tools for package owners.