Marketplace
<div align="center"> <h3>Premium sponsors</h3> <p> <a href="https://id8media.com"><strong>ID8 Media</strong></a> · <a href="https://one-studio.co"><strong>One Studio</strong></a> </p> <p><sub>Support togo — <a href="https://github.com/sponsors/fadymondy">become a sponsor</a>.</sub></p> </div>
Contacts
Other1 providersImport & sync contacts from providers.
togo-framework
bash
togo install togo-framework/contactsInstall
bash
togo install togo-framework/contactscontacts — togo contacts plugin
The contacts base plugin for togo. It defines a normalized
Contact model and a ContactsProvider driver interface so you can import/sync
contacts from anywhere — Google, a CRM, … — behind one API.
bash
togo install togo-framework/contacts
togo install togo-framework/contacts-google # a provider
Select the provider with CONTACTS_DRIVER (default null — no contacts):
env
CONTACTS_DRIVER=google
Use it
go
import "github.com/togo-framework/contacts"
svc, _ := contacts.FromKernel(k)
all, err := svc.Sync(ctx) // pull every contact from the provider
c, err := svc.Get(ctx, id) // one contact by provider id
Write a provider
A provider is a tiny module that registers a driver in init():
go
func init() {
contacts.RegisterDriver("mycrm", func(k *togo.Kernel) (contacts.ContactsProvider, error) {
return &provider{/* read env */}, nil
})
}
It implements List(ctx, pageToken) ([]Contact, next, err) and Get(ctx, id).
contacts-google is the reference provider (Google People API); the same shape
works for any CRM.
MIT
<div align="center"> <h3>Premium sponsors</h3> <p> <a href="https://id8media.com"><strong>ID8 Media</strong></a> · <a href="https://one-studio.co"><strong>One Studio</strong></a> </p> <p><sub>Support togo — <a href="https://github.com/sponsors/fadymondy">become a sponsor</a>.</sub></p> </div>