googlechat

package
v0.0.79 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2022 License: Apache-2.0 Imports: 8 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Button

type Button struct {
	Text    string  `json:"text,omitempty"`
	OnClick OnClick `json:"onClick,omitempty"`
}

type ButtonWidget

type ButtonWidget struct {
	Button Button `json:"button,omitempty"`
}

type Card

type Card struct {
	Header   *Header   `json:"header,omitempty"`
	Sections []Section `json:"sections,omitempty"`
}
type Header struct {
	Title      string `json:"title,omitempty"`
	Subtitle   string `json:"subtitle,omitempty"`
	ImageUrl   string `json:"imageUrl,omitempty"`
	ImageStyle string `json:"imageStyle,omitempty"`
}

type Image

type Image struct {
	ImageURL string  `json:"imageUrl,omitempty"`
	OnClick  OnClick `json:"onClick,omitempty"`
}

type ImageWidget

type ImageWidget struct {
	Image Image `json:"image,omitempty"`
}

type Message

type Message struct {
	Cards []Card `json:"cards,omitempty"`
}

func ClaimToMessage

func ClaimToMessage(event string, claim factcheckModel.Claim) (*Message, error)

func DefaultMessage

func DefaultMessage(data interface{}) *Message

func EpisodeToMessage

func EpisodeToMessage(event string, episode podcastModel.Episode) (*Message, error)

func OthToMessage

func OthToMessage(entityType, action string, obj map[string]interface{}) (*Message, error)

func PodcastToMessage

func PodcastToMessage(event string, podcast podcastModel.Podcast) (*Message, error)

func PolicyToMessage

func PolicyToMessage(event string, pol coreModel.Policy) (*Message, error)

func PostToMessage

func PostToMessage(event string, post hukzx.Post) (*Message, error)

func ToMessage

func ToMessage(whData whmodel.WebhookData) (*Message, error)

type OnClick

type OnClick struct {
	OpenLink OpenLink `json:"openLink,omitempty"`
}
type OpenLink struct {
	URL string `json:"url,omitempty"`
}

type Section

type Section struct {
	Widgets []interface{} `json:"widgets,omitempty"`
}

type TextParagraph

type TextParagraph struct {
	Text string `json:"text,omitempty"`
}

type TextParagraphWidget

type TextParagraphWidget struct {
	TextParagraph TextParagraph `json:"textParagraph,omitempty"`
}

Jump to

Keyboard shortcuts

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