push

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2026 License: MIT Imports: 8 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Ask

type Ask struct {
	SID     string   `json:"sid"`
	ID      string   `json:"id"`
	Key     string   `json:"key"`
	Host    string   `json:"host,omitempty"`
	Text    string   `json:"text,omitempty"`
	Tool    string   `json:"tool,omitempty"`
	Cmd     string   `json:"cmd,omitempty"`
	Options []string `json:"options,omitempty"`
}

Ask is a session's question or permission as the phone answers it, from a push's actions or the widget, through POST /api/sessions/{sid}/asks/{id}?key=, which refuses once the session asks something else. A permission has a Tool; a question has Options when one tap answers it.

type Device

type Device struct {
	Endpoint string    `json:"endpoint"`
	Name     string    `json:"name,omitempty"`
	Widget   bool      `json:"widget,omitempty"`
	Added    time.Time `json:"added"`
}

type Message

type Message struct {
	Title   string   `json:"title"`
	Body    string   `json:"body"`
	Tag     string   `json:"tag"`
	URL     string   `json:"url"`
	Session string   `json:"session,omitempty"`
	Replies []string `json:"replies,omitempty"`
	Open    bool     `json:"open,omitempty"`
	Bay     string   `json:"bay,omitempty"`
	Ask     *Ask     `json:"ask,omitempty"`
}

type Pusher

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

func Open

func Open(path string) (*Pusher, error)

func (*Pusher) Add

func (p *Pusher) Add(d Device) error

func (*Pusher) Count

func (p *Pusher) Count() int

func (*Pusher) Devices

func (p *Pusher) Devices() []Device

func (*Pusher) Remove

func (p *Pusher) Remove(endpoint string) error

func (*Pusher) Ring

func (p *Pusher) Ring(reason string)

Ring has the phone app ring for a call to the user; it connects to the call line to take it.

func (*Pusher) Send

func (p *Pusher) Send(m Message)

func (*Pusher) SendWidget

func (p *Pusher) SendWidget(v any)

Jump to

Keyboard shortcuts

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