slack

package
v0.0.0-...-a3dbc15 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrStatusMismatch      = errors.New("job status does not match configured trigger")
	ErrPostConditionNotMet = errors.New("post condition is not met")
)

Functions

This section is empty.

Types

type APIResponse

type APIResponse struct {
	Error string `json:"error"`
}

type Client

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

func NewClient

func NewClient(options ClientOptions) *Client

func (*Client) PostMessage

func (c *Client) PostMessage(ctx context.Context, message, channel string) error

type ClientOptions

type ClientOptions struct {
	BaseURL    string
	SlackToken secret.String
}

type Notification

type Notification struct {
	Status         string
	Branch         string
	Tag            string
	Event          string
	BranchPattern  string
	TagPattern     string
	InvertMatch    bool
	TemplateVar    string
	TemplatePath   string
	TemplateInline string
	TemplateName   string
}

func (*Notification) BuildMessageBody

func (j *Notification) BuildMessageBody() (string, error)

func (*Notification) IsEventMatchingStatus

func (j *Notification) IsEventMatchingStatus() bool

func (*Notification) IsPostConditionMet

func (j *Notification) IsPostConditionMet() bool

Jump to

Keyboard shortcuts

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