reader

package module
v0.6.10 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2023 License: BSD-3-Clause Imports: 14 Imported by: 12

README

go-reader-github

GitHub and GitHub API support for the go-reader.Reader interface.

Documentation to follow. For now have a look at the tests.

See also

Documentation

Index

Constants

View Source
const DEFAULT_BRANCH string = "main"

Variables

This section is empty.

Functions

func EnsureGitHubAccessToken added in v0.6.0

func EnsureGitHubAccessToken(ctx context.Context, target_uri string, token_uri string) (string, error)

EnsureGitHubAccessToken ensures that 'writer_uri' contains a '?access_token=VALUE' parameter. This only applies if the scheme is `githubapi://`. If not the method returns the original 'target_uri' value. If the 'target_uri' contains an empty `access_token` parameter or the value is "{access_token}" then the method will replace parameter with the value derived from 'token_uri' which is expected to be a valid `gocloud.dev/runtimevar` URI.

func NewGitHubAPIReader

func NewGitHubAPIReader(ctx context.Context, uri string) (wof_reader.Reader, error)

func NewGitHubReader

func NewGitHubReader(ctx context.Context, uri string) (wof_reader.Reader, error)

Types

type GitHubAPIReader

type GitHubAPIReader struct {
	wof_reader.Reader
	// contains filtered or unexported fields
}

func (*GitHubAPIReader) Read

func (*GitHubAPIReader) ReaderURI added in v0.4.0

func (r *GitHubAPIReader) ReaderURI(ctx context.Context, key string) string

type GitHubReader

type GitHubReader struct {
	wof_reader.Reader
	// contains filtered or unexported fields
}

func (*GitHubReader) Read

func (r *GitHubReader) Read(ctx context.Context, uri string) (io.ReadSeekCloser, error)

func (*GitHubReader) ReaderURI added in v0.4.0

func (r *GitHubReader) ReaderURI(ctx context.Context, key string) string

Jump to

Keyboard shortcuts

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