Documentation
¶
Index ¶
- Constants
- func ElapsedTime(e *registry.Event, t time.Time) time.Duration
- func Notify(wh *IncomingWebhook) error
- func PrintIncomingWebhookRegistry(path string, notify bool)
- func PrintIncomingWebhookRepository(r *http.Request, path string, h repository.Handler, ...)
- type Attachment
- type Field
- type IncomingWebhook
Constants ¶
View Source
const ( KeySlackURL = "notification.slack.incoming_webhook_url" KeySlackChannelName = "notification.slack.channel_name" )
View Source
const ( KeySlackPayloadTemplateRegistry = "notification.slack.payload_template_registry" KeySlackDockerIconURL = "notification.slack.docker_icon_url" )
View Source
const (
KeySlackPayloadTemplateRepository = "notification.slack.payload_template_repository"
)
Variables ¶
This section is empty.
Functions ¶
func Notify ¶
func Notify(wh *IncomingWebhook) error
func PrintIncomingWebhookRepository ¶
func PrintIncomingWebhookRepository(r *http.Request, path string, h repository.Handler, p repository.WebhookProvider, notify bool)
Types ¶
type Attachment ¶
type IncomingWebhook ¶
type IncomingWebhook struct {
Channel string `json:"channel"` // e.g) #api-test
Username string `json:"username"`
Text string `json:"text"`
Attachments []Attachment `json:"attachments"`
}
https://kii.slack.com/services/B0JGN99RN?added=1
func NewIncomingWebhookRegistry ¶
func NewIncomingWebhookRegistry(e *registry.Event, exiterr error) (*IncomingWebhook, error)
func NewIncomingWebhookRepository ¶
func NewIncomingWebhookRepository(w *repository.Webhook, u repository.WebhookProvider, exiterr error) (*IncomingWebhook, error)
Click to show internal directories.
Click to hide internal directories.