github

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: 6 Imported by: 12

Documentation

Overview

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

client, err := github.New(ctx)

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

Index

Constants

View Source
const (
	VolumeName = "github-binding"
	MountPath  = bindings.MountPath + "/github" // 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 GithubBinding.

func New

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

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

func ReadKey

func ReadKey(key string) (string, error)

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

Types

This section is empty.

Jump to

Keyboard shortcuts

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