slack

package
v0.0.0-...-5b6b8e2 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2020 License: GPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RequestAccessToken

func RequestAccessToken(data url.Values) error

RequestAccessToken will retrieve the access token data

func SaveAccountConfiguration

func SaveAccountConfiguration(payload []byte)

SaveAccountConfiguration will save the new account

func SaveProjectConfigurationContent

func SaveProjectConfigurationContent(jsonContent []byte)

SaveProjectConfigurationContent will save the options chosen by the user

Types

type AccessTokenResponse

type AccessTokenResponse struct {
	AccessToken string             `json:"access_token"`
	Team        content.Team       `json:"team"`
	AuthedUser  content.AuthedUser `json:"authed_user"`
}

AccessTokenResponse contains the access token response

type IncomingAPI

type IncomingAPI struct {
	Token     string        `json:"token,omitempty"`
	TriggerID string        `json:"trigger_id,omitempty"`
	UserID    string        `json:"user_id,omitempty"`
	View      *content.View `json:"view"`
}

IncomingAPI is the top structure to send data to Slack API

func ListProjectConfigurationContent

func ListProjectConfigurationContent(payload content.Payload, projectGUID string) *IncomingAPI

ListProjectConfigurationContent returns the slack modal content

func ShowAccountConfiguration

func ShowAccountConfiguration(triggerID string) *IncomingAPI

ShowAccountConfiguration the fields to configure the account

func ShowCumulativeFlowDiagram

func ShowCumulativeFlowDiagram(triggerID string, projectGUID string) *IncomingAPI

ShowCumulativeFlowDiagram will print the CFD image

func (*IncomingAPI) SendToAPI

func (i *IncomingAPI) SendToAPI(accessToken string) error

SendToAPI is the method to send data to the Slack API

func (*IncomingAPI) SendToUser

func (i *IncomingAPI) SendToUser() error

SendToUser will send message to a user

type IncomingWebhook

type IncomingWebhook struct {
	Blocks []content.Block `json:"blocks"`
}

IncomingWebhook is the message format to send messages to the slack channel

func ListCommands

func ListCommands() IncomingWebhook

ListCommands will show the list of commands that Herald has

func ProjectList

func ProjectList(accountGUID string) IncomingWebhook

ProjectList will return the slack structure to show project as a list

func (*IncomingWebhook) SendToWebhook

func (i *IncomingWebhook) SendToWebhook() error

SendToWebhook is the method to send data to the Slack webhook

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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