slack

package
v1.7.0 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2016 License: MIT Imports: 9 Imported by: 1

Documentation

Overview

Package slack implements Slack provider

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DoWithContext added in v1.6.0

func DoWithContext(ctx context.Context, client *http.Client, req *http.Request, f func(*http.Response, error) error) error

DoWithContext makes a HTTP request with the given context

func Register added in v1.5.2

func Register(f func(name string, provider interface{}) error)

Register registers the provider

Types

type Provider

type Provider struct {
	// contains filtered or unexported fields
}

Provider represents the provider

func (*Provider) Search

func (provider *Provider) Search(ctx context.Context, args map[string]interface{}) ([]map[string]interface{}, error)

Search makes a search

type SearchResult

type SearchResult struct {
	Ok       bool   `json:"ok"`
	Query    string `json:"query"`
	Messages *SearchResultMessages
}

SearchResult represent the structure of the search result

type SearchResultMessages

type SearchResultMessages struct {
	Total   int                            `json:"total"`
	Path    string                         `json:"path"`
	Matches []*SearchResultMessagesMatches `json:"matches"`
}

SearchResultMessages represent the structure of the search result messages

type SearchResultMessagesMatches

type SearchResultMessagesMatches struct {
	Type      string                              `json:"type"`
	Username  string                              `json:"username"`
	Text      string                              `json:"text"`
	Permalink string                              `json:"permalink"`
	Channel   *SearchResultMessagesMatchesChannel `json:"channel"`
}

SearchResultMessagesMatches represent the structure of the search result messages matches

type SearchResultMessagesMatchesChannel added in v1.7.0

type SearchResultMessagesMatchesChannel struct {
	Name string `json:"name"`
}

SearchResultMessagesMatchesChannel represent the structure of the search result messages matches channel field

Jump to

Keyboard shortcuts

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