msg

package
v4.28.0 Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2024 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 Client

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

Client represents an active msg object

func New

func New(opts Options) (*Client, error)

New initializes a new msg client

func (*Client) RenderEnv

func (c *Client) RenderEnv() []string

RenderEnv returns a notification message as environment variables

func (*Client) RenderHTML

func (c *Client) RenderHTML() (title []byte, body []byte, err error)

RenderHTML returns a notification message as html

func (*Client) RenderJSON

func (c *Client) RenderJSON() ([]byte, error)

RenderJSON returns a notification message as JSON

func (*Client) RenderMarkdown

func (c *Client) RenderMarkdown() (title []byte, body []byte, _ error)

RenderMarkdown returns a notification message as markdown

type Options

type Options struct {
	Meta          model.Meta
	Entry         model.NotifEntry
	TemplateTitle string
	TemplateBody  string
	TemplateFuncs template.FuncMap
}

Options holds msg client object options

Jump to

Keyboard shortcuts

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