google

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2022 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewService

func NewService(account *Account) (calendar.Service, error)

NewService returns a new Google calendar service.

func NewServices

func NewServices(config Config, domainWhitelist map[string]struct{}) ([]calendar.Service, error)

NewServices returns n Google calendar services.

Types

type Account

type Account struct {
	ClientID     string `yaml:"clientID,omitempty"`
	ClientSecret string `yaml:"clientSecret,omitempty"`
	TokenPath    string `yaml:"tokenPath,omitempty"`
	CalendarID   string `yaml:"calendarID,omitempty"`
	// contains filtered or unexported fields
}

Account represents a Google account.

type Config

type Config struct {
	Accounts []*Account `yaml:"accounts,omitempty"`
	Enabled  bool       `yaml:"enabled,omitempty"`
}

Config represents Google's configuration.

func (*Config) SetDefaultValues

func (c *Config) SetDefaultValues(domainWhitelist map[string]struct{}) error

SetDefaultValues populates the configuration with pre-defined values.

Jump to

Keyboard shortcuts

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