notifications

package
v0.0.0-...-9a5a174 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2025 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	ID      babyapi.ID     `json:"id" yaml:"id"`
	Name    string         `json:"name" yaml:"name"`
	Type    string         `json:"type" yaml:"type"`
	Options map[string]any `json:"options" yaml:"options"`
}

Client is used to interact with an external notification API. It has generic options to allow multiple Client implementations

func (*Client) Bind

func (nc *Client) Bind(r *http.Request) error

func (*Client) EndDated

func (*Client) EndDated() bool

EndDated allows this to satisfy an interface even though the resources does not have end-dates

func (*Client) GetID

func (nc *Client) GetID() string

func (*Client) ParentID

func (nc *Client) ParentID() string

func (*Client) Patch

func (nc *Client) Patch(newConfig *Client) *babyapi.ErrResponse

Patch allows modifying an existing Config with fields from a new one

func (*Client) Render

func (nc *Client) Render(_ http.ResponseWriter, _ *http.Request) error

func (*Client) SendMessage

func (nc *Client) SendMessage(title, message string) error

SendMessage will send a notification using the client created from this config

func (*Client) SetEndDate

func (*Client) SetEndDate(_ time.Time)

func (*Client) TestCreate

func (nc *Client) TestCreate() error

TestCreate will call the Client implementation's initialization function to make sure it is valid and able to connect

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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