8000 GitHub - autom8ter/cobraslack: create a slack slash command handler that executes a cobra command
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

autom8ter/cobraslack

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cobraslack

-- import "."

Usage

func QueryHandler

func QueryHandler(cmd *cobra.Command) http.HandlerFunc

QueryHandler returns an http handler that sets the arguments to the root cobra command from the text of the 'text' query paramater the output of the cobra command is written directly to the response body. example executing "echo -h" subcommand: curl -X GET "$(host)/command?text=echo%20-h"

func SlackHandler

func SlackHandler(cmd *cobra.Command, verificationToken string) http.HandlerFunc

SlackHandler returns an http handler that sets the arguments to the root cobra command from the text of the slash command the output of the cobra command is written directly to the response body as a slack message. example executing "echo -h" subcommand: curl -X POST "$(host)/command" --data "text=echo -h"

About

create a slack slash command handler that executes a cobra command

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

0