task

package
v0.0.0-...-91a13d0 Latest Latest
Warning

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

Go to latest
Published: May 2, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Gateway = make(map[string]SlackClient)

Gateway is the Slack API client gateway

Functions

func NewHealthResponse

func NewHealthResponse() *utils.HealthResponse

NewHealthResponse returns the size of the tasks queue

Types

type SlackClient

type SlackClient struct {
	Value *slack.Client
}

SlackClient is the slack client struct

func (SlackClient) GetIM

func (c SlackClient) GetIM(userEmail string) (string, error)

GetIM opens an IM channel with a specified userEmail

type SlackRequest

type SlackRequest struct {
	Workspace   string               `json:"workspace"`
	Channel     string               `json:"channel"`
	UserEmails  []string             `json:"user_emails"`
	Username    string               `json:"username"`
	Parse       string               `json:"parse"`
	IconURL     string               `json:"icon_url"`
	IconEmoji   string               `json:"icon_emoji"`
	Text        string               `json:"text"`
	LinkNames   int                  `json:"link_names"`
	AsUser      bool                 `json:"as_user"`
	UnfurlLinks bool                 `json:"unfurl_links"`
	UnfurlMedia bool                 `json:"unfurl_media"`
	Markdown    bool                 `json:"mrkdwn,omitempty"`
	Blocks      []slack.SectionBlock `json:"blocks"`
	Attachments []slack.Attachment   `json:"attachments"`
}

SlackRequest contains all the parameters necessary (including the optional ones) for a PostMessage() request

func (*SlackRequest) ProcessCreate

func (b *SlackRequest) ProcessCreate() error

ProcessCreate will threat the body and do the job!

type SlackTask

type SlackTask struct {
	// contains filtered or unexported fields
}

SlackTask contains the parameters for your task queue

Jump to

Keyboard shortcuts

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