gnotifier

package module
v0.0.0-...-0de36ba Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2014 License: MIT Imports: 2 Imported by: 6

README

gnotifier

A Go lib for sending desktop notifications on Linux and Mac OS X 10.8+

GoDoc Travis-CI

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Builder

type Builder func(title, message string) GNotifier

Builder abstracts the concrete function Notification

type Config

type Config struct {
	Title           string
	Message         string
	Expiration      int32
	ApplicationName string
}

Config define the notification options

func (*Config) IsValid

func (c *Config) IsValid() error

type GNotifier

type GNotifier interface {
	Push() error
	GetConfig() *Config
	IsValid() error
}

GNotifier interface

func Notification

func Notification(title, message string) GNotifier

Notification is the builder

func NullNotification

func NullNotification(title, message string) GNotifier

NullNotification is the builder for tests where no side effects are desired

type TestRecorder

type TestRecorder struct {
	Pushed []*Config
}

TestRecorder provides a way to verify the GNotifier api use (not intended for production code)

func NewTestRecorder

func NewTestRecorder() *TestRecorder

NewTestRecorder constructs a new TestRecorder. Use its Notification method as test Builder.

func (*TestRecorder) Notification

func (r *TestRecorder) Notification(title, message string) GNotifier

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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