Documentation
¶
Index ¶
- func FormatSlackMessage(groupName string, evt *Data) (string, error)
- func FormatUnixTimeRemaining(remaining int64) string
- func IntToString(in []int32) string
- type AWSSender
- type Client
- type Data
- type DataResponse
- type LocalSender
- type SlackAccessory
- type SlackBlock
- type SlackField
- type SlackImage
- type SlackImageTitle
- type SlackSection
- type Webhooker
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FormatUnixTimeRemaining ¶
FormatUnixTimeRemaining takes in a time in unix and returns a string of hours/days remaining
func IntToString ¶
Types ¶
type AWSSender ¶
AWSSender uses a pre-defined Lambda to handle sending webhooks
func NewAWSSender ¶
NewAWSSender creates an env/region specific sender of webhook events
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client handles the transport of sending the events over an HTTPS connection
type Data ¶
type Data struct {
Settings *am.WebhookEventSettings `json:"settings"`
Event []*am.Event `json:"events"`
}
type DataResponse ¶
type LocalSender ¶
type LocalSender struct {
// contains filtered or unexported fields
}
func NewLocalSender ¶
func NewLocalSender() *LocalSender
func (*LocalSender) Init ¶
func (s *LocalSender) Init() error
func (*LocalSender) Send ¶
func (s *LocalSender) Send(ctx context.Context, events *Data) (*DataResponse, error)
type SlackAccessory ¶
type SlackBlock ¶
type SlackBlock struct {
Blocks []*SlackSection `json:"blocks"`
}
func (*SlackBlock) AppendSection ¶
func (b *SlackBlock) AppendSection(section *SlackSection)
type SlackField ¶
type SlackField struct {
Type string `json:"type"`
Text string `json:"text,omitempty"`
Emoji bool `json:"emoji,omitempty"`
}
func NewSlackField ¶
func NewSlackField(text string) *SlackField
func NewSlackFieldDivider ¶
func NewSlackFieldDivider() *SlackField
type SlackImage ¶
type SlackImage struct {
Type string `json:"type"`
Title *SlackImageTitle `json:"title"`
ImageURL string `json:"image_url"`
AltText string `json:"alt_text"`
}
type SlackImageTitle ¶
type SlackSection ¶
type SlackSection struct {
Type string `json:"type"`
Text *SlackField `json:"text"`
Fields []*SlackField `json:"fields,omitempty"`
Accessory *SlackAccessory `json:"accessory,omitempty"`
}
func NewSlackSection ¶
func NewSlackSection(text string) *SlackSection
func (*SlackSection) AppendField ¶
func (s *SlackSection) AppendField(field *SlackField)
func (*SlackSection) AppendFields ¶
func (s *SlackSection) AppendFields(field []*SlackField)
Click to show internal directories.
Click to hide internal directories.