jx: github.com/jenkins-x/jx/pkg/chats Index | Files

package chats

import "github.com/jenkins-x/jx/pkg/chats"


Package Files

constants.go provider.go slack.go


const (
    Slack = "slack"
    Irc   = "irc"


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

func ProviderAccessTokenURL Uses

func ProviderAccessTokenURL(kind string, url string) string

type ChannelMetrics Uses

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

ChannelMetrics metrics for a channel

func (*ChannelMetrics) ToMarkdown Uses

func (m *ChannelMetrics) ToMarkdown() string

type ChatProvider Uses

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

ChatProvider represents an integration interface to chat

func CreateChatProvider Uses

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

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

func CreateSlackChatProvider Uses

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

type SlackChatProvider Uses

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

func (*SlackChatProvider) GetChannelMetrics Uses

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

Package chats imports 6 packages (graph) and is imported by 3 packages. Updated 2019-07-04. Refresh now. Tools for package owners.