Documentation ¶
Index ¶
- type GetCalendarEventsArgs
- type GoogleCalendar
- func (gc *GoogleCalendar) GetAuthLink(state string) string
- func (gc *GoogleCalendar) GetCalendarEvents(token *oauth2.Token, calendarID string, args *GetCalendarEventsArgs) ([]*calendar.Event, error)
- func (gc *GoogleCalendar) GetCalendars(token *oauth2.Token) ([]*calendar.CalendarListEntry, error)
- func (gc *GoogleCalendar) GetStateCodeFromGin(c *gin.Context) (string, string, error)
- func (gc *GoogleCalendar) GetTokenFromCode(code string) (*oauth2.Token, error)
- func (gc *GoogleCalendar) RefreshToken(token *oauth2.Token) (bool, *oauth2.Token, error)
- func (gc *GoogleCalendar) UpsertEvent(token *oauth2.Token, calendarID string, event *calendar.Event) (*calendar.Event, error)
- type ICalendar
- type NewCalendarFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GetCalendarEventsArgs ¶
type GoogleCalendar ¶
func (*GoogleCalendar) GetAuthLink ¶
func (gc *GoogleCalendar) GetAuthLink(state string) string
func (*GoogleCalendar) GetCalendarEvents ¶
func (gc *GoogleCalendar) GetCalendarEvents(token *oauth2.Token, calendarID string, args *GetCalendarEventsArgs) ([]*calendar.Event, error)
func (*GoogleCalendar) GetCalendars ¶
func (gc *GoogleCalendar) GetCalendars(token *oauth2.Token) ([]*calendar.CalendarListEntry, error)
func (*GoogleCalendar) GetStateCodeFromGin ¶
func (*GoogleCalendar) GetTokenFromCode ¶
func (gc *GoogleCalendar) GetTokenFromCode(code string) (*oauth2.Token, error)
func (*GoogleCalendar) RefreshToken ¶
RefreshToken refreshes the token if it's expired otherwise it returns the same token useful for updating token inside your database when it's refreshed
func (*GoogleCalendar) UpsertEvent ¶
func (gc *GoogleCalendar) UpsertEvent(token *oauth2.Token, calendarID string, event *calendar.Event) (*calendar.Event, error)
type ICalendar ¶
type ICalendar interface { GetAuthLink(state string) string GetStateCodeFromGin(c *gin.Context) (string, string, error) GetTokenFromCode(code string) (*oauth2.Token, error) RefreshToken(token *oauth2.Token) (bool, *oauth2.Token, error) GetCalendars(token *oauth2.Token) ([]*calendar.CalendarListEntry, error) GetCalendarEvents(token *oauth2.Token, calendarID string, args *GetCalendarEventsArgs) ([]*calendar.Event, error) UpsertEvent(token *oauth2.Token, calendarID string, event *calendar.Event) (*calendar.Event, error) }
Click to show internal directories.
Click to hide internal directories.