github

package
v0.0.0-...-82180e8 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2023 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Address    = "https://github.com"
	RAWAddress = "https://raw.githubusercontent.com"
)

Variables

This section is empty.

Functions

func IsCredentialsError

func IsCredentialsError(err error) bool

Types

type Client

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

Client holds a github api client instance

func NewClient

func NewClient(token, gheURL string) (*Client, error)

NewClient creates a Github API client instance

func (*Client) GetLatestRelease

func (c *Client) GetLatestRelease(ctx context.Context, owner, repo string) (*github.RepositoryRelease, error)

func (*Client) GetOrganizationMembers

func (c *Client) GetOrganizationMembers(ctx context.Context, target _coreapi.Owner) ([]*_coreapi.Owner, error)

GetOrganizationMembers will gather all the members of a given organization

func (*Client) GetReleaseByTag

func (c *Client) GetReleaseByTag(ctx context.Context, owner, repo, tag string) (*github.RepositoryRelease, error)

func (*Client) GetRepositoriesFromOwner

func (c *Client) GetRepositoriesFromOwner(ctx context.Context, target _coreapi.Owner) ([]*_coreapi.Repository, error)

GetRepositoriesFromOwner is used gather all the repos associated with the org owner or other user. This is only used by the gitlab client. The github client use a github specific function.

func (*Client) GetUserOrganization

func (c *Client) GetUserOrganization(ctx context.Context, name string) (*_coreapi.Owner, error)

GetUserOrganization is used to enumerate the owner in a given org

Jump to

Keyboard shortcuts

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