githubclient

package
v0.0.0-...-8c53de1 Latest Latest
Warning

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

Go to latest
Published: Jan 1, 2025 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	*github.Client
	// contains filtered or unexported fields
}

Client wraps around the GitHub client.

func New

func New(ctx context.Context, token string) *Client

New creates a new Client instance.

func (*Client) RawFile

func (c *Client) RawFile(q RawFileQuery) (string, error)

RawFile returns the raw file content of a file on GitHub.

type RawFileQuery

type RawFileQuery struct {
	Owner string `json:"owner"`
	Repo  string `json:"repo"`
	Path  string `json:"path"`
	Ref   string `json:"ref"`
}

RawFileQuery contains the location of a file on GitHub and the token.

Jump to

Keyboard shortcuts

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