Documentation
¶
Index ¶
Constants ¶
View Source
const ( JournalCalendar JournalType = "CALENDAR" JournalAddressBook = "ADDRESS_BOOK" JournalTasks = "TASKS" )
View Source
const APIUrl = "https://api.etesync.com"
APIUrl is the default URL
Variables ¶
View Source
var ( // ErrInvalidCredentials denotes invalid credentials when trying to get a API token ErrInvalidCredentials = errors.New("invalid credentials") )
Functions ¶
Types ¶
type Entry ¶
func (*Entry) GetContent ¶
func (e *Entry) GetContent(cipher *crypto.Cipher) (*EntryContent, error)
func (*Entry) SetContent ¶
func (e *Entry) SetContent(c *EntryContent, cipher *crypto.Cipher) error
type EntryContent ¶
type HTTPClient ¶
type HTTPClient struct {
// contains filtered or unexported fields
}
HTTPClient is a EteSync API Client
func NewClient ¶
func NewClient(u, p string) (*HTTPClient, error)
NewClient returns a new HTTPClient given a username and password
func NewClientWithURL ¶
func NewClientWithURL(u, p, url string) (*HTTPClient, error)
NewClientWithURL returns a new HTTPClient given a username, password and a custom server URL
func (*HTTPClient) JournalEntries ¶
func (c *HTTPClient) JournalEntries(uid string, last *string) (Entries, error)
func (*HTTPClient) Journals ¶
func (c *HTTPClient) Journals() (Journals, error)
Journals retrieves the available journals
func (*HTTPClient) WithDebug ¶
func (c *HTTPClient) WithDebug() *HTTPClient
WithDebug returns a copy of the client with debug enabled When debug is enabled HTTP request and responses are logged
type Journal ¶
type Journal struct {
Version int `json:"version"`
UID string `json:"uid"`
Content string `json:"content"`
Owner string `json:"owner"`
Key string `json:"key"`
ReadOnly bool `json:"readOnly"`
}
func (*Journal) GetContent ¶
func (j *Journal) GetContent(cipher *crypto.Cipher) (*JournalContent, error)
type JournalContent ¶
type JournalContent struct {
Type JournalType `json:"type"`
Version int `json:"version"`
Selected bool `json:"selected"`
DisplayName string `json:"displayName"`
Color int `json:"color"`
}
type JournalType ¶
type JournalType string
Click to show internal directories.
Click to hide internal directories.