glip

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2021 License: MIT Imports: 9 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	AdaptersGlipActivityIncludeIntegrationName = false
	AdaptersGlipMarkdownQuote                  = false
	AdaptersGlipUseAttachments                 = true
	AdaptersGlipUseShortFields                 = false
	AdatpersGlipUseFieldExtraSpacing           = true
	EmojiURLFormat                             = ""
	WebhookURLOrUID                            = ""
)

Functions

func TripleBacktickToCode

func TripleBacktickToCode(input string) string

TripleBacktickToCode converts markdown triple backticks to Glip code blocks.

Types

type GlipAdapter

type GlipAdapter struct {
	GlipClient      glipwebhook.GlipWebhookClient
	CommonConverter GlipMessageConverter
	EmojiURLFormat  string
	WebhookURLOrUID string
}

func NewGlipAdapter

func NewGlipAdapter(webhookURLOrUID string) (*GlipAdapter, error)

func (*GlipAdapter) SendMessage

func (adapter *GlipAdapter) SendMessage(message commonchat.Message, glipmsg interface{}) (*fasthttp.Request, *fasthttp.Response, error)

func (*GlipAdapter) SendWebhook

func (adapter *GlipAdapter) SendWebhook(urlOrUid string, message commonchat.Message, glipmsg interface{}) (*fasthttp.Request, *fasthttp.Response, error)

func (*GlipAdapter) WebhookUID

func (adapter *GlipAdapter) WebhookUID(ctx *fasthttp.RequestCtx) (string, error)

type GlipMessageConverter

type GlipMessageConverter struct {
	EmojiURLFormat                 string
	ActivityIncludeIntegrationName bool
	UseAttachments                 bool // overrides other 'use' options
	UseMarkdownQuote               bool
	UseShortFields                 bool
	UseFieldExtraSpacing           bool
	EmojiConverter                 emoji.Converter
	ConvertTripleBacktick          bool
}

func NewGlipMessageConverter

func NewGlipMessageConverter() GlipMessageConverter

func (*GlipMessageConverter) ConvertCommonMessage

func (cv *GlipMessageConverter) ConvertCommonMessage(commonMessage cc.Message) glipwebhook.GlipWebhookMessage

Jump to

Keyboard shortcuts

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