Documentation
¶
Index ¶
- Variables
- func Execute(config *Config) error
- type Config
- type FeedSource
- type FeedSourceConfig
- type GoogleCalendarSource
- type GoogleCalendarSourceConfig
- type Item
- type Notifier
- type Sink
- type SinkConfig
- type SinkType
- type Source
- type SourceConfig
- type SourceType
- type TwitterSink
- type TwitterSinkConfig
Constants ¶
This section is empty.
Variables ¶
View Source
var SinkConfigs = map[SinkType]func(*Config) SinkConfig{ TwitterSinkType: func(c *Config) SinkConfig { return c.Sink.Twitter }, }
View Source
var SourceConfigs = map[SourceType]func(*Config) SourceConfig{ GoogleCalendarSourceType: func(c *Config) SourceConfig { return c.Source.GoogleCalendar }, FeedSourceType: func(c *Config) SourceConfig { return c.Source.Feed }, }
Functions ¶
Types ¶
type Config ¶
type Config struct {
Source struct {
Type SourceType `yaml:"type"`
GoogleCalendar *GoogleCalendarSourceConfig `yaml:"google_calendar"`
Feed *FeedSourceConfig `yaml:"feed"`
} `yaml:"source"`
Sink struct {
Type SinkType `yaml:"type"`
Twitter *TwitterSinkConfig `yaml:"twitter"`
} `yaml:"sink"`
}
type FeedSource ¶
type FeedSource struct {
// contains filtered or unexported fields
}
func (*FeedSource) Items ¶
func (s *FeedSource) Items() ([]*Item, error)
type FeedSourceConfig ¶
func (*FeedSourceConfig) NewSource ¶
func (c *FeedSourceConfig) NewSource() (Source, error)
type GoogleCalendarSource ¶
type GoogleCalendarSource struct {
// contains filtered or unexported fields
}
func (*GoogleCalendarSource) Items ¶
func (s *GoogleCalendarSource) Items() ([]*Item, error)
type GoogleCalendarSourceConfig ¶
type GoogleCalendarSourceConfig struct {
ClientCredentials string `yaml:"client_credentials"`
CalendarId string `yaml:"calendar_id"`
Template string `yaml:"template"`
EndedMessage string `yaml:"ended_message"`
TimeZone string `yaml:"time_zone"`
}
func (*GoogleCalendarSourceConfig) NewSource ¶
func (c *GoogleCalendarSourceConfig) NewSource() (Source, error)
type Notifier ¶
func NewNotifier ¶
type SinkConfig ¶
type SourceConfig ¶
type SourceType ¶
type SourceType string
const ( GoogleCalendarSourceType SourceType = "google_calendar" FeedSourceType SourceType = "feed" )
type TwitterSink ¶
type TwitterSink struct {
// contains filtered or unexported fields
}
func (*TwitterSink) Close ¶
func (s *TwitterSink) Close()
func (*TwitterSink) Output ¶
func (s *TwitterSink) Output(item *Item) error
func (*TwitterSink) RecentUrls ¶
func (s *TwitterSink) RecentUrls() ([]string, error)
type TwitterSinkConfig ¶
type TwitterSinkConfig struct {
ConsumerKey string `yaml:"consumer_key"`
ConsumerSecret string `yaml:"consumer_secret"`
OAuthToken string `yaml:"oauth_token"`
OAuthTokenSecret string `yaml:"oauth_token_secret"`
}
func (*TwitterSinkConfig) NewSink ¶
func (c *TwitterSinkConfig) NewSink() (Sink, error)
Click to show internal directories.
Click to hide internal directories.