slack

package
v0.23.3 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2024 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetNPMVulnChckBlocks added in v0.22.0

func GetNPMVulnChckBlocks(vulnCheck string) ([]map[string]any, error)

Types

type Client

type Client struct {
	OAuthToken string `json:"oauth_token"`
	Channel    string `json:"channel"`
	ThreadTs   string `json:"thread_ts"`
	Errors     []string
	Blocks     []map[string]any
}

func NewClient

func NewClient() (*Client, error)

func NewTestClient

func NewTestClient() (*Client, error)

func (*Client) BuildBlocks

func (client *Client) BuildBlocks(analyser *code.Analyser) error

BuildBlocks Deprecated: use BuildThreadBlocks instead

func (*Client) BuildErrorBlocks

func (client *Client) BuildErrorBlocks(analyser *code.Analyser, message string) error

func (*Client) BuildJSBlocks

func (client *Client) BuildJSBlocks(analyser *code.Analyser) error

func (*Client) BuildJSThreadBlocks added in v0.22.0

func (client *Client) BuildJSThreadBlocks(analyser *code.JSAnalyser) error

func (*Client) BuildPHPBlocks

func (client *Client) BuildPHPBlocks(analyser *code.Analyser) error

func (*Client) BuildPHPThreadBlocks added in v0.23.0

func (client *Client) BuildPHPThreadBlocks(analyser *code.PHPAnalyser) error

func (*Client) BuildThreadBlocks

func (client *Client) BuildThreadBlocks(analyser *code.Analyser) error

func (*Client) GetBlocks

func (client *Client) GetBlocks() []map[string]any

func (*Client) SendProgressSlackBlocks

func (client *Client) SendProgressSlackBlocks(blocks []map[string]any) error

func (*Client) SendProgressSlackMessage

func (client *Client) SendProgressSlackMessage(message string) error

func (*Client) StartConversation

func (client *Client) StartConversation(analyser *code.Analyser, pipeType string) error

func (*Client) StartJSConversation added in v0.22.0

func (client *Client) StartJSConversation(analyser *code.JSAnalyser) error

func (*Client) StartPHPConversation added in v0.23.0

func (client *Client) StartPHPConversation(analyser *code.PHPAnalyser) error

type Message

type Message struct {
	Channel string `json:"channel"`
	Text    string `json:"text"`
}

type MessageResponse

type MessageResponse struct {
	Ok               bool                   `json:"ok"`
	Channel          string                 `json:"channel"`
	Ts               string                 `json:"ts"`
	Message          map[string]interface{} `json:"message"`
	Warning          string                 `json:"warning"`
	ResponseMetadata map[string]interface{} `json:"response_metadata"`
	Error            string                 `json:"error"`
}

type ResponseMessage

type ResponseMessage struct {
	Channel  string `json:"channel"`
	ThreadTs string `json:"thread_ts"`
	Text     string `json:"text"`
}

type WebhookMessage

type WebhookMessage struct {
	Text string `json:"text"`
}

Jump to

Keyboard shortcuts

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