Documentation
¶
Overview ¶
A JSON API wrapper around the core.Core for multiplatform support. It's not possible to expose any "complex" data types (structs*, arrays, channels, maps, etc.), because they do not have bindings to other languages. Let's use JSON everywhere as a REST API would...
(*) You can return a *Event (pointer to struct), but you cannot receive it as argument.
Index ¶
- type Api
- func (a *Api) CloneCalendar(repoUrl, password string) error
- func (a *Api) CreateCalendar(name, password string) error
- func (a *Api) CreateEvent(eventJson string) (string, error)
- func (a *Api) ExportZip(calendar string) ([]byte, error)
- func (a *Api) GetEvent(id string) (string, error)
- func (a *Api) GetEvents(from, to string) (string, error)
- func (a *Api) ListCalendars() (string, error)
- func (a *Api) LoadCalendars() error
- func (a *Api) RemoveCalendar(name string) error
- func (a *Api) RemoveEvent(eventJson string) error
- func (a *Api) RemoveRepeatingEvent(eventJson string, strategy int) error
- func (a *Api) RenameCalendar(oldName, newName string) error
- func (a *Api) SetCorsProxy(proxyUrl string) error
- func (a *Api) SyncAll() error
- func (a *Api) UpdateEvent(eventJson string) (string, error)
- func (a *Api) UpdateRemote(calendar string, remoteUrl string) error
- func (a *Api) UpdateRepeatingEvent(oldEventJson, newEventJson string, strategy int) (string, error)
- type Event
- type Repetition
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Api ¶
type Api struct {
// contains filtered or unexported fields
}
The exposed/exported JSON-only API interface.
func (*Api) CloneCalendar ¶
func (*Api) CreateCalendar ¶
func (*Api) ListCalendars ¶
func (*Api) LoadCalendars ¶
func (*Api) RemoveCalendar ¶
func (*Api) RemoveEvent ¶
func (*Api) RemoveRepeatingEvent ¶
func (*Api) RenameCalendar ¶ added in v0.1.3
func (*Api) SetCorsProxy ¶
func (*Api) UpdateRemote ¶ added in v0.1.4
type Event ¶
type Event struct {
Id string
Title string
Location string
Description string
From string // RFC3339 format e.g., 2009-11-10T23:00:00Z (the default format of json.Marshal() for time.Time)
To string // RFC3339 format e.g., 2009-11-10T23:00:00Z (the default format of json.Marshal() for time.Time)
Calendar string
Tag string
ParentId string
Repeat *Repetition
}
A DTO (we love Java) for Kotlin/Swift to use as the event structure.
This event isn't used in Go itself, but serves as a "shape definition" for `gomobile` to bind it into Kotlin/Swift.
Click to show internal directories.
Click to hide internal directories.