raw

package
v2.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2026 License: MIT Imports: 6 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package raw provides a client for interacting with the GitHub raw file API

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client is a client for interacting with the GitHub raw content API.

func NewClient

func NewClient(client *gogithub.Client, rawURL *url.URL) (*Client, error)

NewClient creates a new instance of the raw API Client with the provided GitHub client and provided URL.

func (*Client) GetRawContent

func (c *Client) GetRawContent(ctx context.Context, owner, repo, path string, opts *ContentOpts) (*http.Response, error)

GetRawContent fetches the raw content of a file from a GitHub repository.

func (*Client) URLFromOpts

func (c *Client) URLFromOpts(opts *ContentOpts, owner, repo, path string) (string, error)

type ContentOpts

type ContentOpts struct {
	Ref string
	SHA string
}

type GetRawClientFn

type GetRawClientFn func(context.Context) (*Client, error)

GetRawClientFn is a function type that returns a RawClient instance.

Jump to

Keyboard shortcuts

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