slack

package
v0.0.0-...-1ff4feb Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Manage

func Manage(c *Client) node.Node

Types

type Client

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

func NewClient

func NewClient(d device.Device) *Client

func (*Client) AddSubscription

func (b *Client) AddSubscription(r *Subscription) error

func (*Client) Apply

func (b *Client) Apply(options Options) error

func (*Client) OnError

func (c *Client) OnError(l ErrListener) nodeutil.Subscription

func (*Client) Options

func (b *Client) Options() Options

type Connection

type Connection interface {
	Send(msg Msg) error
}

type Emulator

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

func NewEmulator

func NewEmulator() *Emulator

func (*Emulator) Send

func (e *Emulator) Send(msg Msg) error

type ErrListener

type ErrListener func(err error, r *Subscription)

type Msg

type Msg struct {
	Channel string
	Text    string
}

type Options

type Options struct {
	ApiToken  string
	UserToken string
	Debug     bool
	Emulate   bool
}

type Slack

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

func NewSlack

func NewSlack(c *nslack.Client) *Slack

func (*Slack) Send

func (s *Slack) Send(msg Msg) error

type Subscription

type Subscription struct {
	Id      string
	Enable  bool
	Channel string
	Device  string
	Module  string
	Path    string
	Counter uint32
	// contains filtered or unexported fields
}

func (*Subscription) Active

func (s *Subscription) Active() bool

Jump to

Keyboard shortcuts

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