adapter

package
v0.9.4 Latest Latest
Warning

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

Go to latest
Published: May 18, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SinkClientFactory

func SinkClientFactory(typ Type) (sync.Sink, error)

SinkClientFactory is a convenience factory. It is needed to retrieve new - default - client implementations.

func SourceClientFactory

func SourceClientFactory(typ Type) (sync.Source, error)

SourceClientFactory is a convenience factory. It is needed to retrieve new - default - client implementations.

Types

type ConfigReader

type ConfigReader interface {
	Adapter() config.Adapter
}

ConfigReader provides an interface for adapters to load their own configuration map. It's the adapter's responsibility to validate that the map is valid.

type SinkAdapter

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

func NewSinkAdapterFromConfig

func NewSinkAdapterFromConfig(ctx context.Context, bindPort uint, config ConfigReader, storage auth.Storage, logger *log.Logger) (*SinkAdapter, error)

func (SinkAdapter) CalendarID

func (a SinkAdapter) CalendarID() string

func (SinkAdapter) CreateEvent

func (a SinkAdapter) CreateEvent(ctx context.Context, e models.Event) error

func (SinkAdapter) DeleteEvent

func (a SinkAdapter) DeleteEvent(ctx context.Context, e models.Event) error

func (SinkAdapter) EventsInTimeframe

func (a SinkAdapter) EventsInTimeframe(ctx context.Context, start time.Time, end time.Time) ([]models.Event, error)

func (SinkAdapter) GetCalendarID added in v0.8.0

func (a SinkAdapter) GetCalendarID() string

func (SinkAdapter) Name

func (a SinkAdapter) Name() string

func (SinkAdapter) UpdateEvent

func (a SinkAdapter) UpdateEvent(ctx context.Context, e models.Event) error

type SourceAdapter

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

func NewSourceAdapterFromConfig

func NewSourceAdapterFromConfig(ctx context.Context, bindPort uint, config ConfigReader, storage auth.Storage, logger *log.Logger) (*SourceAdapter, error)

func (SourceAdapter) CalendarID

func (a SourceAdapter) CalendarID() string

func (SourceAdapter) EventsInTimeframe

func (a SourceAdapter) EventsInTimeframe(ctx context.Context, start time.Time, end time.Time) ([]models.Event, error)

func (SourceAdapter) GetCalendarID added in v0.8.0

func (a SourceAdapter) GetCalendarID() string

func (SourceAdapter) Name

func (a SourceAdapter) Name() string

type Type

type Type string
const (
	GoogleCalendarType      Type = "google"
	ZepCalendarType         Type = "zep"
	OutlookHttpCalendarType Type = "outlook_http"
)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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