microsoft

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: 11 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 Microsoft calendar service.

func NewServices

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

NewServices returns n microsoft calendar services.

Types

type Account

type Account struct {
	CalendarID string `yaml:"calendarID,omitempty"`
	// https://docs.microsoft.com/en-us/onedrive/find-your-office-365-tenant-id
	TenantID     string `yaml:"tenantID,omitempty"`
	ClientID     string `yaml:"clientID,omitempty"`
	ClientSecret string `yaml:"clientSecret,omitempty"`
	// contains filtered or unexported fields
}

Account represents a Microsoft account.

type Config

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

Config represents Microsoft's configuration.

func (*Config) SetDefaultValues

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

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