Documentation ¶
Index ¶
Constants ¶
View Source
const ( // BOT scope grants permission to add the bot bundled by the app BOT = "bot" // WEBHOOK scope allows requesting permission to post content to the user's Slack team WEBHOOK = "incoming-webhook" // COMMANDS scope allows installing slash commands bundled in the Slack app COMMANDS = "commands" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Options ¶
type Options struct { // Addr is the address where the service will run. e.g: :8080, 0.0.0.0:8989, etc. Addr string // ClientID is the slack client ID provided to you in your app credentials. ClientID string // ClientSecret is the slack client secret provided to you in your app credentials. ClientSecret string // SuccessTpl is the path to the template that will be displayed when there is a successful // auth. SuccessTpl string // ErrorTpl is the path to the template that will be displayed when there is an invalid // auth. ErrorTpl string // Debug will print some debug logs. Debug bool // CertFile is the path to the SSL certificate file. If this and KeyFile are provided, the // server will be run with SSL. CertFile string // KeyFile is the path to the SSL certificate key file. If this and CertFile are provided, the // server will be run with SSL. KeyFile string // ButtonTpl is the path to the Slack button template ButtonTpl string // Scopes is the list of the allowed scopes Scopes []string }
Options has all the configurable parameters for slack authenticator.
type Service ¶
type Service interface { // SetLogOutput sets the place where logs will be written. SetLogOutput(io.Writer) // Run will run the service. This method blocks until the service crashes or stops. Run() error // OnAuth sets the handler that will be triggered every time someone authorizes slack // successfully. OnAuth(func(*slack.OAuthResponse)) }
Service is a service to authenticate on slack using the "Add to slack" button.
Click to show internal directories.
Click to hide internal directories.