Documentation
¶
Index ¶
- Variables
- type Config
- type DatabaseService
- func (ds *DatabaseService) AddEvent(ctx context.Context, event *Event) error
- func (ds *DatabaseService) Close() error
- func (ds *DatabaseService) DeleteEvent(ctx context.Context, event *Event) error
- func (ds *DatabaseService) ListEvents(ctx context.Context) ([]*Event, error)
- func (ds *DatabaseService) SetEvent(ctx context.Context, event *Event) error
- type Event
Constants ¶
This section is empty.
Variables ¶
View Source
var ColorMap = map[string]string{
"blue": "9",
"brown": "10",
"default": "1",
"gray": "8",
"green": "2",
"orange": "6",
"pink": "4",
"purple": "3",
"red": "11",
"yellow": "5",
}
ColorMap is a map to convert from Notion colors to Google Calendar colors
Functions ¶
This section is empty.
Types ¶
type DatabaseService ¶
type DatabaseService struct {
// contains filtered or unexported fields
}
func CreateService ¶
func CreateService(ctx context.Context) (*DatabaseService, error)
func (*DatabaseService) AddEvent ¶
func (ds *DatabaseService) AddEvent(ctx context.Context, event *Event) error
func (*DatabaseService) Close ¶
func (ds *DatabaseService) Close() error
func (*DatabaseService) DeleteEvent ¶
func (ds *DatabaseService) DeleteEvent(ctx context.Context, event *Event) error
func (*DatabaseService) ListEvents ¶
func (ds *DatabaseService) ListEvents(ctx context.Context) ([]*Event, error)
type Event ¶
type Event struct { UUID string `firestore:"uuid"` Title string `firestore:"title"` StartTime time.Time `firestore:"start_time"` EndTime time.Time `firestore:"end_time"` CreatedTime time.Time `firestore:"created_time"` UpdatedTime time.Time `firestore:"updated_time"` Color string `firestore:"color"` IsAllday bool `firestore:"is_all_day"` NotionEventID string `firestore:"notion_event_id"` GoogleCalendarEventID string `firestore:"google_calendar_event_id"` Description string `firestore:"description"` }
Event represents an event to be stored in the database
Click to show internal directories.
Click to hide internal directories.