Versions in this module Expand all Collapse all v0 v0.0.1 Mar 16, 2018 Changes in this version + const ActionAdd + const ActionArchive + const ActionCreate + const ActionDelete + const ActionRemove + const ActionUnarchive + const ActionUpdate + const BadgeAdded + const BadgeDefault + const BadgeImportant + const BadgePrimary + const BadgeRemoved + const BadgeThemeDark + const BadgeThemeDefault + const Code + const ConditionRoomPublic + const ConditionUserAdmin + const ConditionUserGuest + const ConditionUserRoomOwner + const ConversationUpdatesArchive + const ConversationUpdatesCreate + const ConversationUpdatesDelete + const ConversationUpdatesUnarchive + const ConversationUpdatesUpdate + const Em + const EventConversationUpdates + const EventRosterUpdates + const LozengeDefault + const LozengeInProgress + const LozengeMoved + const LozengeNew + const LozengeRemoved + const LozengeSuccess + const ModuleActionTarget + const ModuleBot + const ModuleBotMessages + const ModuleConfiguration + const ModuleDialog + const ModuleExternalPage + const ModuleGlance + const ModuleInputAction + const ModuleMessageAction + const ModuleSidebar + const ModuleWebhook + const RosterUpdatesAdd + const RosterUpdatesRemove + const ScopeManageConversation + const ScopeParticipateConversation + const Strike + const Strong + const Underline + var NotImplemented = errors.New("HTTP 501 Not Implemented") + func AsText(elem interface{}, buf io.Writer) + func RefreshDescriptor(url string) error + func RequireTokenMiddleware(c Client, next http.Handler) http.Handler + func SendReply(c Client, m *Message, reply *Payload) error + func SendText(client Client, cloudID, conversationID, text string) error + func SendTextReply(c Client, m *Message, reply string) error + type Action string + type ActionTarget struct + CallService *URL + Key string + OpenConfiguration *Key + OpenDialog *Key + OpenExternalPage *Key + OpenSidebar *Key + func (t *ActionTarget) Type() ModuleType + type ApplicationCard struct + Attrs *ApplicationCardAttrs + func (n *ApplicationCard) MarshalJSON() ([]byte, error) + type ApplicationCardAttrs struct + Background *URL + Collapsible bool + Context *CardAttrContext + Description *CardAttrText + Details []CardAttrDetails + Link *URL + Preview *URL + Text string + TextURL string + Title CardAttrTitle + type Badge struct + Appearance BadgeState + Max int + Theme string + Value int + type BadgeState string + type BadgeTheme string + type Bot struct + DirectMessage *URL + Key string + Mention *URL + func (b *Bot) Type() ModuleType + type BotMessages struct + Key string + Pattern string + URL string + func (b *BotMessages) Type() ModuleType + type CardAttrContext struct + Icon Icon + Text string + type CardAttrDetails struct + Badge *Badge + Icon *Icon + Lozenge *Lozenge + Text string + Title string + Users []*CardAttrUser + type CardAttrText struct + Text string + type CardAttrTitle struct + Text string + User *CardAttrUser + type CardAttrUser struct + ID string + Icon *Icon + type Client interface + ConvertDocToText func(doc *Document) (plain string, err error) + GetConversation func(cloudID, conversationID string) (*ConversationCommon, error) + GetConversationByName func(cloudID, conversationName string) (*ConversationCommon, error) + GetUser func(cloudID, userID string) (user *User, err error) + SendMessage func(cloudID, conversationID string, payload *Payload) error + SendUserMessage func(cloudID, userID string, payload *Payload) error + ValidateToken func(tokenString string) (jwt.MapClaims, error) + func New(clientID, clientSecret string) Client + func NewClient(clientID, clientSecret string, httpClient HttpClient) Client + func NewRoomClient(roomToken string, httpClient HttpClient) Client + type Configuration struct + Authentication string + ExternalPage *ConfigurationPage + Key string + Page *ConfigurationPage + State struct{ ... } + func (c *Configuration) Type() ModuleType + type ConfigurationPage struct + Target string + URL string + type ConversationCommon struct + AvatarURL string + CloudID string + Created time.Time + ID string + IsArchived bool + Modified time.Time + Name string + Privacy string + Topic string + Type string + type ConversationMeta struct + AvatarURL string + Created string + ID string + IsArchived bool + Modified string + Name string + Privacy string + Topic string + Type string + type ConversationUpdate struct + Action string + CloudID string + Conversation ConversationMeta + Initiator ID + Type string + type Conversations struct + Cursor string + Limit int + Size int + Values []*ConversationCommon + type Descriptor struct + BaseURL string + Key string + LifeCycle *LifeCycle + Modules map[ModuleType][]Module + type Dialog struct + Authentication string + Key string + Options DialogOptions + Title Name + URL string + func (d *Dialog) Type() ModuleType + type DialogAction struct + Key string + Name Name + type DialogOptions struct + PrimaryAction DialogAction + SecondaryActions []DialogAction + Size DialogSize + type DialogSize struct + Height string + Width string + type Document struct + Content []interface{} + Version int + func (d *Document) MarshalJSON() ([]byte, error) + func (d *Document) UnmarshalJSON(b []byte) (err error) + type Emoji struct + Attrs EmojiAttrs + func (n *Emoji) MarshalJSON() ([]byte, error) + func (n *Emoji) Type() inlineGroupNode + type EmojiAttrs struct + ID string + ShortName string + Text string + type ExternalPage struct + Name Name + URL string + func (e *ExternalPage) Type() ModuleType + type Glance struct + Authentication string + Icon Icon + Key string + Name Name + QueryURL string + Target string + Weight int + func (g *Glance) Type() ModuleType + type GlanceBody struct + Context GlanceContext + Label GlanceLabel + Metadata map[string]interface{} + type GlanceContext struct + CloudID string + ConversationID string + UserID string + type GlanceLabel struct + Value string + type HardBreak struct + func (n *HardBreak) MarshalJSON() ([]byte, error) + func (n *HardBreak) Type() inlineGroupNode + type HttpClient interface + Do func(*http.Request) (*http.Response, error) + Post func(string, string, io.Reader) (*http.Response, error) + type ID struct + ID string + type Icon struct + Label string + URL string + URL2x string + type InlineGroupNode interface + Type func() inlineGroupNode + type InputAction struct + Key string + Name Name + Target string + func (i *InputAction) Type() ModuleType + type Key struct + Key string + type LifeCycle struct + Installed string + Uninstalled string + type LifeCyclePayload struct + CloudID string + EventType string + Key string + OAuthClientID string + ProductType string + ResourceID string + ResourceType string + UserID string + Version string + type Link struct + Href string + Title string + func (m *Link) MarshalJSON() ([]byte, error) + func (m *Link) Type() mark + type Lozenge struct + Appearance LozengeState + Bold bool + Text string + type LozengeState string + type Mark interface + Type func() mark + type Mention struct + Attrs MentionAttrs + func (n *Mention) MarshalJSON() ([]byte, error) + func (n *Mention) Type() inlineGroupNode + type MentionAttrs struct + ID string + Text string + type Message struct + CloudID string + Conversation struct{ ... } + Message struct{ ... } + Sender struct{ ... } + func ReadMessage(req *http.Request) (msg *Message, err error) + type MessageAction struct + Key string + Name Name + Target string + Weight int + func (m *MessageAction) Type() ModuleType + type Module interface + Type func() ModuleType + type ModuleType string + type Name struct + I18n string + Value string + type Panel struct + Attrs PanelAttrs + Content []interface{} + func (d *Panel) UnmarshalJSON(b []byte) error + func (n *Panel) MarshalJSON() ([]byte, error) + func (n *Panel) Type() inlineGroupNode + type PanelAttrs struct + PanelType string + type Paragraph struct + Content []InlineGroupNode + func (p *Paragraph) MarshalJSON() ([]byte, error) + func (p *Paragraph) UnmarshalJSON(b []byte) (err error) + type Payload struct + Body *Document + func PlainText(text string) *Payload + func ReadPayload(bs []byte) (p *Payload, err error) + func (p *Payload) AsText() string + func (payload *Payload) String() string + type RequestContext struct + CloudID string + ConversationID string + UserID string + func GetRequestContext(r *http.Request) *RequestContext + type RosterUpdate struct + Action string + CloudID string + Conversation ConversationMeta + Type string + User ID + type Sidebar struct + Authentication string + Icon *Icon + Key string + Name Name + URL string + func (s *Sidebar) Type() ModuleType + type Subscript struct + func (m *Subscript) MarshalJSON() ([]byte, error) + func (m *Subscript) Type() mark + type Superscript struct + func (m *Superscript) MarshalJSON() ([]byte, error) + func (m *Superscript) Type() mark + type Text struct + Marks []Mark + Text string + func (n *Text) MarshalJSON() ([]byte, error) + func (n *Text) Type() inlineGroupNode + func (t *Text) UnmarshalJSON(b []byte) (err error) + type TextColor struct + Color string + func (m *TextColor) MarshalJSON() ([]byte, error) + func (m *TextColor) Type() mark + type TokenResponse struct + AccessToken string + ExpiresIn int + Scope string + TokenType string + func (tr *TokenResponse) Validate() error + type URL struct + URL string + type User struct + Active bool + DisplayName string + Emails []struct{ ... } + ID string + Meta struct{ ... } + Name struct{ ... } + NickName string + Photos []struct{ ... } + Timezone string + Title string + UserName string + type Webhook struct + Event string + Key string + URL string + func (w *Webhook) Type() ModuleType