gosquared

package
v0.8.16 Latest Latest
Warning

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

Go to latest
Published: May 28, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

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

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 NewHandler

func NewHandler() handlers.Handler

func Normalize

func Normalize(cfg config.Configuration, hReq handlers.HandlerRequest) (cc.Message, error)

func NormalizeLiveMessage

func NormalizeLiveMessage(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"`
	Message        GosquaredOutLiveMessageMessage `json:"message,omitempty"`
}

func GosquaredOutBaseMessageFromBytes

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

type GosquaredOutGroup

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

type GosquaredOutLiveMessage

type GosquaredOutLiveMessage struct {
	Version   string                         `json:"version,omitempty"`
	SiteToken string                         `json:"site_token,omitempty"`
	Timestamp string                         `json:"timestamp,omitempty"`
	Person    GosquaredOutPerson             `json:"person,omitempty"`
	Message   GosquaredOutLiveMessageMessage `json:"message,omitempty"`
}

func GosquaredOutLiveMessageFromBytes

func GosquaredOutLiveMessageFromBytes(bytes []byte) (GosquaredOutLiveMessage, error)

func (*GosquaredOutLiveMessage) PersonInboxURL

func (msg *GosquaredOutLiveMessage) PersonInboxURL() (string, error)

type GosquaredOutLiveMessageMessage

type GosquaredOutLiveMessageMessage struct {
	ID        string                         `json:"id,omitempty"`
	Type      string                         `json:"message,omitempty"`
	Content   string                         `json:"content,omitempty"`
	Timestamp int64                          `json:"timestamp,omitempty"`
	From      string                         `json:"from,omitempty"`
	Private   bool                           `json:"private,omitempty"`
	Session   GosquaredOutLiveMessageSession `json:"session,omitempty"`
	Data      any                            `json:"data,omitempty"`
	Entities  []any                          `json:"entities,omitempty"`
	PersonID  string                         `json:"person_id,omitempty"`
}

type GosquaredOutLiveMessageSession

type GosquaredOutLiveMessageSession struct {
	Title string `json:"title,omitempty"`
	Href  string `json:"href,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 {
	ID          string `json:"id,omitempty"`
	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"`
}

func (*GosquaredOutPerson) DisplayName

func (person *GosquaredOutPerson) DisplayName(extraEmail bool, anonymous bool) string

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"`
}

Jump to

Keyboard shortcuts

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