github

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2026 License: MIT Imports: 5 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 {
	// contains filtered or unexported fields
}

func NewClient

func NewClient(token string) *Client

func NewClientWithHTTPClient

func NewClientWithHTTPClient(token string, httpClient *http.Client) *Client

func (*Client) CreateRepository

func (c *Client) CreateRepository(
	ctx context.Context,
	organization string,
	name string,
	private bool,
) (*CreateRepoResult, error)

func (*Client) GetUser

func (c *Client) GetUser(ctx context.Context) (*provider.User, error)

func (*Client) IsOrganization

func (c *Client) IsOrganization(ctx context.Context, login string) bool

func (*Client) ListRepositoryOwners

func (c *Client) ListRepositoryOwners(ctx context.Context) ([]RepositoryOwner, error)

func (*Client) SourceRepoURL

func (c *Client) SourceRepoURL(owner, repo string) string

type CreateRepoResult

type CreateRepoResult struct {
	Owner    string
	Name     string
	SSHURL   string
	HTTPSURL string
}

type RepositoryOwner

type RepositoryOwner struct {
	Login        string `json:"login"`
	Organization bool   `json:"organization"`
}

Jump to

Keyboard shortcuts

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