chats

package
v1.2.84 Latest Latest
Warning

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

Go to latest
Published: May 24, 2018 License: Apache-2.0 Imports: 5 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	Slack = "slack"
	Irc   = "irc"
)

Variables

View Source
var (
	ChatKinds = []string{Slack, Irc}
)

Functions

func ProviderAccessTokenURL

func ProviderAccessTokenURL(kind string, url string) string

Types

type ChannelMetrics

type ChannelMetrics struct {
	ID          string
	Name        string
	URL         string
	MemberCount int
	Members     []string
}

ChannelMetrics metrics for a channel

func (*ChannelMetrics) ToMarkdown

func (m *ChannelMetrics) ToMarkdown() string

type ChatProvider

type ChatProvider interface {
	GetChannelMetrics(name string) (*ChannelMetrics, error)
}

CreateChatProvider represents an integration interface to chat

func CreateChatProvider

func CreateChatProvider(kind string, server *auth.AuthServer, userAuth *auth.UserAuth, batchMode bool) (ChatProvider, error)

CreateChatProvider creates a new chat provider if one is availabe for the given kind

func CreateSlackChatProvider

func CreateSlackChatProvider(server *auth.AuthServer, userAuth *auth.UserAuth, batchMode bool) (ChatProvider, error)

type SlackChatProvider

type SlackChatProvider struct {
	SlackClient *slack.Client
	Server      *auth.AuthServer
	UserAuth    *auth.UserAuth
}

func (*SlackChatProvider) GetChannelMetrics

func (c *SlackChatProvider) GetChannelMetrics(name string) (*ChannelMetrics, error)

Jump to

Keyboard shortcuts

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