slack

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2023 License: Apache-2.0 Imports: 4 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewState

func NewState(limiter *rate.Limiter) *state

func NewThreadedClient

func NewThreadedClient(client SlackClient, s *state) *threadedClient

func SendMessageRateLimited

func SendMessageRateLimited(client SlackClient, ctx context.Context, limiter *rate.Limiter, recipient string, options ...sl.MsgOption) (ts, channelID string, err error)

Types

type DeliveryPolicy

type DeliveryPolicy int
const (
	Post DeliveryPolicy = iota
	PostAndUpdate
	Update
)

func (DeliveryPolicy) FromString

func (p DeliveryPolicy) FromString(policy string) DeliveryPolicy

func (DeliveryPolicy) MarshalJSON

func (p DeliveryPolicy) MarshalJSON() ([]byte, error)

func (DeliveryPolicy) String

func (p DeliveryPolicy) String() string

func (*DeliveryPolicy) UnmarshalJSON

func (p *DeliveryPolicy) UnmarshalJSON(b []byte) error

type SlackClient

type SlackClient interface {
	SendMessageContext(ctx context.Context, channelID string, options ...sl.MsgOption) (string, string, string, error)
}

Directories

Path Synopsis
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.

Jump to

Keyboard shortcuts

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