calendar

package
v0.8.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 1, 2022 License: MIT Imports: 4 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Calendar

type Calendar struct {
	// contains filtered or unexported fields
}

Calendar repesents Google Calendar API client.

func New

func New(conf config.Config) (*Calendar, error)

New returns initialized *Calendar.

func (*Calendar) CalendarList added in v0.8.3

func (c *Calendar) CalendarList(max ...int64) (*CalendarList, error)

CalendarList gets calendar list.

func (*Calendar) CalendarListWithOption added in v0.8.3

func (c *Calendar) CalendarListWithOption(opt CalendarListOption) (*CalendarList, error)

CalendarListWithOption gets calendar list with option.

func (*Calendar) Errorf

func (c *Calendar) Errorf(format string, vv ...interface{})

Errorf logging error information.

func (*Calendar) EventList

func (c *Calendar) EventList(calendarID string, max ...int64) (*EventList, error)

EventList gets calendarID's events after current time.

func (*Calendar) EventListWithOption added in v0.7.2

func (c *Calendar) EventListWithOption(calendarID string, opt EventListOption) (*EventList, error)

EventListWithOption gets calendarID's events with option.

func (*Calendar) SetLogger

func (c *Calendar) SetLogger(logger log.Logger)

SetLogger sets internal API logger.

type CalendarEntry added in v0.8.3

type CalendarEntry struct {
	ID              string
	ETag            string
	Summary         string
	SummaryOverride string
	Description     string
	Kind            string
	Location        string

	AccessRole      string
	BackgroundColor string
	ColorID         string
	ForegroundColor string
	TimeZone        string

	Primary  bool
	Selected bool
	Deleted  bool
	Hidden   bool

	DefaultReminders     []EventReminder
	ConferenceProperties ConferenceProperties
	NotificationSettings NotificationSettings
}

CalendarEntry contains calendar information on Google Calendar.

func NewCalendarEntries added in v0.8.3

func NewCalendarEntries(list []*SDK.CalendarListEntry) []CalendarEntry

func NewCalendarEntry added in v0.8.3

func NewCalendarEntry(e *SDK.CalendarListEntry) CalendarEntry

type CalendarList added in v0.8.3

type CalendarList struct {
	List          []CalendarEntry
	ETag          string
	Kind          string
	NextPageToken string
	NextSyncToken string
}

CalendarList contains multiple calendars.

type CalendarListOption added in v0.8.3

type CalendarListOption struct {
	MaxResults    int64
	MinAccessRole string
	PageToken     string
	SyncToken     string
	ShowDeleted   bool
	ShowHidden    bool
}

CalendarListOption contains option for calendar_list.list operation.

type CalendarListResponse added in v0.8.3

type CalendarListResponse struct {
	*SDK.CalendarList
}

type CalendarNotification added in v0.8.3

type CalendarNotification struct {
	Method string
	Type   string
}

type ConferenceProperties added in v0.8.3

type ConferenceProperties struct {
	AllowedConferenceSolutionTypes []string
}

type Event

type Event struct {
	ID          string
	Status      string
	Summary     string
	Description string
	Location    string
	HTMLLink    string
	HangoutLink string
	ICalUID     string

	StartTime     time.Time
	EndTime       time.Time
	IsAllDayEvent bool

	Attendees []User
	Creator   User
	Organizer User

	Transparent bool
	Visibility  string
	Locked      bool
	PrivateCopy bool
	Sequence    int64
	Kind        string

	Source    EventSource
	Reminders EventReminders

	Created time.Time
	Updated time.Time
}

Event contains event information on Google Calendar.

func NewEvent

func NewEvent(e *SDK.Event) Event

func NewEvents

func NewEvents(list []*SDK.Event) []Event

func (Event) IsStatusConfirmed added in v0.7.1

func (e Event) IsStatusConfirmed() bool

type EventList

type EventList struct {
	List []Event
}

EventList contains multiple calendar events.

type EventListOption

type EventListOption struct {
	MaxResults            int64
	OrderBy               OrderBy
	PageToken             string
	ShowDeleted           bool
	ShowHiddenInvitations bool
	SingleEvents          bool
	TimeMax               time.Time
	TimeMin               time.Time
}

EventListOption contains option for event.list operation.

func (EventListOption) GetTimeMax

func (o EventListOption) GetTimeMax() string

func (EventListOption) GetTimeMin

func (o EventListOption) GetTimeMin() string

type EventListResponse

type EventListResponse struct {
	*SDK.Events
}

type EventReminder

type EventReminder struct {
	Method  string
	Minutes int64
}

type EventReminders

type EventReminders struct {
	Overrides  []EventReminder
	UseDefault bool
}

type EventSource

type EventSource struct {
	Title string
	URL   string
}

type NotificationSettings added in v0.8.3

type NotificationSettings struct {
	Notifications []CalendarNotification
}

type OrderBy

type OrderBy string
const (
	OrderByStartTime OrderBy = "startTime" // used only SingleEvent=true
	OrderByUpdated   OrderBy = "updated"
)

OrderBy list

func (OrderBy) String

func (f OrderBy) String() string

type User

type User struct {
	ID             string
	Email          string
	DisplayName    string
	ResponseStatus string
	Self           bool
	Organizer      bool
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL