slack

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2022 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewService

func NewService(token string) domain.SlackService

Types

type ClientService

type ClientService struct {
	SlackClient SlackCaller
}

func (*ClientService) GetConversationsForUser

func (c *ClientService) GetConversationsForUser(parameters *slack.GetConversationsForUserParameters) ([]slack.Channel, string, error)

func (*ClientService) GetJoinedChannelsList

func (c *ClientService) GetJoinedChannelsList() ([]slack.Channel, error)

func (*ClientService) GetUserByEmail

func (c *ClientService) GetUserByEmail(email string) (*slack.User, error)

func (*ClientService) SendMessage

func (c *ClientService) SendMessage(channel string, option ...slack.MsgOption) (string, string, string, error)

type MockSlackCaller

type MockSlackCaller struct {
	mock.Mock
}

MockSlackCaller is an autogenerated mock type for the SlackCaller type

func (*MockSlackCaller) GetConversationsForUser

func (_m *MockSlackCaller) GetConversationsForUser(params *slack.GetConversationsForUserParameters) ([]slack.Channel, string, error)

GetConversationsForUser provides a mock function with given fields: params

func (*MockSlackCaller) GetUserByEmail

func (_m *MockSlackCaller) GetUserByEmail(_a0 string) (*slack.User, error)

GetUserByEmail provides a mock function with given fields: _a0

func (*MockSlackCaller) SendMessage

func (_m *MockSlackCaller) SendMessage(_a0 string, _a1 ...slack.MsgOption) (string, string, string, error)

SendMessage provides a mock function with given fields: _a0, _a1

type SlackCaller

type SlackCaller interface {
	SendMessage(string, ...slack.MsgOption) (string, string, string, error)
	GetUserByEmail(string) (*slack.User, error)
	GetConversationsForUser(params *slack.GetConversationsForUserParameters) (channels []slack.Channel, nextCursor string, err error)
}

Jump to

Keyboard shortcuts

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