ntfy

package
v0.27.1 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Message

type Message struct {
	Topic    string   `json:"topic"` // Required
	Message  string   `json:"message,omitempty"`
	Markdown bool     `json:"markdown"`
	Title    string   `json:"title"`              // Required
	Tags     []string `json:"tags,omitempty"`     // https://docs.ntfy.sh/publish/#tags-emojis
	Priority int      `json:"priority,omitempty"` // 1-5
	Delay    string   `json:"delay,omitempty"`    // Duration i.e. "5s"
	Icon     string   `json:"icon,omitempty"`     // URL
	Attach   string   `json:"attach,omitempty"`   // URL
	Filename string   `json:"filename,omitempty"`
	Click    string   `json:"click,omitempty"` // URL
	Actions  []struct {
		Action  string            `json:"action"` // "view", "broadcast", or "http"
		Label   string            `json:"label"`
		URL     string            `json:"url,omitempty"`
		Method  string            `json:"method,omitempty"`
		Headers string            `json:"headers,omitempty"`
		Body    string            `json:"body,omitempty"`
		Intent  string            `json:"intent,omitempty"`
		Clear   bool              `json:"clear,omitempty"`
		Extras  map[string]string `json:"extras,omitempty"`
	} `json:"actions,omitempty"`
}

type RunOptions

type RunOptions struct {
	TaskName string `json:"taskName"`
	Par1     string `json:"par1,omitempty"`
	Par2     string `json:"par2,omitempty"`
	Priority int    `json:"priority,omitempty"`
}

type TaskerApi

type TaskerApi struct {
	Run     []RunOptions `json:"run,omitempty"`
	Set     []VarOptions `json:"set,omitempty"`
	Enable  []string     `json:"enable,omitempty"`
	Disable []string     `json:"disable,omitempty"`
}

func (*TaskerApi) ToString

func (t *TaskerApi) ToString() string

type VarOptions

type VarOptions struct {
	Name  string `json:"name"`
	Value string `json:"value"`
}

Jump to

Keyboard shortcuts

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