bark

package
v0.0.0-...-48f88d4 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2022 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BarkPushBody

type BarkPushBody struct {
	Body      string                `json:"body"`
	DeviceKey string                `json:"device_key"`
	Title     string                `json:"title"`
	ExtParams BarkPushBodyExtParams `json:"ext_params"`
}

type BarkPushBodyExtParams

type BarkPushBodyExtParams struct {
	Badge int    `json:"badge"`
	Icon  string `json:"icon"`
	Group string `json:"group"`
	URL   string `json:"url"`
}

type BarkTask

type BarkTask struct {
	ID          string       `json:"id"`
	ActiveID    cron.EntryID `json:"activeId"`
	Spec        string       `json:"spec"`
	Description string       `json:"description"`
	Content     string       `json:"content"`
	Title       string       `json:"title"`
	DeviceKey   string       `json:"deviceKey"`
	Icon        string       `json:"icon"`
}

type BarkTaskLog

type BarkTaskLog struct {
	ID     string       `json:"id"`
	TaskID string       `json:"taskId" storm:"index"`
	Start  time.Time    `json:"start"`
	End    time.Time    `json:"end"`
	Buffer bytes.Buffer `json:"buffer"`
}

func (*BarkTaskLog) MarshalJSON

func (taskLog *BarkTaskLog) MarshalJSON() ([]byte, error)

func (*BarkTaskLog) Printf

func (taskLog *BarkTaskLog) Printf(format string, a ...interface{}) (n int, err error)

func (*BarkTaskLog) Println

func (taskLog *BarkTaskLog) Println(a ...interface{}) (n int, err error)

func (*BarkTaskLog) UnmarshalJSON

func (taskLog *BarkTaskLog) UnmarshalJSON(b []byte) error

type BarkTaskManager

type BarkTaskManager struct {
	*cron.Cron
	// contains filtered or unexported fields
}

func NewManager

func NewManager(db *storm.DB) *BarkTaskManager

func (*BarkTaskManager) AddTask

func (manager *BarkTaskManager) AddTask(task *BarkTask) error

func (*BarkTaskManager) Plugin

func (manager *BarkTaskManager) Plugin(plugin plugin.Plugin)

func (*BarkTaskManager) RemoveTask

func (manager *BarkTaskManager) RemoveTask(id string)

func (*BarkTaskManager) TaskFunc

func (manager *BarkTaskManager) TaskFunc(task *BarkTask, taskLog *BarkTaskLog)

func (*BarkTaskManager) Tasks

func (manager *BarkTaskManager) Tasks() []*BarkTask

Jump to

Keyboard shortcuts

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