github

package
v0.0.0-...-b7f47fd Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AppConfig

type AppConfig struct {
	OrgName        string `json:"orgName"`
	Public         bool   `json:"public,omitempty"`
	PrivateKey     string `json:"privateKey,omitempty"`
	AppID          int64  `json:"appId,omitempty"`
	InstallationID int64  `json:"installationId,omitempty"`
}

type Client

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

func NewAppClient

func NewAppClient(config AppConfig) (*Client, error)

func NewClient

func NewClient(tc *http.Client) (*Client, error)

func NewEnvClient

func NewEnvClient(ctx context.Context) (*Client, error)

func (Client) BranchCommit

func (cl Client) BranchCommit(ctx context.Context, org, repo, ref string) (*Commit, error)

func (Client) PullO5Configs

func (cl Client) PullO5Configs(ctx context.Context, org string, repo string, ref string) ([]*application_pb.Application, error)

type Commit

type Commit struct {
	Commit string
}

type MultiOrgClient

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

func NewMultiOrgClient

func NewMultiOrgClient(clients map[string]*Client) (*MultiOrgClient, error)

func NewMultiOrgClientFromConfigs

func NewMultiOrgClientFromConfigs(configs ...AppConfig) (*MultiOrgClient, error)

func (MultiOrgClient) PullO5Configs

func (mc MultiOrgClient) PullO5Configs(ctx context.Context, org string, repo string, ref string) ([]*application_pb.Application, error)

type RepositoriesService

type RepositoriesService interface {
	DownloadContents(ctx context.Context, owner, repo, filepath string, opts *github.RepositoryContentGetOptions) (io.ReadCloser, *github.Response, error)
	ListByOrg(context.Context, string, *github.RepositoryListByOrgOptions) ([]*github.Repository, *github.Response, error)
	GetContents(ctx context.Context, owner, repo, path string, opts *github.RepositoryContentGetOptions) (fileContent *github.RepositoryContent, directoryContent []*github.RepositoryContent, resp *github.Response, err error)
	GetBranch(ctx context.Context, owner, repo, branch string, followRedirects bool) (*github.Branch, *github.Response, error)
}

Jump to

Keyboard shortcuts

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