raw

package
v0.28.1 Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2026 License: MIT Imports: 4 Imported by: 0

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

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

type ContentOpts added in v0.6.0

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