slack

package
v0.0.0-...-c9b6943 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2020 License: Apache-2.0 Imports: 5 Imported by: 1

Documentation

Overview

Package slack holds utilities for bootstrapping a Slack API client from the metadata injected by the SlackBinding. Within a process running in the context of a SlackBinding, users can write:

client, err := slack.New(ctx)

to get a client authorized with the access token from the SlackBinding.

Index

Constants

View Source
const (
	VolumeName = "slack-binding"
	MountPath  = bindings.MountPath + "/slack" // filepath.Join isn't const.
)

Variables

This section is empty.

Functions

func AccessToken

func AccessToken() (string, error)

AccessToken reads the file named accessToken that is mounted by the SlackBinding.

func New

func New(ctx context.Context) (*slack.Client, error)

New instantiates a new github client from the access token from the SlackBinding

func ReadKey

func ReadKey(key string) (string, error)

ReadKey may be used to read keys from the secret bound by the SlackBinding.

Types

This section is empty.

Jump to

Keyboard shortcuts

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