sunbee

package
v0.4.1-0...-d636b69 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2021 License: AGPL-3.0 Imports: 7 Imported by: 0

README

Sunrise/Sunset Bee

Sends an event when the Sun raises or goes down.

Configuration

  • query: the city that should match the sunrise/sunset event. The query is sent to https://nominatim.openstreetmap.org so your query should return the latitude, longitude for a valid place.
  • offset: the number of seconds to alert before the event happens. Defaults to 2 minutes.

Credits

Logo: Icon Lauk https://www.iconfinder.com/icons/3859148/forecast_sun_sunrise_sunset_weather_icon

Documentation

Overview

Package sunbee is a bee that sends sunrise/sunset event based on the selected location.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SunBee

type SunBee struct {
	bees.Bee
	// contains filtered or unexported fields
}

SunBee is a Bee that alerts you when the sun goes up/down.

func (*SunBee) Action

func (mod *SunBee) Action(action bees.Action) []bees.Placeholder

Action triggers the action passed to it.

func (*SunBee) ReloadOptions

func (mod *SunBee) ReloadOptions(options bees.BeeOptions)

ReloadOptions parses the config options and initializes the Bee.

func (*SunBee) Run

func (mod *SunBee) Run(eventChan chan bees.Event)

Run executes the Bee's event loop.

type SunBeeFactory

type SunBeeFactory struct {
	bees.BeeFactory
}

SunBeeFactory is a factory for SunBees.

func (*SunBeeFactory) Description

func (factory *SunBeeFactory) Description() string

Description returns the description of this Bee.

func (*SunBeeFactory) Events

func (factory *SunBeeFactory) Events() []bees.EventDescriptor

func (*SunBeeFactory) ID

func (factory *SunBeeFactory) ID() string

ID returns the ID of this Bee.

func (*SunBeeFactory) Image

func (factory *SunBeeFactory) Image() string

Image returns the filename of an image for this Bee.

func (*SunBeeFactory) Name

func (factory *SunBeeFactory) Name() string

Name returns the name of this Bee.

func (*SunBeeFactory) New

func (factory *SunBeeFactory) New(name, description string, options bees.BeeOptions) bees.BeeInterface

New returns a new Bee instance configured with the supplied options.

func (*SunBeeFactory) Options

func (factory *SunBeeFactory) Options() []bees.BeeOptionDescriptor

Options returns the options available to configure this Bee.

Jump to

Keyboard shortcuts

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