vdir

package
v0.0.0-...-0dfd57a Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2020 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Service vdir provides access to VCard contacts and VCal calendars.

Index

Constants

This section is empty.

Variables

View Source
var Module = &services.Module{
	Name:        "vdir",
	Version:     "1.0",
	NewInstance: NewService,
}

Functions

This section is empty.

Types

type Address

type Address struct {
	Type            []string `vdir:",param" json:"@type,omitempty"`
	Label           string   `vdir:",param" json:"label,omitempty"`
	PostOfficeBox   string   `json:"-"`
	ExtendedAddress string   `json:"-"`
	Street          string   `json:"street,omitempty"`
	Locality        string   `json:"locality,omitempty"`
	Region          string   `json:"region,omitempty"`
	PostalCode      string   `json:"postal-code,omitempty"`
	CountryName     string   `json:"country-name,omitempty"`
}

type Card

type Card struct {
	schema.Thing

	Profile       string          `vdir:"vcard,profile" json:"-"`
	FormattedName string          `vdir:"fn" json:"fn,omitempty"`
	Name          Name            `vdir:"n" json:"hasName,omitempty"`
	NickName      []string        `json:"nickname,omitempty"`
	Birthday      string          `vdir:"bday" json:"bday,omitempty"`
	Addresses     []Address       `vdir:"adr" json:"hasAddress,omitempty"`
	Telephones    []TypedValue    `vdir:"tel" json:"hasTelephone,omitempty"`
	Email         []TypedValue    `json:"hasEmail,omitempty"`
	Url           []TypedResource `json:"hasUrl,omitempty"`
	Title         string          `json:"title,omitempty"`
	Role          string          `json:"role,omitempty"`
	Org           string          `json:"org,omitempty"`
	Categories    []string        `json:"category,omitempty"`
	Note          string          `json:"note,omitempty"`

	Rev    string `json:"-"`
	ProdId string `json:"-"`
	Uid    string `json:"uid,omitempty"`

	IMPP []TypedResource `json:"hasInstantMessaging,omitempty"`
}

func (Card) String

func (c Card) String() string

type CardInfo

type CardInfo struct {
	Id   string
	Path string

	Card *Card
}

type Config

type Config struct {
	CardDir string
	CalDir  string
}

type Dependencies

type Dependencies struct {
	Config services.Config
	Client sarif.Client
}

type Name

type Name struct {
	FamilyName        []string `json:"family-name,omitempty"`
	GivenName         []string `json:"given-name,omitempty"`
	AdditionalNames   []string `json:"additional-name,omitempty"`
	HonorificNames    []string `json:"honorific-prefix,omitempty"`
	HonorificSuffixes []string `json:"honorific-suffix,omitempty"`
}

type Service

type Service struct {
	sarif.Client
	// contains filtered or unexported fields
}

func NewService

func NewService(deps *Dependencies) *Service

func (*Service) Enable

func (s *Service) Enable() error

func (*Service) HandleCard

func (s *Service) HandleCard(msg sarif.Message)

func (*Service) ReloadFiles

func (s *Service) ReloadFiles() error

type TypedResource

type TypedResource struct {
	Type  []string `vdir:",param" json:"@type,omitempty"`
	Value string   `json:"@id"`
}

type TypedValue

type TypedValue struct {
	Type  []string `vdir:",param" json:"@type,omitempty"`
	Value string   `json:"hasValue"`
}

Jump to

Keyboard shortcuts

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