config

package
v0.9.1 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Adapter

type Adapter struct {
	// Type of the adapter (client) to use for the source calendar
	Type string `yaml:"type"`
	// ID of the calendar in which the adapter will work.
	Calendar string `yaml:"calendar"`
	// CustomMap is an adapter-specific map to configure it.
	Config CustomMap `yaml:"config"`
	// OAuth values for the adapter
	OAuth OAuth `yaml:"oAuth"`
}

type AdapterConfig

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

func NewAdapterConfig

func NewAdapterConfig(config Adapter) AdapterConfig

func (AdapterConfig) Adapter

func (cfg AdapterConfig) Adapter() Adapter

type AuthStorage

type AuthStorage struct {
	StorageMode string `yaml:"storage_mode"`
	// Any kind of parameter which can be passed to the StorageMode
	Config CustomMap `yaml:"config"`
}

type CustomMap

type CustomMap map[string]interface{}

CustomMap is meant to provide custom parameters to different adapters/transformers.

type File

type File struct {
	Path              string
	Auth              AuthStorage
	Source            Source        `yaml:"source"`
	Sink              Sink          `yaml:"sink"`
	Filters           []Filter      `yaml:"filters,omitempty"`
	Transformations   []Transformer `yaml:"transformations,omitempty"`
	Sync              Sync          `yaml:"sync"`
	UpdateConcurrency int           `yaml:"updateConcurrency,omitempty"`
}

func NewFromFile

func NewFromFile(path string) (*File, error)

type Filter added in v0.8.0

type Filter struct {
	// Name of the filter
	Name string `yaml:"name"`
	// Any kind of parameter which can be passed to a filter.
	Config CustomMap `yaml:"config"`
}

type OAuth

type OAuth struct {
	ClientID  string `yaml:"clientId,omitempty"`
	ClientKey string `yaml:"clientKey,omitempty"`
	TenantID  string `yaml:"tenantId,omitempty"`
}

type Sink

type Sink struct {
	Adapter Adapter `yaml:"adapter"`
}

type Source

type Source struct {
	Adapter Adapter `yaml:"adapter"`
}

type Sync

type Sync struct {
	StartTime SyncTime `yaml:"start"`
	EndTime   SyncTime `yaml:"end"`
}

Sync configuration

type SyncTime

type SyncTime struct {
	Identifier string `yaml:"identifier"`
	Offset     int    `yaml:"offset,omitempty"`
}

type Transformer

type Transformer struct {
	// Name of the transformer to run
	Name string `yaml:"name"`
	// Any kind of parameter which can be passed to a transformer.
	Config CustomMap `yaml:"config"`
}

Transformer configures the name

Jump to

Keyboard shortcuts

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