gcal

package
v0.0.105 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2022 License: GPL-3.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CredentialsFile = "/etc/google_calendar_credentials.json"
	TokenFile       = "/etc/google_calendar_token.json"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Gcal

type Gcal struct {
	sync.Mutex
	// contains filtered or unexported fields
}

func New

func New(logger *zap.Logger, opts ...OptionFunc) (*Gcal, error)

func (*Gcal) CalendarIcon

func (g *Gcal) CalendarIcon(ctx context.Context, bounds image.Rectangle) (*logo.Logo, error)

func (*Gcal) DailyEvents

func (g *Gcal) DailyEvents(ctx context.Context, date time.Time) ([]*calendarboard.Event, error)

func (*Gcal) GetCalendarIDs

func (g *Gcal) GetCalendarIDs(ctx context.Context) ([]string, error)

func (*Gcal) HTTPPathPrefix

func (g *Gcal) HTTPPathPrefix() string

type OptionFunc

type OptionFunc func(*Gcal) error

func WithCalendarIDs

func WithCalendarIDs(ids []string) OptionFunc

func WithRefreshInterval

func WithRefreshInterval(interval time.Duration) OptionFunc

Jump to

Keyboard shortcuts

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