Documentation
¶
Index ¶
- Constants
- Variables
- func IntegrationActivitySuffix(displayName string) string
- type Adapter
- type GlipAdapter
- func (adapter *GlipAdapter) SendMessage(message cc.Message) (*fasthttp.Request, *fasthttp.Response, error)
- func (adapter *GlipAdapter) SendWebhook(urlOrUid string, message cc.Message) (*fasthttp.Request, *fasthttp.Response, error)
- func (adapter *GlipAdapter) WebhookUID(ctx *fasthttp.RequestCtx) (string, error)
- type SlackAdapter
- func (adapter *SlackAdapter) SendMessage(message commonchat.Message) (*fasthttp.Request, *fasthttp.Response, error)
- func (adapter *SlackAdapter) SendWebhook(urlOrUid string, message commonchat.Message) (*fasthttp.Request, *fasthttp.Response, error)
- func (adapter *SlackAdapter) WebhookUID(ctx *fasthttp.RequestCtx) (string, error)
- type SlackWebhookClient
- func (client *SlackWebhookClient) BuildWebhookURL(urlOrUid string) string
- func (client *SlackWebhookClient) PostWebhookFast(url string, message slack.Message) (*fasthttp.Request, *fasthttp.Response, error)
- func (client *SlackWebhookClient) PostWebhookGUIDFast(urlOrUid string, message slack.Message) (*fasthttp.Request, *fasthttp.Response, error)
Constants ¶
View Source
const (
HTTPMethod = "POST"
)
Variables ¶
View Source
var ( AdaptersGlipActivityIncludeIntegrationName = false AdaptersGlipMarkdownQuote = false AdaptersGlipUseAttachments = false AdaptersGlipUseShortFields = false AdatpersGlipUseFieldExtraSpacing = true EmojiURLFormat = "" WebhookURLOrUID = "" )
View Source
var (
ShowDisplayName = false
)
View Source
var (
WebhookBaseURL = "https://hooks.slack.com/services/"
)
Functions ¶
Types ¶
type GlipAdapter ¶
type GlipAdapter struct {
GlipClient glipwebhook.GlipWebhookClient
CommonConverter ccglip.GlipMessageConverter
EmojiURLFormat string
WebhookURLOrUID string
}
func NewGlipAdapter ¶
func NewGlipAdapter(webhookURLOrUID string) (GlipAdapter, error)
func (*GlipAdapter) SendMessage ¶
func (*GlipAdapter) SendWebhook ¶
func (*GlipAdapter) WebhookUID ¶
func (adapter *GlipAdapter) WebhookUID(ctx *fasthttp.RequestCtx) (string, error)
type SlackAdapter ¶
type SlackAdapter struct {
SlackClient SlackWebhookClient
EmojiURLFormat string
WebhookURLOrUID string
}
func NewSlackAdapter ¶
func NewSlackAdapter(webhookURLOrUID string) (SlackAdapter, error)
func (*SlackAdapter) SendMessage ¶
func (*SlackAdapter) SendWebhook ¶
func (*SlackAdapter) WebhookUID ¶
func (adapter *SlackAdapter) WebhookUID(ctx *fasthttp.RequestCtx) (string, error)
type SlackWebhookClient ¶
type SlackWebhookClient struct {
HttpClient *http.Client
FastClient fasthttp.Client
WebhookUrl string
UrlPrefix *regexp.Regexp
}
func NewSlackWebhookClient ¶
func NewSlackWebhookClient(urlOrUid string, clientType string) (SlackWebhookClient, error)
func (*SlackWebhookClient) BuildWebhookURL ¶
func (client *SlackWebhookClient) BuildWebhookURL(urlOrUid string) string
func (*SlackWebhookClient) PostWebhookFast ¶
Click to show internal directories.
Click to hide internal directories.