Documentation
¶
Index ¶
- type Client
- func (nc *Client) Bind(r *http.Request) error
- func (*Client) EndDated() bool
- func (nc *Client) GetID() string
- func (nc *Client) ParentID() string
- func (nc *Client) Patch(newConfig *Client) *babyapi.ErrResponse
- func (nc *Client) Render(_ http.ResponseWriter, _ *http.Request) error
- func (nc *Client) SendMessage(title, message string) error
- func (*Client) SetEndDate(_ time.Time)
- func (nc *Client) TestCreate() error
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) EndDated ¶
EndDated allows this to satisfy an interface even though the resources does not have end-dates
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) SendMessage ¶
SendMessage will send a notification using the client created from this config
func (*Client) SetEndDate ¶
func (*Client) TestCreate ¶
TestCreate will call the Client implementation's initialization function to make sure it is valid and able to connect
Click to show internal directories.
Click to hide internal directories.