pkg

package
v0.0.0-...-036324f Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2022 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MailsToNames

func MailsToNames(ms []string, r io.Reader) ([]string, error)

func Send

func Send(es []Event, sdr Sender, when EventType) error

Types

type Discord

type Discord struct {
	Endpoint string
}

func NewDiscord

func NewDiscord(target string) *Discord

func (*Discord) Send

func (d *Discord) Send(message string) error

type ErrorNameMissing

type ErrorNameMissing struct {
	Mail string
}

func (*ErrorNameMissing) Error

func (e *ErrorNameMissing) Error() string

type Event

type Event struct {
	What, Where, Start, End string
	Who                     []string
}

func TodayEvents

func TodayEvents(store Store) ([]Event, error)

func TomorrowEvents

func TomorrowEvents(store Store) ([]Event, error)

type EventType

type EventType int
const (
	Today EventType = iota
	Tomorrow
)

type GCalStore

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

func NewGCalStore

func NewGCalStore(calendarId string, mails io.Reader, opts ...option.ClientOption) *GCalStore

func (*GCalStore) Events

func (s *GCalStore) Events(when EventType) ([]Event, error)

type Sender

type Sender interface {
	Send(message string) error
}

type Store

type Store interface {
	Events(when EventType) ([]Event, error)
}

type Tg

type Tg struct {
	Endpoint string
	// contains filtered or unexported fields
}

func NewTg

func NewTg(key string, chatId string) *Tg

func (*Tg) Send

func (t *Tg) Send(message string) error

Jump to

Keyboard shortcuts

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