gosquared2

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2017 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DisplayName      = "GoSquared"
	HandlerKey       = "gosquared"
	DocumentationURL = "https://www.gosquared.com/customer/en/portal/articles/1996494-webhooks"
)

Variables

This section is empty.

Functions

func DashboardURL

func DashboardURL(siteToken string) string

func ExampleMessage

func ExampleMessage(cfg config.Configuration, data util.ExampleData, eventSlug string) (cc.Message, error)

func Normalize

func Normalize(cfg config.Configuration, bytes []byte) (cc.Message, error)

func NormalizeSiteTraffic

func NormalizeSiteTraffic(cfg config.Configuration, bytes []byte) (cc.Message, error)

func NormalizeSmartGroup

func NormalizeSmartGroup(cfg config.Configuration, bytes []byte) (cc.Message, error)

func PeopleEveryoneURL

func PeopleEveryoneURL(siteToken string) string

Types

type GosquaredOutBaseMessage

type GosquaredOutBaseMessage struct {
	TriggeredAlert GosquaredOutTriggeredAlert `json:"triggeredAlert,omitempty"`
	Concurrents    int64                      `json:"concurrents,omitempty"`
	Person         GosquaredOutPerson         `json:"person,omitempty"`
}

func GosquaredOutBaseMessageFromBytes

func GosquaredOutBaseMessageFromBytes(bytes []byte) (GosquaredOutBaseMessage, error)

type GosquaredOutGroup

type GosquaredOutGroup struct {
	Name string `json:"name,omitempty"`
	Id   string `json:"id,omitempty"`
}

type GosquaredOutMessageConcurrent

type GosquaredOutMessageConcurrent struct {
	TriggeredAlert GosquaredOutTriggeredAlert `json:"triggeredAlert,omitempty"`
	Concurrents    int64                      `json:"concurrents,omitempty"`
	SiteDetails    GosquaredOutSiteDetails    `json:"siteDetails,omitempty"`
}

type GosquaredOutMessageSiteTraffic

type GosquaredOutMessageSiteTraffic struct {
	TriggeredAlert GosquaredOutTriggeredAlert `json:"triggeredAlert,omitempty"`
	SiteDetails    GosquaredOutSiteDetails    `json:"siteDetails,omitempty"`
	Concurrents    int64                      `json:"concurrents,omitempty"`
}

func GosquaredOutMessageSiteTrafficFromBytes

func GosquaredOutMessageSiteTrafficFromBytes(bytes []byte) (GosquaredOutMessageSiteTraffic, error)

type GosquaredOutMessageSmartGroup

type GosquaredOutMessageSmartGroup struct {
	Version   string             `json:"version,omitempty"`
	SiteToken string             `json:"site_token,omitempty"`
	Group     GosquaredOutGroup  `json:"group,omitempty"`
	Boundary  string             `json:"boundary,omitempty"`
	Person    GosquaredOutPerson `json:"person,omitempty"`
}

func GosquaredOutMessageSmartGroupFromBytes

func GosquaredOutMessageSmartGroupFromBytes(bytes []byte) (GosquaredOutMessageSmartGroup, error)

func (*GosquaredOutMessageSmartGroup) GroupURL

func (msg *GosquaredOutMessageSmartGroup) GroupURL() string

type GosquaredOutPerson

type GosquaredOutPerson struct {
	CreatedAt   string `json:"created_at,omitempty"`
	Phone       string `json:"phone,omitempty"`
	Avatar      string `json:"avatar,omitempty"`
	Description string `json:"description,omitempty"`
	Username    string `json:"username,omitempty"`
	Email       string `json:"email,omitempty"`
	Name        string `json:"name,omitempty"`
	Id          string `json:"id,omitempty"`
}

type GosquaredOutSiteDetails

type GosquaredOutSiteDetails struct {
	UserId    int64  `json:"user_id,omitempty"`
	Acct      string `json:"acct,omitempty"`
	Email     string `json:"email,omitempty"`
	FirstName string `json:"first_name,omitempty"`
	LastName  string `json:"last_name,omitempty"`
	SiteName  string `json:"site_name,omitempty"`
	Domain    string `json:"domain,omitempty"`
	URL       string `json:"url,omitempty"`
	Timezone  string `json:"timezone,omitempty"`
}

func (*GosquaredOutSiteDetails) DashboardURL

func (site *GosquaredOutSiteDetails) DashboardURL() string

type GosquaredOutTriggeredAlert

type GosquaredOutTriggeredAlert struct {
	Id       int64  `json:"id,omitempty"`
	Boundary string `json:"boundary,omitempty"`
	Value    string `json:"value,omitempty"`
	Type     string `json:"type,omitempty"`
}

type Handler

type Handler struct {
	Config  config.Configuration
	Adapter adapters.Adapter
}

FastHttp request handler for Travis CI outbound webhook

func NewHandler

func NewHandler(cfg config.Configuration, adapter adapters.Adapter) Handler

FastHttp request handler constructor for Travis CI outbound webhook

func (*Handler) HandleFastHTTP

func (h *Handler) HandleFastHTTP(ctx *fasthttp.RequestCtx)

HandleFastHTTP is the method to respond to a fasthttp request.

Jump to

Keyboard shortcuts

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