slackcommand

package
v0.0.0-...-60efd7f Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2020 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Command

type Command struct {
	Token       string `schema:"token"`
	TeamID      string `schema:"team_id"`
	TeamDomain  string `schema:"team_domain"`
	ChannelID   string `schema:"channel_id"`
	ChannelName string `schema:"channel_name"`
	UserID      string `schema:"user_id"`
	UserName    string `schema:"user_name"`
	Command     string `schema:"command"`
	Text        string `schema:"text"`
	ResponseURL string `schema:"response_url"`
}

type Delegate

type Delegate interface {
	Handle(Command) (string, error)
}

type Response

type Response struct {
	Type string `json:"response_type"`
	Text string `json:"text"`
}

func NewErrResponse

func NewErrResponse(text string) Response

func NewOKResponse

func NewOKResponse(text string) Response

type Server

type Server struct {
	VerificationToken string
	Delegate          Delegate
}

func (Server) ServeHTTP

func (s Server) ServeHTTP(w http.ResponseWriter, r *http.Request)

Jump to

Keyboard shortcuts

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